See #438
- sqlite3_last_insert_rowid doesn't get reset to 0 on errors, so it's unsuitable for error handling!
- 0 and negative values are valid rowids.
I believe the correct implementation is simply returning sqlite3_last_insert_rowid() as FMDB does (and all other SQLite3 wrappers).