Closed intolerable closed 11 months ago
I've added an explicit check for the error, and squashed the branch. do you think anything should be done at this point to handle the OK_LOAD_PERMANENTLY
case in toResult
? if not, this branch should be mergeable -- thank you for your feedback!
The commit message is way too long. I'm going to change the commit message, commit and push.
SQLITE_OPEN_EXRESCODE
sqlite3_open_v2
flag, which enables by-default extended result codes on connections it opens (and also causessqlite3_open_v2
itself to return extended result codes)sqlite3_extended_result_codes
function to switch between primary and extended result codes on an existing connectionThere's one thing that may need to be changed before this can be merged: with extended result codes enabled for a given connection, there are now two possible "success" results (not counting
SQLITE_ROW
andSQLITE_DONE
) --SQLITE_OK
andSQLITE_OK_LOAD_PERMANENTLY
-- whileDatabase.SQLite3.Direct.toResult
(M
) considers anything not exactlySQLITE_OK
to be an error. This shouldn't be a problem unless this library adds support forsqlite3_load_extension
, though (https://www.sqlite.org/rescode.html#ok_load_permanently), and should be a simple fix (toResult
can mask off the 8 least significant bits before comparing to 0).