|
@@ -123,9 +123,9 @@ extern "C" {
|
|
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
|
*/
|
|
*/
|
|
|
-#define SQLITE_VERSION "3.26.0"
|
|
|
|
|
-#define SQLITE_VERSION_NUMBER 3026000
|
|
|
|
|
-#define SQLITE_SOURCE_ID "2018-10-11 02:39:11 7fbb083c5cf0948af3624b7538ffa086f77de27a3e84a7039ae7d6574f1aalt1"
|
|
|
|
|
|
|
+#define SQLITE_VERSION "3.28.0"
|
|
|
|
|
+#define SQLITE_VERSION_NUMBER 3028000
|
|
|
|
|
+#define SQLITE_SOURCE_ID "2019-04-13 04:38:32 07ee06fd390bfebebc014b47583d489747b0423bb96c810bed5c605ce0e3alt1"
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -189,6 +189,9 @@ SQLITE_API int sqlite3_libversion_number(void);
|
|
|
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
|
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
|
|
SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
|
|
SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
|
|
|
SQLITE_API const char *sqlite3_compileoption_get(int N);
|
|
SQLITE_API const char *sqlite3_compileoption_get(int N);
|
|
|
|
|
+#else
|
|
|
|
|
+# define sqlite3_compileoption_used(X) 0
|
|
|
|
|
+# define sqlite3_compileoption_get(X) ((void*)0)
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -825,6 +828,15 @@ struct sqlite3_io_methods {
|
|
|
** file space based on this hint in order to help writes to the database
|
|
** file space based on this hint in order to help writes to the database
|
|
|
** file run faster.
|
|
** 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]]
|
|
** <li>[[SQLITE_FCNTL_CHUNK_SIZE]]
|
|
|
** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS
|
|
** 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
|
|
** extends and truncates the database file in chunks of a size specified
|
|
@@ -1133,6 +1145,7 @@ struct sqlite3_io_methods {
|
|
|
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
|
|
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
|
|
|
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
|
|
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
|
|
|
#define SQLITE_FCNTL_DATA_VERSION 35
|
|
#define SQLITE_FCNTL_DATA_VERSION 35
|
|
|
|
|
+#define SQLITE_FCNTL_SIZE_LIMIT 36
|
|
|
|
|
|
|
|
/* deprecated names */
|
|
/* deprecated names */
|
|
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
@@ -1974,6 +1987,17 @@ struct sqlite3_mem_methods {
|
|
|
** negative value for this option restores the default behaviour.
|
|
** negative value for this option restores the default behaviour.
|
|
|
** This option is only available if SQLite is compiled with the
|
|
** This option is only available if SQLite is compiled with the
|
|
|
** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.
|
|
** [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>
|
|
** </dl>
|
|
|
*/
|
|
*/
|
|
|
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
|
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
|
@@ -2004,6 +2028,7 @@ struct sqlite3_mem_methods {
|
|
|
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
|
|
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
|
|
|
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
|
|
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
|
|
|
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
|
|
#define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */
|
|
|
|
|
+#define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Database Connection Configuration Options
|
|
** CAPI3REF: Database Connection Configuration Options
|
|
@@ -2019,6 +2044,7 @@ struct sqlite3_mem_methods {
|
|
|
** is invoked.
|
|
** is invoked.
|
|
|
**
|
|
**
|
|
|
** <dl>
|
|
** <dl>
|
|
|
|
|
+** [[SQLITE_DBCONFIG_LOOKASIDE]]
|
|
|
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
|
|
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
|
|
|
** <dd> ^This option takes three additional arguments that determine the
|
|
** <dd> ^This option takes three additional arguments that determine the
|
|
|
** [lookaside memory allocator] configuration for the [database connection].
|
|
** [lookaside memory allocator] configuration for the [database connection].
|
|
@@ -2041,6 +2067,7 @@ struct sqlite3_mem_methods {
|
|
|
** memory is in use leaves the configuration unchanged and returns
|
|
** memory is in use leaves the configuration unchanged and returns
|
|
|
** [SQLITE_BUSY].)^</dd>
|
|
** [SQLITE_BUSY].)^</dd>
|
|
|
**
|
|
**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
|
|
|
** <dd> ^This option is used to enable or disable the enforcement of
|
|
** <dd> ^This option is used to enable or disable the enforcement of
|
|
|
** [foreign key constraints]. There should be two additional arguments.
|
|
** [foreign key constraints]. There should be two additional arguments.
|
|
@@ -2051,6 +2078,7 @@ struct sqlite3_mem_methods {
|
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
|
** which case the FK enforcement setting is not reported back. </dd>
|
|
** which case the FK enforcement setting is not reported back. </dd>
|
|
|
**
|
|
**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]]
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
|
|
|
** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
|
|
** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
|
|
|
** There should be two additional arguments.
|
|
** There should be two additional arguments.
|
|
@@ -2061,9 +2089,10 @@ struct sqlite3_mem_methods {
|
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
|
** which case the trigger setting is not reported back. </dd>
|
|
** which case the trigger setting is not reported back. </dd>
|
|
|
**
|
|
**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
|
** <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
|
|
|
|
|
|
|
+** <dd> ^This option is used to enable or disable the
|
|
|
|
|
+** [fts3_tokenizer()] function which is part of the
|
|
|
** [FTS3] full-text search engine extension.
|
|
** [FTS3] full-text search engine extension.
|
|
|
** There should be two additional arguments.
|
|
** There should be two additional arguments.
|
|
|
** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
|
** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
|
@@ -2074,6 +2103,7 @@ struct sqlite3_mem_methods {
|
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
** following this call. The second parameter may be a NULL pointer, in
|
|
|
** which case the new setting is not reported back. </dd>
|
|
** which case the new setting is not reported back. </dd>
|
|
|
**
|
|
**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
|
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>
|
|
** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>
|
|
|
** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]
|
|
** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]
|
|
|
** interface independently of the [load_extension()] SQL function.
|
|
** interface independently of the [load_extension()] SQL function.
|
|
@@ -2091,7 +2121,7 @@ struct sqlite3_mem_methods {
|
|
|
** be a NULL pointer, in which case the new setting is not reported back.
|
|
** be a NULL pointer, in which case the new setting is not reported back.
|
|
|
** </dd>
|
|
** </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
|
|
** <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
|
|
** schema. ^The sole argument is a pointer to a constant UTF8 string
|
|
|
** which will become the new schema name in place of "main". ^SQLite
|
|
** which will become the new schema name in place of "main". ^SQLite
|
|
@@ -2100,6 +2130,7 @@ struct sqlite3_mem_methods {
|
|
|
** until after the database connection closes.
|
|
** until after the database connection closes.
|
|
|
** </dd>
|
|
** </dd>
|
|
|
**
|
|
**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
|
|
|
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
|
|
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
|
|
|
** <dd> Usually, when a database in wal mode is closed or detached from a
|
|
** <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
|
|
** database handle, SQLite checks if this will mean that there are now no
|
|
@@ -2113,7 +2144,7 @@ struct sqlite3_mem_methods {
|
|
|
** have been disabled - 0 if they are not disabled, 1 if they are.
|
|
** have been disabled - 0 if they are not disabled, 1 if they are.
|
|
|
** </dd>
|
|
** </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
|
|
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
|
|
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
|
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
|
|
** a single SQL query statement will always use the same algorithm regardless
|
|
** a single SQL query statement will always use the same algorithm regardless
|
|
@@ -2129,7 +2160,7 @@ struct sqlite3_mem_methods {
|
|
|
** following this call.
|
|
** following this call.
|
|
|
** </dd>
|
|
** </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
|
|
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
|
|
|
** include output for any operations performed by trigger programs. This
|
|
** include output for any operations performed by trigger programs. This
|
|
|
** option is used to set or clear (the default) a flag that governs this
|
|
** option is used to set or clear (the default) a flag that governs this
|
|
@@ -2141,7 +2172,7 @@ struct sqlite3_mem_methods {
|
|
|
** it is not disabled, 1 if it is.
|
|
** it is not disabled, 1 if it is.
|
|
|
** </dd>
|
|
** </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
|
|
** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run
|
|
|
** [VACUUM] in order to reset a database back to an empty database
|
|
** [VACUUM] in order to reset a database back to an empty database
|
|
|
** with no schema and no content. The following process works even for
|
|
** with no schema and no content. The following process works even for
|
|
@@ -2160,6 +2191,29 @@ struct sqlite3_mem_methods {
|
|
|
** Because resetting a database is destructive and irreversible, the
|
|
** Because resetting a database is destructive and irreversible, the
|
|
|
** process requires the use of this obscure API and multiple steps to help
|
|
** process requires the use of this obscure API and multiple steps to help
|
|
|
** ensure that it does not happen by accident.
|
|
** 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>
|
|
|
|
|
+**
|
|
|
|
|
+** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>
|
|
|
|
|
+** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the
|
|
|
|
|
+** "writable_schema" flag. This has the same effect and is logically equivalent
|
|
|
|
|
+** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF].
|
|
|
|
|
+** The first argument to this setting is an integer which is 0 to disable
|
|
|
|
|
+** the writable_schema, positive to enable writable_schema, or negative to
|
|
|
|
|
+** leave the setting unchanged. The second parameter is a pointer to an
|
|
|
|
|
+** integer into which is written 0 or 1 to indicate whether the writable_schema
|
|
|
|
|
+** is enabled or disabled following this call.
|
|
|
** </dd>
|
|
** </dd>
|
|
|
** </dl>
|
|
** </dl>
|
|
|
*/
|
|
*/
|
|
@@ -2173,7 +2227,9 @@ struct sqlite3_mem_methods {
|
|
|
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
|
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
|
|
|
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
|
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
|
|
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* 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_WRITABLE_SCHEMA 1011 /* int int* */
|
|
|
|
|
+#define SQLITE_DBCONFIG_MAX 1011 /* Largest DBCONFIG */
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
|
@@ -2330,7 +2386,7 @@ SQLITE_API int sqlite3_changes(sqlite3*);
|
|
|
** not. ^Changes to a view that are intercepted by INSTEAD OF triggers
|
|
** not. ^Changes to a view that are intercepted by INSTEAD OF triggers
|
|
|
** are not counted.
|
|
** are not counted.
|
|
|
**
|
|
**
|
|
|
-** This the [sqlite3_total_changes(D)] interface only reports the number
|
|
|
|
|
|
|
+** The [sqlite3_total_changes(D)] interface only reports the number
|
|
|
** of rows that changed due to SQL statement run against database
|
|
** of rows that changed due to SQL statement run against database
|
|
|
** connection D. Any changes by other database connections are ignored.
|
|
** connection D. Any changes by other database connections are ignored.
|
|
|
** To detect changes against a database file from other database
|
|
** To detect changes against a database file from other database
|
|
@@ -2989,12 +3045,14 @@ SQLITE_API int sqlite3_set_authorizer(
|
|
|
** time is in units of nanoseconds, however the current implementation
|
|
** time is in units of nanoseconds, however the current implementation
|
|
|
** is only capable of millisecond resolution so the six least significant
|
|
** is only capable of millisecond resolution so the six least significant
|
|
|
** digits in the time are meaningless. Future versions of SQLite
|
|
** 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.
|
|
|
|
|
-*/
|
|
|
|
|
-SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
|
|
|
|
|
-SQLITE_API void *sqlite3_trace_v0(sqlite3*, void(*xTrace)(void*,const char*), void*, int);
|
|
|
|
|
|
|
+** 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*);
|
|
|
|
|
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace_v0(sqlite3*,
|
|
|
|
|
+ void(*xTrace)(void*,const char*), void*, int);
|
|
|
SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
|
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
|
|
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
|
|
|
|
|
|
|
@@ -3407,6 +3465,8 @@ SQLITE_API void *sqlite3_get_db_user_data(sqlite3 *db);
|
|
|
** is not a database file pathname pointer that SQLite passed into the xOpen
|
|
** 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
|
|
** VFS method, then the behavior of this routine is undefined and probably
|
|
|
** undesirable.
|
|
** undesirable.
|
|
|
|
|
+**
|
|
|
|
|
+** See the [URI filename] documentation for additional information.
|
|
|
*/
|
|
*/
|
|
|
SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
|
|
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);
|
|
SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
|
|
@@ -3628,9 +3688,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
|
|
** on this hint by avoiding the use of [lookaside memory] so as not to
|
|
|
** deplete the limited store of lookaside memory. Future versions of
|
|
** deplete the limited store of lookaside memory. Future versions of
|
|
|
** SQLite may act on this hint differently.
|
|
** 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>
|
|
** </dl>
|
|
|
*/
|
|
*/
|
|
|
#define SQLITE_PREPARE_PERSISTENT 0x01
|
|
#define SQLITE_PREPARE_PERSISTENT 0x01
|
|
|
|
|
+#define SQLITE_PREPARE_NORMALIZE 0x02
|
|
|
|
|
+#define SQLITE_PREPARE_NO_VTAB 0x04
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Compiling An SQL Statement
|
|
** CAPI3REF: Compiling An SQL Statement
|
|
@@ -3788,6 +3863,11 @@ SQLITE_API int sqlite3_prepare16_v3(
|
|
|
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
|
|
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
|
|
|
** string containing the SQL text of prepared statement P with
|
|
** string containing the SQL text of prepared statement P with
|
|
|
** [bound parameters] expanded.
|
|
** [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
|
|
** ^(For example, if a prepared statement is created using the SQL
|
|
|
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
|
|
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
|
|
@@ -3803,14 +3883,16 @@ SQLITE_API int sqlite3_prepare16_v3(
|
|
|
** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
|
|
** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
|
|
|
** option causes sqlite3_expanded_sql() to always return NULL.
|
|
** 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,
|
|
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
|
|
|
** is obtained from [sqlite3_malloc()] and must be free by the application
|
|
** is obtained from [sqlite3_malloc()] and must be free by the application
|
|
|
** by passing it to [sqlite3_free()].
|
|
** by passing it to [sqlite3_free()].
|
|
|
*/
|
|
*/
|
|
|
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
|
|
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
|
|
|
SQLITE_API char *sqlite3_expanded_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
|
|
** CAPI3REF: Determine If An SQL Statement Writes The Database
|
|
@@ -3848,6 +3930,18 @@ SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
|
|
|
*/
|
|
*/
|
|
|
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
|
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
|
|
+** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
|
|
|
|
|
+** METHOD: sqlite3_stmt
|
|
|
|
|
+**
|
|
|
|
|
+** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the
|
|
|
|
|
+** prepared statement S is an EXPLAIN statement, or 2 if the
|
|
|
|
|
+** statement S is an EXPLAIN QUERY PLAN.
|
|
|
|
|
+** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is
|
|
|
|
|
+** an ordinary statement or a NULL pointer.
|
|
|
|
|
+*/
|
|
|
|
|
+SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
|
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
|
|
** METHOD: sqlite3_stmt
|
|
** METHOD: sqlite3_stmt
|
|
@@ -3987,7 +4081,9 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
** ^The fifth argument to the BLOB and string binding interfaces
|
|
** ^The fifth argument to the BLOB and string binding interfaces
|
|
|
** is a destructor used to dispose of the BLOB or
|
|
** is a destructor used to dispose of the BLOB or
|
|
|
** string after SQLite has finished with it. ^The destructor is called
|
|
** string after SQLite has finished with it. ^The destructor is called
|
|
|
-** to dispose of the BLOB or string even if the call to bind API fails.
|
|
|
|
|
|
|
+** to dispose of the BLOB or string even if the call to the bind API fails,
|
|
|
|
|
+** except the destructor is not called if the third parameter is a NULL
|
|
|
|
|
+** pointer or the fourth parameter is negative.
|
|
|
** ^If the fifth argument is
|
|
** ^If the fifth argument is
|
|
|
** the special value [SQLITE_STATIC], then SQLite assumes that the
|
|
** the special value [SQLITE_STATIC], then SQLite assumes that the
|
|
|
** information is in static, unmanaged space and does not need to be freed.
|
|
** information is in static, unmanaged space and does not need to be freed.
|
|
@@ -4904,6 +5000,8 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6
|
|
|
** <tr><td><b>sqlite3_value_nochange </b>
|
|
** <tr><td><b>sqlite3_value_nochange </b>
|
|
|
** <td>→ <td>True if the column is unchanged in an UPDATE
|
|
** <td>→ <td>True if the column is unchanged in an UPDATE
|
|
|
** against a virtual table.
|
|
** against a virtual table.
|
|
|
|
|
+** <tr><td><b>sqlite3_value_frombind </b>
|
|
|
|
|
+** <td>→ <td>True if value originated from a [bound parameter]
|
|
|
** </table></blockquote>
|
|
** </table></blockquote>
|
|
|
**
|
|
**
|
|
|
** <b>Details:</b>
|
|
** <b>Details:</b>
|
|
@@ -4965,6 +5063,11 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6
|
|
|
** than within an [xUpdate] method call for an UPDATE statement, then
|
|
** than within an [xUpdate] method call for an UPDATE statement, then
|
|
|
** the return value is arbitrary and meaningless.
|
|
** the return value is arbitrary and meaningless.
|
|
|
**
|
|
**
|
|
|
|
|
+** ^The sqlite3_value_frombind(X) interface returns non-zero if the
|
|
|
|
|
+** value X originated from one of the [sqlite3_bind_int|sqlite3_bind()]
|
|
|
|
|
+** interfaces. ^If X comes from an SQL literal value, or a table column,
|
|
|
|
|
+** and expression, then sqlite3_value_frombind(X) returns zero.
|
|
|
|
|
+**
|
|
|
** Please pay particular attention to the fact that the pointer returned
|
|
** Please pay particular attention to the fact that the pointer returned
|
|
|
** from [sqlite3_value_blob()], [sqlite3_value_text()], or
|
|
** from [sqlite3_value_blob()], [sqlite3_value_text()], or
|
|
|
** [sqlite3_value_text16()] can be invalidated by a subsequent call to
|
|
** [sqlite3_value_text16()] can be invalidated by a subsequent call to
|
|
@@ -5010,6 +5113,7 @@ SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
|
|
|
SQLITE_API int sqlite3_value_type(sqlite3_value*);
|
|
SQLITE_API int sqlite3_value_type(sqlite3_value*);
|
|
|
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
|
|
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
|
|
|
SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
|
SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
|
|
|
|
+SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Finding The Subtype Of SQL Values
|
|
** CAPI3REF: Finding The Subtype Of SQL Values
|
|
@@ -5746,7 +5850,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
|
|
** associated with database N of connection D. ^The main database file
|
|
** associated with database N of connection D. ^The main database file
|
|
|
** has the name "main". If there is no attached database N on the database
|
|
** has the name "main". If there is no attached database N on the database
|
|
|
** connection D, or if database N is a temporary or in-memory database, then
|
|
** connection D, or if database N is a temporary or in-memory database, then
|
|
|
-** a NULL pointer is returned.
|
|
|
|
|
|
|
+** this function will return either a NULL pointer or an empty string.
|
|
|
**
|
|
**
|
|
|
** ^The filename returned by this function is the output of the
|
|
** ^The filename returned by this function is the output of the
|
|
|
** xFullPathname method of the [VFS]. ^In other words, the filename
|
|
** xFullPathname method of the [VFS]. ^In other words, the filename
|
|
@@ -6301,6 +6405,9 @@ struct sqlite3_module {
|
|
|
int (*xSavepoint)(sqlite3_vtab *pVTab, int);
|
|
int (*xSavepoint)(sqlite3_vtab *pVTab, int);
|
|
|
int (*xRelease)(sqlite3_vtab *pVTab, int);
|
|
int (*xRelease)(sqlite3_vtab *pVTab, int);
|
|
|
int (*xRollbackTo)(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*);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -7223,6 +7330,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
|
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
|
|
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
|
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
|
|
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
|
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
|
|
|
|
+#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
|
|
|
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
|
|
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
|
|
|
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
|
|
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
|
|
|
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
|
|
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
|
|
@@ -8635,6 +8743,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
** can use to customize and optimize their behavior.
|
|
** can use to customize and optimize their behavior.
|
|
|
**
|
|
**
|
|
|
** <dl>
|
|
** <dl>
|
|
|
|
|
+** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]]
|
|
|
** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
|
|
** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
|
|
|
** <dd>Calls of the form
|
|
** <dd>Calls of the form
|
|
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,
|
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,
|
|
@@ -9404,7 +9513,7 @@ struct sqlite3_rtree_query_info {
|
|
|
sqlite3_int64 iRowid; /* Rowid for current entry */
|
|
sqlite3_int64 iRowid; /* Rowid for current entry */
|
|
|
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
|
|
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
|
|
|
int eParentWithin; /* Visibility 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 */
|
|
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
|
|
|
/* The following fields are only available in 3.8.11 and later */
|
|
/* The following fields are only available in 3.8.11 and later */
|
|
|
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
|
|
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
|
|
@@ -9900,12 +10009,38 @@ SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
|
|
|
** consecutively. There is no chance that the iterator will visit a change
|
|
** 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
|
|
** the applies to table X, then one for table Y, and then later on visit
|
|
|
** another change for table X.
|
|
** 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(
|
|
SQLITE_API int sqlite3changeset_start(
|
|
|
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
|
|
|
int nChangeset, /* Size of changeset blob in bytes */
|
|
int nChangeset, /* Size of changeset blob in bytes */
|
|
|
const void *pChangeset /* Pointer to blob containing changeset */
|
|
const 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
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -9949,7 +10084,7 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|
|
** sqlite3changeset_next() is called on the iterator or until the
|
|
** sqlite3changeset_next() is called on the iterator or until the
|
|
|
** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
|
|
** 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
|
|
** 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
|
|
** is an indirect change, or false (0) otherwise. See the documentation for
|
|
|
** [sqlite3session_indirect()] for a description of direct and indirect
|
|
** [sqlite3session_indirect()] for a description of direct and indirect
|
|
|
** changes. Finally, if pOp is not NULL, then *pOp is set to one of
|
|
** changes. Finally, if pOp is not NULL, then *pOp is set to one of
|
|
@@ -10560,7 +10695,7 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
),
|
|
),
|
|
|
void *pCtx, /* First argument passed to xConflict */
|
|
void *pCtx, /* First argument passed to xConflict */
|
|
|
void **ppRebase, int *pnRebase, /* OUT: Rebase data */
|
|
void **ppRebase, int *pnRebase, /* OUT: Rebase data */
|
|
|
- int flags /* Combination of SESSION_APPLY_* flags */
|
|
|
|
|
|
|
+ int flags /* SESSION_CHANGESETAPPLY_* flags */
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -10578,8 +10713,14 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
** causes the sessions module to omit this savepoint. In this case, if the
|
|
** 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,
|
|
** caller has an open transaction or savepoint when apply_v2() is called,
|
|
|
** it may revert the partially applied changeset by rolling it back.
|
|
** 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_NOSAVEPOINT 0x0001
|
|
|
|
|
+#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
@@ -10810,7 +10951,7 @@ SQLITE_API int sqlite3rebaser_configure(
|
|
|
** in size. This function allocates and populates a buffer with a copy
|
|
** in size. This function allocates and populates a buffer with a copy
|
|
|
** of the changeset rebased rebased according to the configuration of the
|
|
** of the changeset rebased rebased according to the configuration of the
|
|
|
** rebaser object passed as the first argument. If successful, (*ppOut)
|
|
** rebaser object passed as the first argument. If successful, (*ppOut)
|
|
|
-** is set to point to the new buffer containing the rebased changset and
|
|
|
|
|
|
|
+** is set to point to the new buffer containing the rebased changeset and
|
|
|
** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the
|
|
** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the
|
|
|
** responsibility of the caller to eventually free the new buffer using
|
|
** responsibility of the caller to eventually free the new buffer using
|
|
|
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
|
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
|
@@ -10973,6 +11114,12 @@ SQLITE_API int sqlite3changeset_start_strm(
|
|
|
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
int (*xInput)(void *pIn, void *pData, int *pnData),
|
|
|
void *pIn
|
|
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(
|
|
SQLITE_API int sqlite3session_changeset_strm(
|
|
|
sqlite3_session *pSession,
|
|
sqlite3_session *pSession,
|
|
|
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
int (*xOutput)(void *pOut, const void *pData, int nData),
|
|
@@ -10999,6 +11146,45 @@ SQLITE_API int sqlite3rebaser_rebase_strm(
|
|
|
void *pOut
|
|
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++.
|
|
** Make sure we can call this stuff from C++.
|
|
@@ -11132,12 +11318,8 @@ struct Fts5PhraseIter {
|
|
|
**
|
|
**
|
|
|
** Usually, output parameter *piPhrase is set to the phrase number, *piCol
|
|
** 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
|
|
** 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
|
|
** This API can be quite slow if used with an FTS5 table created with the
|
|
|
** "detail=none" or "detail=column" option.
|
|
** "detail=none" or "detail=column" option.
|
|
@@ -11178,7 +11360,7 @@ struct Fts5PhraseIter {
|
|
|
** Save the pointer passed as the second argument as the extension functions
|
|
** Save the pointer passed as the second argument as the extension functions
|
|
|
** "auxiliary data". The pointer may then be retrieved by the current or any
|
|
** "auxiliary data". The pointer may then be retrieved by the current or any
|
|
|
** future invocation of the same fts5 extension function made as part of
|
|
** future invocation of the same fts5 extension function made as part of
|
|
|
-** of the same MATCH query using the xGetAuxdata() API.
|
|
|
|
|
|
|
+** the same MATCH query using the xGetAuxdata() API.
|
|
|
**
|
|
**
|
|
|
** Each extension function is allocated a single auxiliary data slot for
|
|
** Each extension function is allocated a single auxiliary data slot for
|
|
|
** each FTS query (MATCH expression). If the extension function is invoked
|
|
** each FTS query (MATCH expression). If the extension function is invoked
|
|
@@ -11193,7 +11375,7 @@ struct Fts5PhraseIter {
|
|
|
** The xDelete callback, if one is specified, is also invoked on the
|
|
** The xDelete callback, if one is specified, is also invoked on the
|
|
|
** auxiliary data pointer after the FTS5 query has finished.
|
|
** auxiliary data pointer after the FTS5 query has finished.
|
|
|
**
|
|
**
|
|
|
-** If an error (e.g. an OOM condition) occurs within this function, an
|
|
|
|
|
|
|
+** If an error (e.g. an OOM condition) occurs within this function,
|
|
|
** the auxiliary data is set to NULL and an error code returned. If the
|
|
** the auxiliary data is set to NULL and an error code returned. If the
|
|
|
** xDelete parameter was not NULL, it is invoked on the auxiliary data
|
|
** xDelete parameter was not NULL, it is invoked on the auxiliary data
|
|
|
** pointer before returning.
|
|
** pointer before returning.
|
|
@@ -11426,11 +11608,11 @@ struct Fts5ExtensionApi {
|
|
|
** the tokenizer substitutes "first" for "1st" and the query works
|
|
** the tokenizer substitutes "first" for "1st" and the query works
|
|
|
** as expected.
|
|
** 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>
|
|
** <codeblock>
|
|
|
** ... MATCH 'first place'</codeblock>
|
|
** ... MATCH 'first place'</codeblock>
|
|
@@ -11454,7 +11636,7 @@ struct Fts5ExtensionApi {
|
|
|
** "place".
|
|
** "place".
|
|
|
**
|
|
**
|
|
|
** This way, even if the tokenizer does not provide synonyms
|
|
** 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
|
|
** inefficient), it doesn't matter if the user queries for
|
|
|
** 'first + place' or '1st + place', as there are entries in the
|
|
** 'first + place' or '1st + place', as there are entries in the
|
|
|
** FTS index corresponding to both forms of the first token.
|
|
** FTS index corresponding to both forms of the first token.
|