mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the sqlite3_vtab_nochange() method which virtual table implementations
can use to optimize UPDATEs. FossilOrigin-Name: d444b1ff39f0a1673a977b8047e1e14a49d461c9934be080d27c2392a830c1c0
This commit is contained in:
@@ -745,6 +745,25 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
|
||||
return p->pOut->db;
|
||||
}
|
||||
|
||||
/*
|
||||
** 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
|
||||
|
Reference in New Issue
Block a user