aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-01-11 18:15:40 +0000
committerdrh <drh@noemail.net>2018-01-11 18:15:40 +0000
commitafd4eef575eecf2f29fd9c3efa53e23f424fa0a1 (patch)
tree2f4c8cf58ba3773d06e60c5d94ce14bc86046d1a /src/vdbeapi.c
parent66a3a91aa6ddc324dd396f0efc475f552c89c9cd (diff)
parent6f390beb7f96774e81420548ef0be7c16567bca1 (diff)
downloadsqlite-afd4eef575eecf2f29fd9c3efa53e23f424fa0a1.tar.gz
sqlite-afd4eef575eecf2f29fd9c3efa53e23f424fa0a1.zip
Add the sqlite3_vtab_nochange() interface. Test cases are in TH3.
FossilOrigin-Name: a5d09dfaa337fa51d6e702c6aefe58824ab1e7d221c6e79166e2c6f9c7ab1501
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index b9df40b8f..19aa783bb 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -746,6 +746,25 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
}
/*
+** If this routine is invoked from within an xColumn method of a virtual
+** table, then it returns true if and only if the the call is during an
+** UPDATE operation and the value of the column will not be modified
+** by the UPDATE.
+**
+** If this routine is called from any context other than within the
+** xColumn method of a virtual table, then the return value is meaningless
+** and arbitrary.
+**
+** Virtual table implements might use this routine to optimize their
+** performance by substituting a NULL result, or some other light-weight
+** value, as a signal to the xUpdate routine that the column is unchanged.
+*/
+int sqlite3_vtab_nochange(sqlite3_context *p){
+ assert( p );
+ return p->bVtabNoChng;
+}
+
+/*
** Return the current time for a statement. If the current time
** is requested more than once within the same run of a single prepared
** statement, the exact same time is returned for each invocation regardless