You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what to return (such that it's meaningful). sqlite3_reset only pushes sqlite3_step's return through which in the success path is SQLITE_OK (nothing else gets to reset). Do you think it should just emit SQLITE_OK?
I still feel pretty new to c and just broke some prior beliefs where I thought: 0 is success, -1 is err everywhere but that's apparently only POSIX. E.g. SQLITE_BUSY is e.g. 5 or SQLITE_ROW 100. So they're giving actual values here
My intuition suggests not returning anything on the base case, since this is just for the side effect of writing.
execute and bindmany and bind1 return null on success. But they're not userfacing exactly.
I don't have a detailed understanding of sqlite3 C bits, but I noticed this document which has the prose:
Many of the routines in the SQLite C-language Interface return numeric result codes indicating either success or failure, and in the event of a failure, providing some idea of the cause of the failure. This document strives to explain what each of those numeric result codes means.
Very roughly speaking, it seems reasonable to try to detect if there is an error after each of the sqlite3_* functions that can indicate errors via their return values. The idea is that one would probably want to know if something did not go as planned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I finally realized that
asserterrs drivingjpm test!