mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the sqlite3_update_hook() API. (CVS 2820)
FossilOrigin-Name: 36229018817eebfbfca7a66d2285e4faf7b39845
This commit is contained in:
15
src/main.c
15
src/main.c
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.309 2005/12/15 03:04:10 drh Exp $
|
||||
** $Id: main.c,v 1.310 2005/12/15 15:22:09 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -548,6 +548,19 @@ void *sqlite3_commit_hook(
|
||||
return pOld;
|
||||
}
|
||||
|
||||
/*
|
||||
** Register a callback to be invoked each time a row is updated,
|
||||
** inserted or deleted using this database connection.
|
||||
*/
|
||||
void sqlite3_update_hook(
|
||||
sqlite3 *db, /* Attach the hook to this database */
|
||||
void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
|
||||
void *pArg /* Argument to the function */
|
||||
){
|
||||
db->xUpdateCallback = xCallback;
|
||||
db->pUpdateArg = pArg;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** This routine is called to create a connection to a database BTree
|
||||
|
Reference in New Issue
Block a user