aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5117200c9..8bc6bb885 100644
--- a/src/main.c
+++ b/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