mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Add the experimental sqlite3_transaction_hook() API.
FossilOrigin-Name: 093d8cd8e2f3a6af5d40cf810e396f4919eb5cef
This commit is contained in:
@@ -1845,6 +1845,12 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If a transaction-hook is configured, invoke it now to report on the
|
||||
** successful commit operation. */
|
||||
if( rc==SQLITE_OK ){
|
||||
sqlite3TransactionHook(db, SQLITE_COMMIT, 0);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1946,6 +1952,9 @@ int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
|
||||
}
|
||||
}
|
||||
db->nStatement--;
|
||||
assert( SAVEPOINT_ROLLBACK+1==SQLITE_ROLLBACK );
|
||||
assert( SAVEPOINT_RELEASE+1==SQLITE_COMMIT );
|
||||
sqlite3TransactionHook(db, eOp+1, p->iStatement);
|
||||
p->iStatement = 0;
|
||||
|
||||
/* If the statement transaction is being rolled back, also restore the
|
||||
|
||||
Reference in New Issue
Block a user