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

sqlite3_exec rows affected #62

Closed
tofutim opened this issue Dec 1, 2021 · 2 comments
Closed

sqlite3_exec rows affected #62

tofutim opened this issue Dec 1, 2021 · 2 comments

Comments

@tofutim
Copy link
Contributor

tofutim commented Dec 1, 2021

Is there a reason db.execute does not return the number of rows affected from sqlite3_exec?

@simolus3
Copy link
Owner

simolus3 commented Dec 1, 2021

The int returned by sqlite3_exec is actually a result code. If you want the amount of affected rows, use sqlite3_changes (or getUpdatedRows() in Dart).

I'm not opposed to changing execute for databases and prepared statements to return sqlite3_changes after running. But they're separate in sqlite3, so I think it's not unreasonable to split them in Dart either... Is is so inconvenient to call getUpdatesRows after execute?

@tofutim
Copy link
Contributor Author

tofutim commented Dec 8, 2021

no i can accept that

@tofutim tofutim closed this as completed Dec 8, 2021
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

2 participants