aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authorrdc <rdc@noemail.net>2004-02-25 22:51:06 +0000
committerrdc <rdc@noemail.net>2004-02-25 22:51:06 +0000
commitf146a77677c8455b0230ba3cc67902a52b3ba4fd (patch)
tree2def8f0ef7fd4554aeb0931fb5a4f562a1c5e1a9 /src/func.c
parent268380ca9ed4e5c1ac172f9650d6192bafd0346d (diff)
downloadsqlite-f146a77677c8455b0230ba3cc67902a52b3ba4fd.tar.gz
sqlite-f146a77677c8455b0230ba3cc67902a52b3ba4fd.zip
Add comments and prototype for experimental sqlite_last_statement_changes() API function. Also, allow function to be called from tcl. (CVS 1273)
FossilOrigin-Name: ca99920b0dbf773962b47766d690154fd1276513
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c
index fd581f8a1..e6613c5b1 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.42 2004/02/25 13:47:32 drh Exp $
+** $Id: func.c,v 1.43 2004/02/25 22:51:06 rdc Exp $
*/
#include <ctype.h>
#include <math.h>
@@ -210,10 +210,19 @@ static void last_insert_rowid(sqlite_func *context, int arg, const char **argv){
sqlite_set_result_int(context, sqlite_last_insert_rowid(db));
}
+/*
+** Implementation of the change_count() SQL function. The return
+** value is the same as the sqlite_changes() API function.
+*/
static void change_count(sqlite_func *context, int arg, const char **argv){
sqlite *db = sqlite_user_data(context);
sqlite_set_result_int(context, sqlite_changes(db));
}
+
+/*
+** Implementation of the last_statement_change_count() SQL function. The
+** return value is the same as the sqlite_last_statement_changes() API function.
+*/
static void last_statement_change_count(sqlite_func *context, int arg,
const char **argv){
sqlite *db = sqlite_user_data(context);