|
|
|
|
@ -123,9 +123,9 @@ extern "C" { |
|
|
|
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
|
|
|
|
** [sqlite_version()] and [sqlite_source_id()]. |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_VERSION "3.25.3" |
|
|
|
|
#define SQLITE_VERSION_NUMBER 3025003 |
|
|
|
|
#define SQLITE_SOURCE_ID "2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2" |
|
|
|
|
#define SQLITE_VERSION "3.27.1" |
|
|
|
|
#define SQLITE_VERSION_NUMBER 3027001 |
|
|
|
|
#define SQLITE_SOURCE_ID "2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd" |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Run-Time Library Version Numbers |
|
|
|
|
@ -823,6 +823,15 @@ struct sqlite3_io_methods { |
|
|
|
|
** file space based on this hint in order to help writes to the database |
|
|
|
|
** file run faster. |
|
|
|
|
** |
|
|
|
|
** <li>[[SQLITE_FCNTL_SIZE_LIMIT]] |
|
|
|
|
** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that |
|
|
|
|
** implements [sqlite3_deserialize()] to set an upper bound on the size |
|
|
|
|
** of the in-memory database. The argument is a pointer to a [sqlite3_int64]. |
|
|
|
|
** If the integer pointed to is negative, then it is filled in with the |
|
|
|
|
** current limit. Otherwise the limit is set to the larger of the value |
|
|
|
|
** of the integer pointed to and the current database size. The integer |
|
|
|
|
** pointed to is set to the new limit. |
|
|
|
|
** |
|
|
|
|
** <li>[[SQLITE_FCNTL_CHUNK_SIZE]] |
|
|
|
|
** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS |
|
|
|
|
** extends and truncates the database file in chunks of a size specified |
|
|
|
|
@ -1131,6 +1140,7 @@ struct sqlite3_io_methods { |
|
|
|
|
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33 |
|
|
|
|
#define SQLITE_FCNTL_LOCK_TIMEOUT 34 |
|
|
|
|
#define SQLITE_FCNTL_DATA_VERSION 35 |
|
|
|
|
#define SQLITE_FCNTL_SIZE_LIMIT 36 |
|
|
|
|
|
|
|
|
|
/* deprecated names */ |
|
|
|
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
|
|
|
|
@ -1972,6 +1982,17 @@ struct sqlite3_mem_methods { |
|
|
|
|
** negative value for this option restores the default behaviour. |
|
|
|
|
** This option is only available if SQLite is compiled with the |
|
|
|
|
** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option. |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_CONFIG_MEMDB_MAXSIZE]] |
|
|
|
|
** <dt>SQLITE_CONFIG_MEMDB_MAXSIZE |
|
|
|
|
** <dd>The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter |
|
|
|
|
** [sqlite3_int64] parameter which is the default maximum size for an in-memory |
|
|
|
|
** database created using [sqlite3_deserialize()]. This default maximum |
|
|
|
|
** size can be adjusted up or down for individual databases using the |
|
|
|
|
** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control]. If this |
|
|
|
|
** configuration setting is never used, then the default maximum is determined |
|
|
|
|
** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that |
|
|
|
|
** compile-time option is not set, then the default maximum is 1073741824. |
|
|
|
|
** </dl> |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ |
|
|
|
|
@ -2002,6 +2023,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ |
|
|
|
|
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */ |
|
|
|
|
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */ |
|
|
|
|
#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */ |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Database Connection Configuration Options |
|
|
|
|
@ -2017,6 +2039,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** is invoked. |
|
|
|
|
** |
|
|
|
|
** <dl> |
|
|
|
|
** [[SQLITE_DBCONFIG_LOOKASIDE]] |
|
|
|
|
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt> |
|
|
|
|
** <dd> ^This option takes three additional arguments that determine the
|
|
|
|
|
** [lookaside memory allocator] configuration for the [database connection]. |
|
|
|
|
@ -2039,6 +2062,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** memory is in use leaves the configuration unchanged and returns
|
|
|
|
|
** [SQLITE_BUSY].)^</dd> |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_ENABLE_FKEY]] |
|
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt> |
|
|
|
|
** <dd> ^This option is used to enable or disable the enforcement of |
|
|
|
|
** [foreign key constraints]. There should be two additional arguments. |
|
|
|
|
@ -2049,6 +2073,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** following this call. The second parameter may be a NULL pointer, in |
|
|
|
|
** which case the FK enforcement setting is not reported back. </dd> |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]] |
|
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt> |
|
|
|
|
** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers]. |
|
|
|
|
** There should be two additional arguments. |
|
|
|
|
@ -2059,6 +2084,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** following this call. The second parameter may be a NULL pointer, in |
|
|
|
|
** which case the trigger setting is not reported back. </dd> |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]] |
|
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt> |
|
|
|
|
** <dd> ^This option is used to enable or disable the two-argument |
|
|
|
|
** version of the [fts3_tokenizer()] function which is part of the |
|
|
|
|
@ -2072,6 +2098,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** following this call. The second parameter may be a NULL pointer, in |
|
|
|
|
** which case the new setting is not reported back. </dd> |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]] |
|
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt> |
|
|
|
|
** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()] |
|
|
|
|
** interface independently of the [load_extension()] SQL function. |
|
|
|
|
@ -2089,7 +2116,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** be a NULL pointer, in which case the new setting is not reported back. |
|
|
|
|
** </dd> |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_DBCONFIG_MAINDBNAME</dt> |
|
|
|
|
** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt> |
|
|
|
|
** <dd> ^This option is used to change the name of the "main" database |
|
|
|
|
** schema. ^The sole argument is a pointer to a constant UTF8 string |
|
|
|
|
** which will become the new schema name in place of "main". ^SQLite |
|
|
|
|
@ -2098,6 +2125,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** until after the database connection closes. |
|
|
|
|
** </dd> |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
|
|
|
|
|
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt> |
|
|
|
|
** <dd> Usually, when a database in wal mode is closed or detached from a
|
|
|
|
|
** database handle, SQLite checks if this will mean that there are now no
|
|
|
|
|
@ -2111,7 +2139,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** have been disabled - 0 if they are not disabled, 1 if they are. |
|
|
|
|
** </dd> |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt> |
|
|
|
|
** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt> |
|
|
|
|
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates |
|
|
|
|
** the [query planner stability guarantee] (QPSG). When the QPSG is active, |
|
|
|
|
** a single SQL query statement will always use the same algorithm regardless |
|
|
|
|
@ -2127,7 +2155,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** following this call. |
|
|
|
|
** </dd> |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt> |
|
|
|
|
** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt> |
|
|
|
|
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
|
|
|
|
|
** include output for any operations performed by trigger programs. This |
|
|
|
|
** option is used to set or clear (the default) a flag that governs this |
|
|
|
|
@ -2139,7 +2167,7 @@ struct sqlite3_mem_methods { |
|
|
|
|
** it is not disabled, 1 if it is.
|
|
|
|
|
** </dd> |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt> |
|
|
|
|
** [[SQLITE_DBCONFIG_RESET_DATABASE]] <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt> |
|
|
|
|
** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run |
|
|
|
|
** [VACUUM] in order to reset a database back to an empty database |
|
|
|
|
** with no schema and no content. The following process works even for |
|
|
|
|
@ -2158,6 +2186,18 @@ struct sqlite3_mem_methods { |
|
|
|
|
** Because resetting a database is destructive and irreversible, the |
|
|
|
|
** process requires the use of this obscure API and multiple steps to help |
|
|
|
|
** ensure that it does not happen by accident. |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt> |
|
|
|
|
** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the |
|
|
|
|
** "defensive" flag for a database connection. When the defensive |
|
|
|
|
** flag is enabled, language features that allow ordinary SQL to
|
|
|
|
|
** deliberately corrupt the database file are disabled. The disabled |
|
|
|
|
** features include but are not limited to the following: |
|
|
|
|
** <ul> |
|
|
|
|
** <li> The [PRAGMA writable_schema=ON] statement. |
|
|
|
|
** <li> Writes to the [sqlite_dbpage] virtual table. |
|
|
|
|
** <li> Direct writes to [shadow tables]. |
|
|
|
|
** </ul> |
|
|
|
|
** </dd> |
|
|
|
|
** </dl> |
|
|
|
|
*/ |
|
|
|
|
@ -2171,7 +2211,8 @@ struct sqlite3_mem_methods { |
|
|
|
|
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */ |
|
|
|
|
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */ |
|
|
|
|
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */ |
|
|
|
|
#define SQLITE_DBCONFIG_MAX 1009 /* Largest DBCONFIG */ |
|
|
|
|
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */ |
|
|
|
|
#define SQLITE_DBCONFIG_MAX 1010 /* Largest DBCONFIG */ |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Enable Or Disable Extended Result Codes |
|
|
|
|
@ -2972,9 +3013,9 @@ SQLITE_API int sqlite3_set_authorizer( |
|
|
|
|
** time is in units of nanoseconds, however the current implementation |
|
|
|
|
** is only capable of millisecond resolution so the six least significant |
|
|
|
|
** digits in the time are meaningless. Future versions of SQLite |
|
|
|
|
** might provide greater resolution on the profiler callback. The |
|
|
|
|
** sqlite3_profile() function is considered experimental and is |
|
|
|
|
** subject to change in future versions of SQLite. |
|
|
|
|
** might provide greater resolution on the profiler callback. Invoking |
|
|
|
|
** either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the |
|
|
|
|
** profile callback. |
|
|
|
|
*/ |
|
|
|
|
SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*, |
|
|
|
|
void(*xTrace)(void*,const char*), void*); |
|
|
|
|
@ -3388,6 +3429,8 @@ SQLITE_API int sqlite3_open_v2( |
|
|
|
|
** is not a database file pathname pointer that SQLite passed into the xOpen |
|
|
|
|
** VFS method, then the behavior of this routine is undefined and probably |
|
|
|
|
** undesirable. |
|
|
|
|
** |
|
|
|
|
** See the [URI filename] documentation for additional information. |
|
|
|
|
*/ |
|
|
|
|
SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); |
|
|
|
|
SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); |
|
|
|
|
@ -3609,9 +3652,24 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); |
|
|
|
|
** on this hint by avoiding the use of [lookaside memory] so as not to |
|
|
|
|
** deplete the limited store of lookaside memory. Future versions of |
|
|
|
|
** SQLite may act on this hint differently. |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_PREPARE_NORMALIZE]] <dt>SQLITE_PREPARE_NORMALIZE</dt> |
|
|
|
|
** <dd>The SQLITE_PREPARE_NORMALIZE flag is a no-op. This flag used |
|
|
|
|
** to be required for any prepared statement that wanted to use the |
|
|
|
|
** [sqlite3_normalized_sql()] interface. However, the |
|
|
|
|
** [sqlite3_normalized_sql()] interface is now available to all |
|
|
|
|
** prepared statements, regardless of whether or not they use this |
|
|
|
|
** flag. |
|
|
|
|
** |
|
|
|
|
** [[SQLITE_PREPARE_NO_VTAB]] <dt>SQLITE_PREPARE_NO_VTAB</dt> |
|
|
|
|
** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler |
|
|
|
|
** to return an error (error code SQLITE_ERROR) if the statement uses |
|
|
|
|
** any virtual tables. |
|
|
|
|
** </dl> |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_PREPARE_PERSISTENT 0x01 |
|
|
|
|
#define SQLITE_PREPARE_NORMALIZE 0x02 |
|
|
|
|
#define SQLITE_PREPARE_NO_VTAB 0x04 |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Compiling An SQL Statement |
|
|
|
|
@ -3769,6 +3827,11 @@ SQLITE_API int sqlite3_prepare16_v3( |
|
|
|
|
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 |
|
|
|
|
** string containing the SQL text of prepared statement P with |
|
|
|
|
** [bound parameters] expanded. |
|
|
|
|
** ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8 |
|
|
|
|
** string containing the normalized SQL text of prepared statement P. The |
|
|
|
|
** semantics used to normalize a SQL statement are unspecified and subject |
|
|
|
|
** to change. At a minimum, literal values will be replaced with suitable |
|
|
|
|
** placeholders. |
|
|
|
|
** |
|
|
|
|
** ^(For example, if a prepared statement is created using the SQL |
|
|
|
|
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 |
|
|
|
|
@ -3784,14 +3847,16 @@ SQLITE_API int sqlite3_prepare16_v3( |
|
|
|
|
** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time |
|
|
|
|
** option causes sqlite3_expanded_sql() to always return NULL. |
|
|
|
|
** |
|
|
|
|
** ^The string returned by sqlite3_sql(P) is managed by SQLite and is |
|
|
|
|
** automatically freed when the prepared statement is finalized. |
|
|
|
|
** ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P) |
|
|
|
|
** are managed by SQLite and are automatically freed when the prepared |
|
|
|
|
** statement is finalized. |
|
|
|
|
** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
|
|
|
|
** is obtained from [sqlite3_malloc()] and must be free by the application |
|
|
|
|
** by passing it to [sqlite3_free()]. |
|
|
|
|
*/ |
|
|
|
|
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); |
|
|
|
|
SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
|
|
|
|
SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Determine If An SQL Statement Writes The Database |
|
|
|
|
@ -6281,6 +6346,9 @@ struct sqlite3_module { |
|
|
|
|
int (*xSavepoint)(sqlite3_vtab *pVTab, int); |
|
|
|
|
int (*xRelease)(sqlite3_vtab *pVTab, int); |
|
|
|
|
int (*xRollbackTo)(sqlite3_vtab *pVTab, int); |
|
|
|
|
/* The methods above are in versions 1 and 2 of the sqlite_module object.
|
|
|
|
|
** Those below are for version 3 and greater. */ |
|
|
|
|
int (*xShadowName)(const char*); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -7203,6 +7271,7 @@ SQLITE_API int sqlite3_test_control(int op, ...); |
|
|
|
|
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15 |
|
|
|
|
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */ |
|
|
|
|
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */ |
|
|
|
|
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17 |
|
|
|
|
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 |
|
|
|
|
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */ |
|
|
|
|
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19 |
|
|
|
|
@ -8615,6 +8684,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); |
|
|
|
|
** can use to customize and optimize their behavior. |
|
|
|
|
** |
|
|
|
|
** <dl> |
|
|
|
|
** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]] |
|
|
|
|
** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT |
|
|
|
|
** <dd>Calls of the form |
|
|
|
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported, |
|
|
|
|
@ -9384,7 +9454,7 @@ struct sqlite3_rtree_query_info { |
|
|
|
|
sqlite3_int64 iRowid; /* Rowid for current entry */ |
|
|
|
|
sqlite3_rtree_dbl rParentScore; /* Score of parent node */ |
|
|
|
|
int eParentWithin; /* Visibility of parent node */ |
|
|
|
|
int eWithin; /* OUT: Visiblity */ |
|
|
|
|
int eWithin; /* OUT: Visibility */ |
|
|
|
|
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */ |
|
|
|
|
/* The following fields are only available in 3.8.11 and later */ |
|
|
|
|
sqlite3_value **apSqlParam; /* Original SQL values of parameters */ |
|
|
|
|
@ -9880,12 +9950,38 @@ SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession); |
|
|
|
|
** consecutively. There is no chance that the iterator will visit a change
|
|
|
|
|
** the applies to table X, then one for table Y, and then later on visit
|
|
|
|
|
** another change for table X. |
|
|
|
|
** |
|
|
|
|
** The behavior of sqlite3changeset_start_v2() and its streaming equivalent |
|
|
|
|
** may be modified by passing a combination of |
|
|
|
|
** [SQLITE_CHANGESETSTART_INVERT | supported flags] as the 4th parameter. |
|
|
|
|
** |
|
|
|
|
** Note that the sqlite3changeset_start_v2() API is still <b>experimental</b> |
|
|
|
|
** and therefore subject to change. |
|
|
|
|
*/ |
|
|
|
|
SQLITE_API int sqlite3changeset_start( |
|
|
|
|
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */ |
|
|
|
|
int nChangeset, /* Size of changeset blob in bytes */ |
|
|
|
|
void *pChangeset /* Pointer to blob containing changeset */ |
|
|
|
|
); |
|
|
|
|
SQLITE_API int sqlite3changeset_start_v2( |
|
|
|
|
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */ |
|
|
|
|
int nChangeset, /* Size of changeset blob in bytes */ |
|
|
|
|
void *pChangeset, /* Pointer to blob containing changeset */ |
|
|
|
|
int flags /* SESSION_CHANGESETSTART_* flags */ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Flags for sqlite3changeset_start_v2 |
|
|
|
|
** |
|
|
|
|
** The following flags may passed via the 4th parameter to |
|
|
|
|
** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]: |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> |
|
|
|
|
** Invert the changeset while iterating through it. This is equivalent to |
|
|
|
|
** inverting a changeset using sqlite3changeset_invert() before applying it. |
|
|
|
|
** It is an error to specify this flag with a patchset. |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_CHANGESETSTART_INVERT 0x0002 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -9929,7 +10025,7 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter); |
|
|
|
|
** sqlite3changeset_next() is called on the iterator or until the
|
|
|
|
|
** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
|
|
|
|
|
** set to the number of columns in the table affected by the change. If |
|
|
|
|
** pbIncorrect is not NULL, then *pbIndirect is set to true (1) if the change |
|
|
|
|
** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change |
|
|
|
|
** is an indirect change, or false (0) otherwise. See the documentation for |
|
|
|
|
** [sqlite3session_indirect()] for a description of direct and indirect |
|
|
|
|
** changes. Finally, if pOp is not NULL, then *pOp is set to one of
|
|
|
|
|
@ -10540,7 +10636,7 @@ SQLITE_API int sqlite3changeset_apply_v2( |
|
|
|
|
), |
|
|
|
|
void *pCtx, /* First argument passed to xConflict */ |
|
|
|
|
void **ppRebase, int *pnRebase, /* OUT: Rebase data */ |
|
|
|
|
int flags /* Combination of SESSION_APPLY_* flags */ |
|
|
|
|
int flags /* SESSION_CHANGESETAPPLY_* flags */ |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -10558,8 +10654,14 @@ SQLITE_API int sqlite3changeset_apply_v2( |
|
|
|
|
** causes the sessions module to omit this savepoint. In this case, if the |
|
|
|
|
** caller has an open transaction or savepoint when apply_v2() is called,
|
|
|
|
|
** it may revert the partially applied changeset by rolling it back. |
|
|
|
|
** |
|
|
|
|
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> |
|
|
|
|
** Invert the changeset before applying it. This is equivalent to inverting |
|
|
|
|
** a changeset using sqlite3changeset_invert() before applying it. It is |
|
|
|
|
** an error to specify this flag with a patchset. |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 |
|
|
|
|
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002 |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Constants Passed To The Conflict Handler |
|
|
|
|
@ -10953,6 +11055,12 @@ SQLITE_API int sqlite3changeset_start_strm( |
|
|
|
|
int (*xInput)(void *pIn, void *pData, int *pnData), |
|
|
|
|
void *pIn |
|
|
|
|
); |
|
|
|
|
SQLITE_API int sqlite3changeset_start_v2_strm( |
|
|
|
|
sqlite3_changeset_iter **pp, |
|
|
|
|
int (*xInput)(void *pIn, void *pData, int *pnData), |
|
|
|
|
void *pIn, |
|
|
|
|
int flags |
|
|
|
|
); |
|
|
|
|
SQLITE_API int sqlite3session_changeset_strm( |
|
|
|
|
sqlite3_session *pSession, |
|
|
|
|
int (*xOutput)(void *pOut, const void *pData, int nData), |
|
|
|
|
@ -10979,6 +11087,45 @@ SQLITE_API int sqlite3rebaser_rebase_strm( |
|
|
|
|
void *pOut |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Configure global parameters |
|
|
|
|
** |
|
|
|
|
** The sqlite3session_config() interface is used to make global configuration |
|
|
|
|
** changes to the sessions module in order to tune it to the specific needs
|
|
|
|
|
** of the application. |
|
|
|
|
** |
|
|
|
|
** The sqlite3session_config() interface is not threadsafe. If it is invoked |
|
|
|
|
** while any other thread is inside any other sessions method then the |
|
|
|
|
** results are undefined. Furthermore, if it is invoked after any sessions |
|
|
|
|
** related objects have been created, the results are also undefined.
|
|
|
|
|
** |
|
|
|
|
** The first argument to the sqlite3session_config() function must be one |
|
|
|
|
** of the SQLITE_SESSION_CONFIG_XXX constants defined below. The
|
|
|
|
|
** interpretation of the (void*) value passed as the second parameter and |
|
|
|
|
** the effect of calling this function depends on the value of the first |
|
|
|
|
** parameter. |
|
|
|
|
** |
|
|
|
|
** <dl> |
|
|
|
|
** <dt>SQLITE_SESSION_CONFIG_STRMSIZE<dd> |
|
|
|
|
** By default, the sessions module streaming interfaces attempt to input |
|
|
|
|
** and output data in approximately 1 KiB chunks. This operand may be used |
|
|
|
|
** to set and query the value of this configuration setting. The pointer |
|
|
|
|
** passed as the second argument must point to a value of type (int). |
|
|
|
|
** If this value is greater than 0, it is used as the new streaming data |
|
|
|
|
** chunk size for both input and output. Before returning, the (int) value |
|
|
|
|
** pointed to by pArg is set to the final value of the streaming interface |
|
|
|
|
** chunk size. |
|
|
|
|
** </dl> |
|
|
|
|
** |
|
|
|
|
** This function returns SQLITE_OK if successful, or an SQLite error code |
|
|
|
|
** otherwise. |
|
|
|
|
*/ |
|
|
|
|
SQLITE_API int sqlite3session_config(int op, void *pArg); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** CAPI3REF: Values for sqlite3session_config(). |
|
|
|
|
*/ |
|
|
|
|
#define SQLITE_SESSION_CONFIG_STRMSIZE 1 |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
** Make sure we can call this stuff from C++. |
|
|
|
|
@ -11112,12 +11259,8 @@ struct Fts5PhraseIter { |
|
|
|
|
** |
|
|
|
|
** Usually, output parameter *piPhrase is set to the phrase number, *piCol |
|
|
|
|
** to the column in which it occurs and *piOff the token offset of the |
|
|
|
|
** first token of the phrase. The exception is if the table was created |
|
|
|
|
** with the offsets=0 option specified. In this case *piOff is always |
|
|
|
|
** set to -1. |
|
|
|
|
** |
|
|
|
|
** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
|
|
|
|
|
** if an error occurs. |
|
|
|
|
** first token of the phrase. Returns SQLITE_OK if successful, or an error |
|
|
|
|
** code (i.e. SQLITE_NOMEM) if an error occurs. |
|
|
|
|
** |
|
|
|
|
** This API can be quite slow if used with an FTS5 table created with the |
|
|
|
|
** "detail=none" or "detail=column" option.
|
|
|
|
|
@ -11406,11 +11549,11 @@ struct Fts5ExtensionApi { |
|
|
|
|
** the tokenizer substitutes "first" for "1st" and the query works |
|
|
|
|
** as expected. |
|
|
|
|
** |
|
|
|
|
** <li> By adding multiple synonyms for a single term to the FTS index. |
|
|
|
|
** In this case, when tokenizing query text, the tokenizer may
|
|
|
|
|
** provide multiple synonyms for a single term within the document. |
|
|
|
|
** FTS5 then queries the index for each synonym individually. For |
|
|
|
|
** example, faced with the query: |
|
|
|
|
** <li> By querying the index for all synonyms of each query term |
|
|
|
|
** separately. In this case, when tokenizing query text, the |
|
|
|
|
** tokenizer may provide multiple synonyms for a single term
|
|
|
|
|
** within the document. FTS5 then queries the index for each
|
|
|
|
|
** synonym individually. For example, faced with the query: |
|
|
|
|
** |
|
|
|
|
** <codeblock> |
|
|
|
|
** ... MATCH 'first place'</codeblock> |
|
|
|
|
@ -11434,7 +11577,7 @@ struct Fts5ExtensionApi { |
|
|
|
|
** "place". |
|
|
|
|
** |
|
|
|
|
** This way, even if the tokenizer does not provide synonyms |
|
|
|
|
** when tokenizing query text (it should not - to do would be |
|
|
|
|
** when tokenizing query text (it should not - to do so would be |
|
|
|
|
** inefficient), it doesn't matter if the user queries for
|
|
|
|
|
** 'first + place' or '1st + place', as there are entries in the |
|
|
|
|
** FTS index corresponding to both forms of the first token. |
|
|
|
|
|