mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ownsql: Implement the transaction functions.
This commit is contained in:
parent
6c92076ec3
commit
89c51e7649
@ -68,12 +68,20 @@ void SqlDatabase::close()
|
||||
|
||||
bool SqlDatabase::transaction()
|
||||
{
|
||||
return true;
|
||||
if( ! _db ) {
|
||||
return false;
|
||||
}
|
||||
SQLITE_DO(sqlite3_exec(_db, "BEGIN", 0, 0, 0));
|
||||
return _errId == SQLITE_OK;
|
||||
}
|
||||
|
||||
bool SqlDatabase::commit()
|
||||
{
|
||||
return true;
|
||||
if( ! _db ) {
|
||||
return false;
|
||||
}
|
||||
SQLITE_DO(sqlite3_exec(_db, "COMMIT", 0, 0, 0));
|
||||
return _errId == SQLITE_OK;
|
||||
}
|
||||
|
||||
sqlite3* SqlDatabase::sqliteDb()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user