Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lastInsertRowid consistent with other SQLite wrappers #532

Closed
jberkel opened this issue Oct 21, 2016 · 0 comments
Closed

Make lastInsertRowid consistent with other SQLite wrappers #532

jberkel opened this issue Oct 21, 2016 · 0 comments
Milestone

Comments

@jberkel
Copy link
Collaborator

jberkel commented Oct 21, 2016

See #438

  1. sqlite3_last_insert_rowid doesn't get reset to 0 on errors, so it's unsuitable for error handling!
  2. 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).

@jberkel jberkel changed the title Fix lastInsertRowid Make lastInsertRowid consistent with other SQLite wrappers Oct 21, 2016
@jberkel jberkel added this to the 0.11.1 milestone Oct 21, 2016
@jberkel jberkel closed this as completed in 75394da Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant