SQLite: handle existing keys when overwrite=F correctly

This commit is contained in:
Tim Wojtulewicz 2025-03-20 16:06:41 -07:00
parent ba9cf1e4db
commit 3d7fcfb428
3 changed files with 44 additions and 10 deletions

View file

@ -291,6 +291,8 @@ OperationResult SQLite::Step(sqlite3_stmt* stmt, bool parse_value) {
else if ( step_status == SQLITE_BUSY )
// TODO: this could retry a number of times instead of just failing
ret = {ReturnCode::TIMEOUT};
else if ( step_status == SQLITE_CONSTRAINT )
ret = {ReturnCode::KEY_EXISTS};
else
ret = {ReturnCode::OPERATION_FAILED};