Add Database::tryExec()#311
Conversation
Similar to Statement::tryExecuteStep(), allows calls to sqlite3_exec() with the caller assuming responsibility for checking and handling the returned status.
|
Hello! |
|
I was trying to follow Statement::tryExecuteStep(), which similarly doesn't throw exceptions (compared to Statement::executeStep and Statement::exec, which do). Also, C# has some "Try" functions which behave similarly. For example, int.TryParse() versus int.Parse(). int.TryParse() returns false if the string can't be parsed as an integer, while int.Parse() throws an exception. https://stackoverflow.com/questions/467613/parse-v-tryparse I'd be fine with renaming it if you prefer, though. It just made sense to me based on the above. |
|
Then it's settled, thank you! |
Similar to Statement::tryExecuteStep(), allows calls to sqlite3_exec() with the caller assuming responsibility for checking and handling the returned status.