cordova-sqlite-evmax-build-free 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS.md +1 -0
- package/CHANGES.md +38 -0
- package/LICENSE.md +2 -2
- package/README.md +30 -2
- package/SQLitePlugin.coffee.md +25 -7
- package/package.json +2 -2
- package/plugin.xml +4 -4
- package/spec/package.json +8 -1
- package/spec/www/index.html +1 -0
- package/spec/www/spec/android-db-location-test.js +327 -0
- package/spec/www/spec/db-tx-sql-features-test.js +21 -0
- package/spec/www/spec/db-tx-sql-select-value-test.js +2 -2
- package/spec/www/spec/sqlite-version-test.js +1 -1
- package/src/android/io/sqlc/SQLitePlugin.java +52 -23
- package/src/deps/android/sqlc-evmax-ndk-driver.jar +0 -0
- package/src/deps/common/sqlite3.c +12235 -4947
- package/src/deps/common/sqlite3.h +382 -149
- package/src/windows/SQLite3-WinRT-sync/SQLite3/SQLite3.Shared.vcxitems +1 -1
- package/src/windows/libs/x64/SQLite3.UWP.dll +0 -0
- package/src/windows/libs/x64/SQLite3.winmd +0 -0
- package/src/windows/libs/x86/SQLite3.UWP.dll +0 -0
- package/src/windows/libs/x86/SQLite3.winmd +0 -0
- package/www/SQLitePlugin.js +28 -9
- package/src/windows/libs/x86/BarcodeComponent.winmd +0 -0
- /package/src/windows/libs/{x64 → dummy}/BarcodeComponent.winmd +0 -0
|
@@ -146,9 +146,9 @@ extern "C" {
|
|
|
146
146
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
147
147
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
148
148
|
*/
|
|
149
|
-
#define SQLITE_VERSION "3.
|
|
150
|
-
#define SQLITE_VERSION_NUMBER
|
|
151
|
-
#define SQLITE_SOURCE_ID "
|
|
149
|
+
#define SQLITE_VERSION "3.43.0"
|
|
150
|
+
#define SQLITE_VERSION_NUMBER 3043000
|
|
151
|
+
#define SQLITE_SOURCE_ID "2023-08-24 12:36:59 0f80b798b3f4b81a7bb4233c58294edd0f1156f36b6ecf5ab8e83631d468778c"
|
|
152
152
|
|
|
153
153
|
/*
|
|
154
154
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -528,6 +528,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
528
528
|
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
|
|
529
529
|
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
|
|
530
530
|
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
|
|
531
|
+
#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8))
|
|
531
532
|
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
|
532
533
|
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
|
|
533
534
|
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
|
@@ -563,6 +564,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
563
564
|
#define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8))
|
|
564
565
|
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8))
|
|
565
566
|
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
|
|
567
|
+
#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8))
|
|
566
568
|
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
|
|
567
569
|
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
|
|
568
570
|
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
|
|
@@ -1175,7 +1177,6 @@ struct sqlite3_io_methods {
|
|
|
1175
1177
|
** in wal mode after the client has finished copying pages from the wal
|
|
1176
1178
|
** file to the database file, but before the *-shm file is updated to
|
|
1177
1179
|
** record the fact that the pages have been checkpointed.
|
|
1178
|
-
** </ul>
|
|
1179
1180
|
**
|
|
1180
1181
|
** <li>[[SQLITE_FCNTL_EXTERNAL_READER]]
|
|
1181
1182
|
** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect
|
|
@@ -1188,10 +1189,16 @@ struct sqlite3_io_methods {
|
|
|
1188
1189
|
** the database is not a wal-mode db, or if there is no such connection in any
|
|
1189
1190
|
** other process. This opcode cannot be used to detect transactions opened
|
|
1190
1191
|
** by clients within the current process, only within other processes.
|
|
1191
|
-
** </ul>
|
|
1192
1192
|
**
|
|
1193
1193
|
** <li>[[SQLITE_FCNTL_CKSM_FILE]]
|
|
1194
|
-
**
|
|
1194
|
+
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the
|
|
1195
|
+
** [checksum VFS shim] only.
|
|
1196
|
+
**
|
|
1197
|
+
** <li>[[SQLITE_FCNTL_RESET_CACHE]]
|
|
1198
|
+
** If there is currently no transaction open on the database, and the
|
|
1199
|
+
** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control
|
|
1200
|
+
** purges the contents of the in-memory page cache. If there is an open
|
|
1201
|
+
** transaction, or if the db is a temp-db, this opcode is a no-op, not an error.
|
|
1195
1202
|
** </ul>
|
|
1196
1203
|
*/
|
|
1197
1204
|
#define SQLITE_FCNTL_LOCKSTATE 1
|
|
@@ -1234,6 +1241,7 @@ struct sqlite3_io_methods {
|
|
|
1234
1241
|
#define SQLITE_FCNTL_CKPT_START 39
|
|
1235
1242
|
#define SQLITE_FCNTL_EXTERNAL_READER 40
|
|
1236
1243
|
#define SQLITE_FCNTL_CKSM_FILE 41
|
|
1244
|
+
#define SQLITE_FCNTL_RESET_CACHE 42
|
|
1237
1245
|
|
|
1238
1246
|
/* deprecated names */
|
|
1239
1247
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
@@ -1648,20 +1656,23 @@ SQLITE_API int sqlite3_os_end(void);
|
|
|
1648
1656
|
** must ensure that no other SQLite interfaces are invoked by other
|
|
1649
1657
|
** threads while sqlite3_config() is running.</b>
|
|
1650
1658
|
**
|
|
1651
|
-
** The sqlite3_config() interface
|
|
1652
|
-
** may only be invoked prior to library initialization using
|
|
1653
|
-
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
|
|
1654
|
-
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
|
|
1655
|
-
** [sqlite3_shutdown()] then it will return SQLITE_MISUSE.
|
|
1656
|
-
** Note, however, that ^sqlite3_config() can be called as part of the
|
|
1657
|
-
** implementation of an application-defined [sqlite3_os_init()].
|
|
1658
|
-
**
|
|
1659
1659
|
** The first argument to sqlite3_config() is an integer
|
|
1660
1660
|
** [configuration option] that determines
|
|
1661
1661
|
** what property of SQLite is to be configured. Subsequent arguments
|
|
1662
1662
|
** vary depending on the [configuration option]
|
|
1663
1663
|
** in the first argument.
|
|
1664
1664
|
**
|
|
1665
|
+
** For most configuration options, the sqlite3_config() interface
|
|
1666
|
+
** may only be invoked prior to library initialization using
|
|
1667
|
+
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
|
|
1668
|
+
** The exceptional configuration options that may be invoked at any time
|
|
1669
|
+
** are called "anytime configuration options".
|
|
1670
|
+
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
|
|
1671
|
+
** [sqlite3_shutdown()] with a first argument that is not an anytime
|
|
1672
|
+
** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE.
|
|
1673
|
+
** Note, however, that ^sqlite3_config() can be called as part of the
|
|
1674
|
+
** implementation of an application-defined [sqlite3_os_init()].
|
|
1675
|
+
**
|
|
1665
1676
|
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
|
|
1666
1677
|
** ^If the option is unknown or SQLite is unable to set the option
|
|
1667
1678
|
** then this routine returns a non-zero [error code].
|
|
@@ -1769,6 +1780,23 @@ struct sqlite3_mem_methods {
|
|
|
1769
1780
|
** These constants are the available integer configuration options that
|
|
1770
1781
|
** can be passed as the first argument to the [sqlite3_config()] interface.
|
|
1771
1782
|
**
|
|
1783
|
+
** Most of the configuration options for sqlite3_config()
|
|
1784
|
+
** will only work if invoked prior to [sqlite3_initialize()] or after
|
|
1785
|
+
** [sqlite3_shutdown()]. The few exceptions to this rule are called
|
|
1786
|
+
** "anytime configuration options".
|
|
1787
|
+
** ^Calling [sqlite3_config()] with a first argument that is not an
|
|
1788
|
+
** anytime configuration option in between calls to [sqlite3_initialize()] and
|
|
1789
|
+
** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE.
|
|
1790
|
+
**
|
|
1791
|
+
** The set of anytime configuration options can change (by insertions
|
|
1792
|
+
** and/or deletions) from one release of SQLite to the next.
|
|
1793
|
+
** As of SQLite version 3.42.0, the complete set of anytime configuration
|
|
1794
|
+
** options is:
|
|
1795
|
+
** <ul>
|
|
1796
|
+
** <li> SQLITE_CONFIG_LOG
|
|
1797
|
+
** <li> SQLITE_CONFIG_PCACHE_HDRSZ
|
|
1798
|
+
** </ul>
|
|
1799
|
+
**
|
|
1772
1800
|
** New configuration options may be added in future releases of SQLite.
|
|
1773
1801
|
** Existing configuration options might be discontinued. Applications
|
|
1774
1802
|
** should check the return code from [sqlite3_config()] to make sure that
|
|
@@ -2115,28 +2143,28 @@ struct sqlite3_mem_methods {
|
|
|
2115
2143
|
** compile-time option is not set, then the default maximum is 1073741824.
|
|
2116
2144
|
** </dl>
|
|
2117
2145
|
*/
|
|
2118
|
-
#define SQLITE_CONFIG_SINGLETHREAD
|
|
2119
|
-
#define SQLITE_CONFIG_MULTITHREAD
|
|
2120
|
-
#define SQLITE_CONFIG_SERIALIZED
|
|
2121
|
-
#define SQLITE_CONFIG_MALLOC
|
|
2122
|
-
#define SQLITE_CONFIG_GETMALLOC
|
|
2123
|
-
#define SQLITE_CONFIG_SCRATCH
|
|
2124
|
-
#define SQLITE_CONFIG_PAGECACHE
|
|
2125
|
-
#define SQLITE_CONFIG_HEAP
|
|
2126
|
-
#define SQLITE_CONFIG_MEMSTATUS
|
|
2127
|
-
#define SQLITE_CONFIG_MUTEX
|
|
2128
|
-
#define SQLITE_CONFIG_GETMUTEX
|
|
2129
|
-
/* previously SQLITE_CONFIG_CHUNKALLOC
|
|
2130
|
-
#define SQLITE_CONFIG_LOOKASIDE
|
|
2131
|
-
#define SQLITE_CONFIG_PCACHE
|
|
2132
|
-
#define SQLITE_CONFIG_GETPCACHE
|
|
2133
|
-
#define SQLITE_CONFIG_LOG
|
|
2134
|
-
#define SQLITE_CONFIG_URI
|
|
2135
|
-
#define SQLITE_CONFIG_PCACHE2
|
|
2136
|
-
#define SQLITE_CONFIG_GETPCACHE2
|
|
2146
|
+
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
|
2147
|
+
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
|
|
2148
|
+
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
|
|
2149
|
+
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
|
|
2150
|
+
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
|
|
2151
|
+
#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
|
|
2152
|
+
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
|
|
2153
|
+
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
|
|
2154
|
+
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
|
|
2155
|
+
#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */
|
|
2156
|
+
#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */
|
|
2157
|
+
/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
|
|
2158
|
+
#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */
|
|
2159
|
+
#define SQLITE_CONFIG_PCACHE 14 /* no-op */
|
|
2160
|
+
#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */
|
|
2161
|
+
#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */
|
|
2162
|
+
#define SQLITE_CONFIG_URI 17 /* int */
|
|
2163
|
+
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
|
|
2164
|
+
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
|
|
2137
2165
|
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
|
|
2138
|
-
#define SQLITE_CONFIG_SQLLOG
|
|
2139
|
-
#define SQLITE_CONFIG_MMAP_SIZE
|
|
2166
|
+
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
|
|
2167
|
+
#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */
|
|
2140
2168
|
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
|
|
2141
2169
|
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
|
|
2142
2170
|
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
|
|
@@ -2177,7 +2205,7 @@ struct sqlite3_mem_methods {
|
|
|
2177
2205
|
** configuration for a database connection can only be changed when that
|
|
2178
2206
|
** connection is not currently using lookaside memory, or in other words
|
|
2179
2207
|
** when the "current value" returned by
|
|
2180
|
-
** [sqlite3_db_status](D,[
|
|
2208
|
+
** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
|
|
2181
2209
|
** Any attempt to change the lookaside memory configuration when lookaside
|
|
2182
2210
|
** memory is in use leaves the configuration unchanged and returns
|
|
2183
2211
|
** [SQLITE_BUSY].)^</dd>
|
|
@@ -2327,8 +2355,12 @@ struct sqlite3_mem_methods {
|
|
|
2327
2355
|
** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0);
|
|
2328
2356
|
** </ol>
|
|
2329
2357
|
** Because resetting a database is destructive and irreversible, the
|
|
2330
|
-
** process requires the use of this obscure API and multiple steps to
|
|
2331
|
-
** ensure that it does not happen by accident.
|
|
2358
|
+
** process requires the use of this obscure API and multiple steps to
|
|
2359
|
+
** help ensure that it does not happen by accident. Because this
|
|
2360
|
+
** feature must be capable of resetting corrupt databases, and
|
|
2361
|
+
** shutting down virtual tables may require access to that corrupt
|
|
2362
|
+
** storage, the library must abandon any installed virtual tables
|
|
2363
|
+
** without calling their xDestroy() methods.
|
|
2332
2364
|
**
|
|
2333
2365
|
** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>
|
|
2334
2366
|
** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the
|
|
@@ -2367,7 +2399,7 @@ struct sqlite3_mem_methods {
|
|
|
2367
2399
|
** </dd>
|
|
2368
2400
|
**
|
|
2369
2401
|
** [[SQLITE_DBCONFIG_DQS_DML]]
|
|
2370
|
-
** <dt>SQLITE_DBCONFIG_DQS_DML</
|
|
2402
|
+
** <dt>SQLITE_DBCONFIG_DQS_DML</dt>
|
|
2371
2403
|
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates
|
|
2372
2404
|
** the legacy [double-quoted string literal] misfeature for DML statements
|
|
2373
2405
|
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The
|
|
@@ -2376,7 +2408,7 @@ struct sqlite3_mem_methods {
|
|
|
2376
2408
|
** </dd>
|
|
2377
2409
|
**
|
|
2378
2410
|
** [[SQLITE_DBCONFIG_DQS_DDL]]
|
|
2379
|
-
** <dt>SQLITE_DBCONFIG_DQS_DDL</
|
|
2411
|
+
** <dt>SQLITE_DBCONFIG_DQS_DDL</dt>
|
|
2380
2412
|
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates
|
|
2381
2413
|
** the legacy [double-quoted string literal] misfeature for DDL statements,
|
|
2382
2414
|
** such as CREATE TABLE and CREATE INDEX. The
|
|
@@ -2385,7 +2417,7 @@ struct sqlite3_mem_methods {
|
|
|
2385
2417
|
** </dd>
|
|
2386
2418
|
**
|
|
2387
2419
|
** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]]
|
|
2388
|
-
** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</
|
|
2420
|
+
** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</dt>
|
|
2389
2421
|
** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to
|
|
2390
2422
|
** assume that database schemas are untainted by malicious content.
|
|
2391
2423
|
** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite
|
|
@@ -2405,7 +2437,7 @@ struct sqlite3_mem_methods {
|
|
|
2405
2437
|
** </dd>
|
|
2406
2438
|
**
|
|
2407
2439
|
** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]]
|
|
2408
|
-
** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</
|
|
2440
|
+
** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt>
|
|
2409
2441
|
** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates
|
|
2410
2442
|
** the legacy file format flag. When activated, this flag causes all newly
|
|
2411
2443
|
** created database file to have a schema format version number (the 4-byte
|
|
@@ -2414,7 +2446,7 @@ struct sqlite3_mem_methods {
|
|
|
2414
2446
|
** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting,
|
|
2415
2447
|
** newly created databases are generally not understandable by SQLite versions
|
|
2416
2448
|
** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there
|
|
2417
|
-
** is now scarcely any need to
|
|
2449
|
+
** is now scarcely any need to generate database files that are compatible
|
|
2418
2450
|
** all the way back to version 3.0.0, and so this setting is of little
|
|
2419
2451
|
** practical use, but is provided so that SQLite can continue to claim the
|
|
2420
2452
|
** ability to generate new database files that are compatible with version
|
|
@@ -2423,8 +2455,40 @@ struct sqlite3_mem_methods {
|
|
|
2423
2455
|
** the [VACUUM] command will fail with an obscure error when attempting to
|
|
2424
2456
|
** process a table with generated columns and a descending index. This is
|
|
2425
2457
|
** not considered a bug since SQLite versions 3.3.0 and earlier do not support
|
|
2426
|
-
** either generated columns or
|
|
2458
|
+
** either generated columns or descending indexes.
|
|
2459
|
+
** </dd>
|
|
2460
|
+
**
|
|
2461
|
+
** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]
|
|
2462
|
+
** <dt>SQLITE_DBCONFIG_STMT_SCANSTATUS</dt>
|
|
2463
|
+
** <dd>The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in
|
|
2464
|
+
** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears
|
|
2465
|
+
** a flag that enables collection of the sqlite3_stmt_scanstatus_v2()
|
|
2466
|
+
** statistics. For statistics to be collected, the flag must be set on
|
|
2467
|
+
** the database handle both when the SQL statement is prepared and when it
|
|
2468
|
+
** is stepped. The flag is set (collection of statistics is enabled)
|
|
2469
|
+
** by default. This option takes two arguments: an integer and a pointer to
|
|
2470
|
+
** an integer.. The first argument is 1, 0, or -1 to enable, disable, or
|
|
2471
|
+
** leave unchanged the statement scanstatus option. If the second argument
|
|
2472
|
+
** is not NULL, then the value of the statement scanstatus setting after
|
|
2473
|
+
** processing the first argument is written into the integer that the second
|
|
2474
|
+
** argument points to.
|
|
2475
|
+
** </dd>
|
|
2476
|
+
**
|
|
2477
|
+
** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]]
|
|
2478
|
+
** <dt>SQLITE_DBCONFIG_REVERSE_SCANORDER</dt>
|
|
2479
|
+
** <dd>The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order
|
|
2480
|
+
** in which tables and indexes are scanned so that the scans start at the end
|
|
2481
|
+
** and work toward the beginning rather than starting at the beginning and
|
|
2482
|
+
** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the
|
|
2483
|
+
** same as setting [PRAGMA reverse_unordered_selects]. This option takes
|
|
2484
|
+
** two arguments which are an integer and a pointer to an integer. The first
|
|
2485
|
+
** argument is 1, 0, or -1 to enable, disable, or leave unchanged the
|
|
2486
|
+
** reverse scan order flag, respectively. If the second argument is not NULL,
|
|
2487
|
+
** then 0 or 1 is written into the integer that the second argument points to
|
|
2488
|
+
** depending on if the reverse scan order flag is set after processing the
|
|
2489
|
+
** first argument.
|
|
2427
2490
|
** </dd>
|
|
2491
|
+
**
|
|
2428
2492
|
** </dl>
|
|
2429
2493
|
*/
|
|
2430
2494
|
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
|
@@ -2445,7 +2509,9 @@ struct sqlite3_mem_methods {
|
|
|
2445
2509
|
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */
|
|
2446
2510
|
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */
|
|
2447
2511
|
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
|
|
2448
|
-
#define
|
|
2512
|
+
#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
|
|
2513
|
+
#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
|
|
2514
|
+
#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
|
|
2449
2515
|
|
|
2450
2516
|
/*
|
|
2451
2517
|
** CAPI3REF: Enable Or Disable Extended Result Codes
|
|
@@ -2667,8 +2733,13 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
|
|
|
2667
2733
|
** ^A call to sqlite3_interrupt(D) that occurs when there are no running
|
|
2668
2734
|
** SQL statements is a no-op and has no effect on SQL statements
|
|
2669
2735
|
** that are started after the sqlite3_interrupt() call returns.
|
|
2736
|
+
**
|
|
2737
|
+
** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether
|
|
2738
|
+
** or not an interrupt is currently in effect for [database connection] D.
|
|
2739
|
+
** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
|
|
2670
2740
|
*/
|
|
2671
2741
|
SQLITE_API void sqlite3_interrupt(sqlite3*);
|
|
2742
|
+
SQLITE_API int sqlite3_is_interrupted(sqlite3*);
|
|
2672
2743
|
|
|
2673
2744
|
/*
|
|
2674
2745
|
** CAPI3REF: Determine If An SQL Statement Is Complete
|
|
@@ -3286,8 +3357,8 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
|
3286
3357
|
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
|
|
3287
3358
|
** information as is provided by the [sqlite3_profile()] callback.
|
|
3288
3359
|
** ^The P argument is a pointer to the [prepared statement] and the
|
|
3289
|
-
** X argument points to a 64-bit integer which is
|
|
3290
|
-
** the number of
|
|
3360
|
+
** X argument points to a 64-bit integer which is approximately
|
|
3361
|
+
** the number of nanoseconds that the prepared statement took to run.
|
|
3291
3362
|
** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes.
|
|
3292
3363
|
**
|
|
3293
3364
|
** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt>
|
|
@@ -3319,8 +3390,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|
|
3319
3390
|
** M argument should be the bitwise OR-ed combination of
|
|
3320
3391
|
** zero or more [SQLITE_TRACE] constants.
|
|
3321
3392
|
**
|
|
3322
|
-
** ^Each call to either sqlite3_trace() or sqlite3_trace_v2()
|
|
3323
|
-
** (cancels)
|
|
3393
|
+
** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
|
|
3394
|
+
** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
|
|
3395
|
+
** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
|
|
3396
|
+
** database connection may have at most one trace callback.
|
|
3324
3397
|
**
|
|
3325
3398
|
** ^The X callback is invoked whenever any of the events identified by
|
|
3326
3399
|
** mask M occur. ^The integer return value from the callback is currently
|
|
@@ -3350,7 +3423,7 @@ SQLITE_API int sqlite3_trace_v2(
|
|
|
3350
3423
|
**
|
|
3351
3424
|
** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
|
|
3352
3425
|
** function X to be invoked periodically during long running calls to
|
|
3353
|
-
** [
|
|
3426
|
+
** [sqlite3_step()] and [sqlite3_prepare()] and similar for
|
|
3354
3427
|
** database connection D. An example use for this
|
|
3355
3428
|
** interface is to keep a GUI updated during a large query.
|
|
3356
3429
|
**
|
|
@@ -3375,6 +3448,13 @@ SQLITE_API int sqlite3_trace_v2(
|
|
|
3375
3448
|
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
|
|
3376
3449
|
** database connections for the meaning of "modify" in this paragraph.
|
|
3377
3450
|
**
|
|
3451
|
+
** The progress handler callback would originally only be invoked from the
|
|
3452
|
+
** bytecode engine. It still might be invoked during [sqlite3_prepare()]
|
|
3453
|
+
** and similar because those routines might force a reparse of the schema
|
|
3454
|
+
** which involves running the bytecode engine. However, beginning with
|
|
3455
|
+
** SQLite version 3.41.0, the progress handler callback might also be
|
|
3456
|
+
** invoked directly from [sqlite3_prepare()] while analyzing and generating
|
|
3457
|
+
** code for complex queries.
|
|
3378
3458
|
*/
|
|
3379
3459
|
SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
3380
3460
|
|
|
@@ -3411,13 +3491,18 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|
|
3411
3491
|
**
|
|
3412
3492
|
** <dl>
|
|
3413
3493
|
** ^(<dt>[SQLITE_OPEN_READONLY]</dt>
|
|
3414
|
-
** <dd>The database is opened in read-only mode. If the database does
|
|
3415
|
-
** already exist, an error is returned.</dd>)^
|
|
3494
|
+
** <dd>The database is opened in read-only mode. If the database does
|
|
3495
|
+
** not already exist, an error is returned.</dd>)^
|
|
3416
3496
|
**
|
|
3417
3497
|
** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>
|
|
3418
|
-
** <dd>The database is opened for reading and writing if possible, or
|
|
3419
|
-
** only if the file is write protected by the operating
|
|
3420
|
-
** case the database must already exist, otherwise
|
|
3498
|
+
** <dd>The database is opened for reading and writing if possible, or
|
|
3499
|
+
** reading only if the file is write protected by the operating
|
|
3500
|
+
** system. In either case the database must already exist, otherwise
|
|
3501
|
+
** an error is returned. For historical reasons, if opening in
|
|
3502
|
+
** read-write mode fails due to OS-level permissions, an attempt is
|
|
3503
|
+
** made to open it in read-only mode. [sqlite3_db_readonly()] can be
|
|
3504
|
+
** used to determine whether the database is actually
|
|
3505
|
+
** read-write.</dd>)^
|
|
3421
3506
|
**
|
|
3422
3507
|
** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
|
|
3423
3508
|
** <dd>The database is opened for reading and writing, and is created if
|
|
@@ -3677,7 +3762,7 @@ SQLITE_API int sqlite3_open_v2(
|
|
|
3677
3762
|
** as F) must be one of:
|
|
3678
3763
|
** <ul>
|
|
3679
3764
|
** <li> A database filename pointer created by the SQLite core and
|
|
3680
|
-
** passed into the xOpen() method of a VFS
|
|
3765
|
+
** passed into the xOpen() method of a VFS implementation, or
|
|
3681
3766
|
** <li> A filename obtained from [sqlite3_db_filename()], or
|
|
3682
3767
|
** <li> A new filename constructed using [sqlite3_create_filename()].
|
|
3683
3768
|
** </ul>
|
|
@@ -3790,7 +3875,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
|
|
3790
3875
|
/*
|
|
3791
3876
|
** CAPI3REF: Create and Destroy VFS Filenames
|
|
3792
3877
|
**
|
|
3793
|
-
** These
|
|
3878
|
+
** These interfaces are provided for use by [VFS shim] implementations and
|
|
3794
3879
|
** are not useful outside of that context.
|
|
3795
3880
|
**
|
|
3796
3881
|
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
|
|
@@ -4337,6 +4422,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
|
|
4337
4422
|
*/
|
|
4338
4423
|
SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
|
4339
4424
|
|
|
4425
|
+
/*
|
|
4426
|
+
** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement
|
|
4427
|
+
** METHOD: sqlite3_stmt
|
|
4428
|
+
**
|
|
4429
|
+
** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN
|
|
4430
|
+
** setting for [prepared statement] S. If E is zero, then S becomes
|
|
4431
|
+
** a normal prepared statement. If E is 1, then S behaves as if
|
|
4432
|
+
** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if
|
|
4433
|
+
** its SQL text began with "[EXPLAIN QUERY PLAN]".
|
|
4434
|
+
**
|
|
4435
|
+
** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.
|
|
4436
|
+
** SQLite tries to avoid a reprepare, but a reprepare might be necessary
|
|
4437
|
+
** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.
|
|
4438
|
+
**
|
|
4439
|
+
** Because of the potential need to reprepare, a call to
|
|
4440
|
+
** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be
|
|
4441
|
+
** reprepared because it was created using [sqlite3_prepare()] instead of
|
|
4442
|
+
** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and
|
|
4443
|
+
** hence has no saved SQL text with which to reprepare.
|
|
4444
|
+
**
|
|
4445
|
+
** Changing the explain setting for a prepared statement does not change
|
|
4446
|
+
** the original SQL text for the statement. Hence, if the SQL text originally
|
|
4447
|
+
** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)
|
|
4448
|
+
** is called to convert the statement into an ordinary statement, the EXPLAIN
|
|
4449
|
+
** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)
|
|
4450
|
+
** output, even though the statement now acts like a normal SQL statement.
|
|
4451
|
+
**
|
|
4452
|
+
** This routine returns SQLITE_OK if the explain mode is successfully
|
|
4453
|
+
** changed, or an error code if the explain mode could not be changed.
|
|
4454
|
+
** The explain mode cannot be changed while a statement is active.
|
|
4455
|
+
** Hence, it is good practice to call [sqlite3_reset(S)]
|
|
4456
|
+
** immediately prior to calling sqlite3_stmt_explain(S,E).
|
|
4457
|
+
*/
|
|
4458
|
+
SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
|
|
4459
|
+
|
|
4340
4460
|
/*
|
|
4341
4461
|
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
|
4342
4462
|
** METHOD: sqlite3_stmt
|
|
@@ -4500,7 +4620,7 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4500
4620
|
** with it may be passed. ^It is called to dispose of the BLOB or string even
|
|
4501
4621
|
** if the call to the bind API fails, except the destructor is not called if
|
|
4502
4622
|
** the third parameter is a NULL pointer or the fourth parameter is negative.
|
|
4503
|
-
** ^ (2) The special constant, [SQLITE_STATIC], may be
|
|
4623
|
+
** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that
|
|
4504
4624
|
** the application remains responsible for disposing of the object. ^In this
|
|
4505
4625
|
** case, the object and the provided pointer to it must remain valid until
|
|
4506
4626
|
** either the prepared statement is finalized or the same SQL parameter is
|
|
@@ -5179,14 +5299,26 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
|
|
5179
5299
|
** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
|
|
5180
5300
|
** back to the beginning of its program.
|
|
5181
5301
|
**
|
|
5182
|
-
** ^
|
|
5183
|
-
**
|
|
5184
|
-
**
|
|
5185
|
-
**
|
|
5302
|
+
** ^The return code from [sqlite3_reset(S)] indicates whether or not
|
|
5303
|
+
** the previous evaluation of prepared statement S completed successfully.
|
|
5304
|
+
** ^If [sqlite3_step(S)] has never before been called on S or if
|
|
5305
|
+
** [sqlite3_step(S)] has not been called since the previous call
|
|
5306
|
+
** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return
|
|
5307
|
+
** [SQLITE_OK].
|
|
5186
5308
|
**
|
|
5187
5309
|
** ^If the most recent call to [sqlite3_step(S)] for the
|
|
5188
5310
|
** [prepared statement] S indicated an error, then
|
|
5189
5311
|
** [sqlite3_reset(S)] returns an appropriate [error code].
|
|
5312
|
+
** ^The [sqlite3_reset(S)] interface might also return an [error code]
|
|
5313
|
+
** if there were no prior errors but the process of resetting
|
|
5314
|
+
** the prepared statement caused a new error. ^For example, if an
|
|
5315
|
+
** [INSERT] statement with a [RETURNING] clause is only stepped one time,
|
|
5316
|
+
** that one call to [sqlite3_step(S)] might return SQLITE_ROW but
|
|
5317
|
+
** the overall statement might still fail and the [sqlite3_reset(S)] call
|
|
5318
|
+
** might return SQLITE_BUSY if locking constraints prevent the
|
|
5319
|
+
** database change from committing. Therefore, it is important that
|
|
5320
|
+
** applications check the return code from [sqlite3_reset(S)] even if
|
|
5321
|
+
** no prior call to [sqlite3_step(S)] indicated a problem.
|
|
5190
5322
|
**
|
|
5191
5323
|
** ^The [sqlite3_reset(S)] interface does not change the values
|
|
5192
5324
|
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
|
|
@@ -5398,10 +5530,21 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5398
5530
|
** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in
|
|
5399
5531
|
** schema structures such as [CHECK constraints], [DEFAULT clauses],
|
|
5400
5532
|
** [expression indexes], [partial indexes], or [generated columns].
|
|
5401
|
-
**
|
|
5402
|
-
**
|
|
5403
|
-
**
|
|
5404
|
-
** information.
|
|
5533
|
+
** <p>
|
|
5534
|
+
** The SQLITE_DIRECTONLY flag is recommended for any
|
|
5535
|
+
** [application-defined SQL function]
|
|
5536
|
+
** that has side-effects or that could potentially leak sensitive information.
|
|
5537
|
+
** This will prevent attacks in which an application is tricked
|
|
5538
|
+
** into using a database file that has had its schema surreptitiously
|
|
5539
|
+
** modified to invoke the application-defined function in ways that are
|
|
5540
|
+
** harmful.
|
|
5541
|
+
** <p>
|
|
5542
|
+
** Some people say it is good practice to set SQLITE_DIRECTONLY on all
|
|
5543
|
+
** [application-defined SQL functions], regardless of whether or not they
|
|
5544
|
+
** are security sensitive, as doing so prevents those functions from being used
|
|
5545
|
+
** inside of the database schema, and thus ensures that the database
|
|
5546
|
+
** can be inspected and modified using generic tools (such as the [CLI])
|
|
5547
|
+
** that do not have access to the application-defined functions.
|
|
5405
5548
|
** </dd>
|
|
5406
5549
|
**
|
|
5407
5550
|
** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd>
|
|
@@ -5542,16 +5685,6 @@ SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int6
|
|
|
5542
5685
|
** then the conversion is performed. Otherwise no conversion occurs.
|
|
5543
5686
|
** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
|
|
5544
5687
|
**
|
|
5545
|
-
** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8],
|
|
5546
|
-
** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current encoding
|
|
5547
|
-
** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
|
|
5548
|
-
** returns something other than SQLITE_TEXT, then the return value from
|
|
5549
|
-
** sqlite3_value_encoding(X) is meaningless. ^Calls to
|
|
5550
|
-
** sqlite3_value_text(X), sqlite3_value_text16(X), sqlite3_value_text16be(X),
|
|
5551
|
-
** sqlite3_value_text16le(X), sqlite3_value_bytes(X), or
|
|
5552
|
-
** sqlite3_value_bytes16(X) might change the encoding of the value X and
|
|
5553
|
-
** thus change the return from subsequent calls to sqlite3_value_encoding(X).
|
|
5554
|
-
**
|
|
5555
5688
|
** ^Within the [xUpdate] method of a [virtual table], the
|
|
5556
5689
|
** sqlite3_value_nochange(X) interface returns true if and only if
|
|
5557
5690
|
** the column corresponding to X is unchanged by the UPDATE operation
|
|
@@ -5616,6 +5749,27 @@ SQLITE_API int sqlite3_value_type(sqlite3_value*);
|
|
|
5616
5749
|
SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
|
|
5617
5750
|
SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
|
5618
5751
|
SQLITE_API int sqlite3_value_frombind(sqlite3_value*);
|
|
5752
|
+
|
|
5753
|
+
/*
|
|
5754
|
+
** CAPI3REF: Report the internal text encoding state of an sqlite3_value object
|
|
5755
|
+
** METHOD: sqlite3_value
|
|
5756
|
+
**
|
|
5757
|
+
** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8],
|
|
5758
|
+
** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding
|
|
5759
|
+
** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X)
|
|
5760
|
+
** returns something other than SQLITE_TEXT, then the return value from
|
|
5761
|
+
** sqlite3_value_encoding(X) is meaningless. ^Calls to
|
|
5762
|
+
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)],
|
|
5763
|
+
** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or
|
|
5764
|
+
** [sqlite3_value_bytes16(X)] might change the encoding of the value X and
|
|
5765
|
+
** thus change the return from subsequent calls to sqlite3_value_encoding(X).
|
|
5766
|
+
**
|
|
5767
|
+
** This routine is intended for used by applications that test and validate
|
|
5768
|
+
** the SQLite implementation. This routine is inquiring about the opaque
|
|
5769
|
+
** internal state of an [sqlite3_value] object. Ordinary applications should
|
|
5770
|
+
** not need to know what the internal state of an sqlite3_value object is and
|
|
5771
|
+
** hence should not need to use this interface.
|
|
5772
|
+
*/
|
|
5619
5773
|
SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
|
5620
5774
|
|
|
5621
5775
|
/*
|
|
@@ -6152,6 +6306,13 @@ SQLITE_API void sqlite3_activate_cerod(
|
|
|
6152
6306
|
** of the default VFS is not implemented correctly, or not implemented at
|
|
6153
6307
|
** all, then the behavior of sqlite3_sleep() may deviate from the description
|
|
6154
6308
|
** in the previous paragraphs.
|
|
6309
|
+
**
|
|
6310
|
+
** If a negative argument is passed to sqlite3_sleep() the results vary by
|
|
6311
|
+
** VFS and operating system. Some system treat a negative argument as an
|
|
6312
|
+
** instruction to sleep forever. Others understand it to mean do not sleep
|
|
6313
|
+
** at all. ^In SQLite version 3.42.0 and later, a negative
|
|
6314
|
+
** argument passed into sqlite3_sleep() is changed to zero before it is relayed
|
|
6315
|
+
** down into the xSleep method of the VFS.
|
|
6155
6316
|
*/
|
|
6156
6317
|
SQLITE_API int sqlite3_sleep(int);
|
|
6157
6318
|
|
|
@@ -6996,15 +7157,6 @@ SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
|
|
|
6996
7157
|
*/
|
|
6997
7158
|
SQLITE_API void sqlite3_reset_auto_extension(void);
|
|
6998
7159
|
|
|
6999
|
-
/*
|
|
7000
|
-
** The interface to the virtual-table mechanism is currently considered
|
|
7001
|
-
** to be experimental. The interface might change in incompatible ways.
|
|
7002
|
-
** If this is a problem for you, do not use the interface at this time.
|
|
7003
|
-
**
|
|
7004
|
-
** When the virtual-table mechanism stabilizes, we will declare the
|
|
7005
|
-
** interface fixed, support it indefinitely, and remove this comment.
|
|
7006
|
-
*/
|
|
7007
|
-
|
|
7008
7160
|
/*
|
|
7009
7161
|
** Structures used by the virtual table interface
|
|
7010
7162
|
*/
|
|
@@ -7123,10 +7275,10 @@ struct sqlite3_module {
|
|
|
7123
7275
|
** when the omit flag is true there is no guarantee that the constraint will
|
|
7124
7276
|
** not be checked again using byte code.)^
|
|
7125
7277
|
**
|
|
7126
|
-
** ^The idxNum and
|
|
7278
|
+
** ^The idxNum and idxStr values are recorded and passed into the
|
|
7127
7279
|
** [xFilter] method.
|
|
7128
|
-
** ^[sqlite3_free()] is used to free
|
|
7129
|
-
**
|
|
7280
|
+
** ^[sqlite3_free()] is used to free idxStr if and only if
|
|
7281
|
+
** needToFreeIdxStr is true.
|
|
7130
7282
|
**
|
|
7131
7283
|
** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
|
|
7132
7284
|
** the correct order to satisfy the ORDER BY clause so that no separate
|
|
@@ -7246,7 +7398,7 @@ struct sqlite3_index_info {
|
|
|
7246
7398
|
** the [sqlite3_vtab_collation()] interface. For most real-world virtual
|
|
7247
7399
|
** tables, the collating sequence of constraints does not matter (for example
|
|
7248
7400
|
** because the constraints are numeric) and so the sqlite3_vtab_collation()
|
|
7249
|
-
** interface is
|
|
7401
|
+
** interface is not commonly needed.
|
|
7250
7402
|
*/
|
|
7251
7403
|
#define SQLITE_INDEX_CONSTRAINT_EQ 2
|
|
7252
7404
|
#define SQLITE_INDEX_CONSTRAINT_GT 4
|
|
@@ -7405,16 +7557,6 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
|
|
|
7405
7557
|
*/
|
|
7406
7558
|
SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
|
|
7407
7559
|
|
|
7408
|
-
/*
|
|
7409
|
-
** The interface to the virtual-table mechanism defined above (back up
|
|
7410
|
-
** to a comment remarkably similar to this one) is currently considered
|
|
7411
|
-
** to be experimental. The interface might change in incompatible ways.
|
|
7412
|
-
** If this is a problem for you, do not use the interface at this time.
|
|
7413
|
-
**
|
|
7414
|
-
** When the virtual-table mechanism stabilizes, we will declare the
|
|
7415
|
-
** interface fixed, support it indefinitely, and remove this comment.
|
|
7416
|
-
*/
|
|
7417
|
-
|
|
7418
7560
|
/*
|
|
7419
7561
|
** CAPI3REF: A Handle To An Open BLOB
|
|
7420
7562
|
** KEYWORDS: {BLOB handle} {BLOB handles}
|
|
@@ -7798,9 +7940,9 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
|
7798
7940
|
** is undefined if the mutex is not currently entered by the
|
|
7799
7941
|
** calling thread or is not currently allocated.
|
|
7800
7942
|
**
|
|
7801
|
-
** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(),
|
|
7802
|
-
** sqlite3_mutex_leave() is a NULL pointer,
|
|
7803
|
-
**
|
|
7943
|
+
** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(),
|
|
7944
|
+
** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer,
|
|
7945
|
+
** then any of the four routines behaves as a no-op.
|
|
7804
7946
|
**
|
|
7805
7947
|
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
|
|
7806
7948
|
*/
|
|
@@ -8070,7 +8212,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8070
8212
|
#define SQLITE_TESTCTRL_TRACEFLAGS 31
|
|
8071
8213
|
#define SQLITE_TESTCTRL_TUNE 32
|
|
8072
8214
|
#define SQLITE_TESTCTRL_LOGEST 33
|
|
8073
|
-
#define
|
|
8215
|
+
#define SQLITE_TESTCTRL_USELONGDOUBLE 34
|
|
8216
|
+
#define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
|
|
8074
8217
|
|
|
8075
8218
|
/*
|
|
8076
8219
|
** CAPI3REF: SQL Keyword Checking
|
|
@@ -9102,8 +9245,8 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9102
9245
|
** blocked connection already has a registered unlock-notify callback,
|
|
9103
9246
|
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
|
|
9104
9247
|
** called with a NULL pointer as its second argument, then any existing
|
|
9105
|
-
** unlock-notify callback is
|
|
9106
|
-
** unlock-notify callback may also be
|
|
9248
|
+
** unlock-notify callback is cancelled. ^The blocked connections
|
|
9249
|
+
** unlock-notify callback may also be cancelled by closing the blocked
|
|
9107
9250
|
** connection using [sqlite3_close()].
|
|
9108
9251
|
**
|
|
9109
9252
|
** The unlock-notify callback is not reentrant. If an application invokes
|
|
@@ -9526,7 +9669,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
9526
9669
|
** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>
|
|
9527
9670
|
** <dd>Calls of the form
|
|
9528
9671
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the
|
|
9529
|
-
** the [xConnect] or [xCreate] methods of a [virtual table]
|
|
9672
|
+
** the [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
9530
9673
|
** prohibits that virtual table from being used from within triggers and
|
|
9531
9674
|
** views.
|
|
9532
9675
|
** </dd>
|
|
@@ -9534,18 +9677,28 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
9534
9677
|
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
|
|
9535
9678
|
** <dd>Calls of the form
|
|
9536
9679
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
|
|
9537
|
-
** the [xConnect] or [xCreate] methods of a [virtual table]
|
|
9680
|
+
** the [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
9538
9681
|
** identify that virtual table as being safe to use from within triggers
|
|
9539
9682
|
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
|
|
9540
9683
|
** virtual table can do no serious harm even if it is controlled by a
|
|
9541
9684
|
** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS
|
|
9542
9685
|
** flag unless absolutely necessary.
|
|
9543
9686
|
** </dd>
|
|
9687
|
+
**
|
|
9688
|
+
** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]<dt>SQLITE_VTAB_USES_ALL_SCHEMAS</dt>
|
|
9689
|
+
** <dd>Calls of the form
|
|
9690
|
+
** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the
|
|
9691
|
+
** the [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
9692
|
+
** instruct the query planner to begin at least a read transaction on
|
|
9693
|
+
** all schemas ("main", "temp", and any ATTACH-ed databases) whenever the
|
|
9694
|
+
** virtual table is used.
|
|
9695
|
+
** </dd>
|
|
9544
9696
|
** </dl>
|
|
9545
9697
|
*/
|
|
9546
9698
|
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1
|
|
9547
9699
|
#define SQLITE_VTAB_INNOCUOUS 2
|
|
9548
9700
|
#define SQLITE_VTAB_DIRECTONLY 3
|
|
9701
|
+
#define SQLITE_VTAB_USES_ALL_SCHEMAS 4
|
|
9549
9702
|
|
|
9550
9703
|
/*
|
|
9551
9704
|
** CAPI3REF: Determine The Virtual Table Conflict Policy
|
|
@@ -9618,7 +9771,7 @@ SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*);
|
|
|
9618
9771
|
** <li><p> Otherwise, "BINARY" is returned.
|
|
9619
9772
|
** </ol>
|
|
9620
9773
|
*/
|
|
9621
|
-
SQLITE_API
|
|
9774
|
+
SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
9622
9775
|
|
|
9623
9776
|
/*
|
|
9624
9777
|
** CAPI3REF: Determine if a virtual table query is DISTINCT
|
|
@@ -9706,7 +9859,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
|
|
|
9706
9859
|
** communicated to the xBestIndex method as a
|
|
9707
9860
|
** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use
|
|
9708
9861
|
** this constraint, it must set the corresponding
|
|
9709
|
-
** aConstraintUsage[].argvIndex to a
|
|
9862
|
+
** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under
|
|
9710
9863
|
** the usual mode of handling IN operators, SQLite generates [bytecode]
|
|
9711
9864
|
** that invokes the [xFilter|xFilter() method] once for each value
|
|
9712
9865
|
** on the right-hand side of the IN operator.)^ Thus the virtual table
|
|
@@ -9775,21 +9928,20 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
|
9775
9928
|
** is undefined and probably harmful.
|
|
9776
9929
|
**
|
|
9777
9930
|
** The X parameter in a call to sqlite3_vtab_in_first(X,P) or
|
|
9778
|
-
** sqlite3_vtab_in_next(X,P)
|
|
9931
|
+
** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
|
|
9779
9932
|
** xFilter method which invokes these routines, and specifically
|
|
9780
9933
|
** a parameter that was previously selected for all-at-once IN constraint
|
|
9781
9934
|
** processing use the [sqlite3_vtab_in()] interface in the
|
|
9782
9935
|
** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
|
|
9783
9936
|
** an xFilter argument that was selected for all-at-once IN constraint
|
|
9784
|
-
** processing, then these routines return [
|
|
9785
|
-
** exhibit some other undefined or harmful behavior.
|
|
9937
|
+
** processing, then these routines return [SQLITE_ERROR].)^
|
|
9786
9938
|
**
|
|
9787
9939
|
** ^(Use these routines to access all values on the right-hand side
|
|
9788
9940
|
** of the IN constraint using code like the following:
|
|
9789
9941
|
**
|
|
9790
9942
|
** <blockquote><pre>
|
|
9791
9943
|
** for(rc=sqlite3_vtab_in_first(pList, &pVal);
|
|
9792
|
-
** rc==SQLITE_OK && pVal
|
|
9944
|
+
** rc==SQLITE_OK && pVal;
|
|
9793
9945
|
** rc=sqlite3_vtab_in_next(pList, &pVal)
|
|
9794
9946
|
** ){
|
|
9795
9947
|
** // do something with pVal
|
|
@@ -9887,6 +10039,10 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
9887
10039
|
** managed by the prepared statement S and will be automatically freed when
|
|
9888
10040
|
** S is finalized.
|
|
9889
10041
|
**
|
|
10042
|
+
** Not all values are available for all query elements. When a value is
|
|
10043
|
+
** not available, the output variable is set to -1 if the value is numeric,
|
|
10044
|
+
** or to NULL if it is a string (SQLITE_SCANSTAT_NAME).
|
|
10045
|
+
**
|
|
9890
10046
|
** <dl>
|
|
9891
10047
|
** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt>
|
|
9892
10048
|
** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be
|
|
@@ -9914,12 +10070,24 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
9914
10070
|
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
|
|
9915
10071
|
** description for the X-th loop.
|
|
9916
10072
|
**
|
|
9917
|
-
** [[SQLITE_SCANSTAT_SELECTID]] <dt>
|
|
10073
|
+
** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
|
|
9918
10074
|
** <dd>^The "int" variable pointed to by the V parameter will be set to the
|
|
9919
|
-
**
|
|
9920
|
-
**
|
|
9921
|
-
**
|
|
9922
|
-
**
|
|
10075
|
+
** id for the X-th query plan element. The id value is unique within the
|
|
10076
|
+
** statement. The select-id is the same value as is output in the first
|
|
10077
|
+
** column of an [EXPLAIN QUERY PLAN] query.
|
|
10078
|
+
**
|
|
10079
|
+
** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
|
|
10080
|
+
** <dd>The "int" variable pointed to by the V parameter will be set to the
|
|
10081
|
+
** the id of the parent of the current query element, if applicable, or
|
|
10082
|
+
** to zero if the query element has no parent. This is the same value as
|
|
10083
|
+
** returned in the second column of an [EXPLAIN QUERY PLAN] query.
|
|
10084
|
+
**
|
|
10085
|
+
** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
|
|
10086
|
+
** <dd>The sqlite3_int64 output value is set to the number of cycles,
|
|
10087
|
+
** according to the processor time-stamp counter, that elapsed while the
|
|
10088
|
+
** query element was being processed. This value is not available for
|
|
10089
|
+
** all query elements - if it is unavailable the output variable is
|
|
10090
|
+
** set to -1.
|
|
9923
10091
|
** </dl>
|
|
9924
10092
|
*/
|
|
9925
10093
|
#define SQLITE_SCANSTAT_NLOOP 0
|
|
@@ -9928,12 +10096,14 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
9928
10096
|
#define SQLITE_SCANSTAT_NAME 3
|
|
9929
10097
|
#define SQLITE_SCANSTAT_EXPLAIN 4
|
|
9930
10098
|
#define SQLITE_SCANSTAT_SELECTID 5
|
|
10099
|
+
#define SQLITE_SCANSTAT_PARENTID 6
|
|
10100
|
+
#define SQLITE_SCANSTAT_NCYCLE 7
|
|
9931
10101
|
|
|
9932
10102
|
/*
|
|
9933
10103
|
** CAPI3REF: Prepared Statement Scan Status
|
|
9934
10104
|
** METHOD: sqlite3_stmt
|
|
9935
10105
|
**
|
|
9936
|
-
**
|
|
10106
|
+
** These interfaces return information about the predicted and measured
|
|
9937
10107
|
** performance for pStmt. Advanced applications can use this
|
|
9938
10108
|
** interface to compare the predicted and the measured performance and
|
|
9939
10109
|
** issue warnings and/or rerun [ANALYZE] if discrepancies are found.
|
|
@@ -9944,19 +10114,25 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
9944
10114
|
**
|
|
9945
10115
|
** The "iScanStatusOp" parameter determines which status information to return.
|
|
9946
10116
|
** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior
|
|
9947
|
-
** of this interface is undefined.
|
|
9948
|
-
**
|
|
9949
|
-
**
|
|
9950
|
-
**
|
|
9951
|
-
**
|
|
9952
|
-
**
|
|
9953
|
-
**
|
|
9954
|
-
**
|
|
9955
|
-
**
|
|
9956
|
-
**
|
|
9957
|
-
**
|
|
9958
|
-
**
|
|
9959
|
-
**
|
|
10117
|
+
** of this interface is undefined. ^The requested measurement is written into
|
|
10118
|
+
** a variable pointed to by the "pOut" parameter.
|
|
10119
|
+
**
|
|
10120
|
+
** The "flags" parameter must be passed a mask of flags. At present only
|
|
10121
|
+
** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX
|
|
10122
|
+
** is specified, then status information is available for all elements
|
|
10123
|
+
** of a query plan that are reported by "EXPLAIN QUERY PLAN" output. If
|
|
10124
|
+
** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements
|
|
10125
|
+
** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of
|
|
10126
|
+
** the EXPLAIN QUERY PLAN output) are available. Invoking API
|
|
10127
|
+
** sqlite3_stmt_scanstatus() is equivalent to calling
|
|
10128
|
+
** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
|
|
10129
|
+
**
|
|
10130
|
+
** Parameter "idx" identifies the specific query element to retrieve statistics
|
|
10131
|
+
** for. Query elements are numbered starting from zero. A value of -1 may be
|
|
10132
|
+
** to query for statistics regarding the entire query. ^If idx is out of range
|
|
10133
|
+
** - less than -1 or greater than or equal to the total number of query
|
|
10134
|
+
** elements used to implement the statement - a non-zero value is returned and
|
|
10135
|
+
** the variable that pOut points to is unchanged.
|
|
9960
10136
|
**
|
|
9961
10137
|
** See also: [sqlite3_stmt_scanstatus_reset()]
|
|
9962
10138
|
*/
|
|
@@ -9966,6 +10142,19 @@ SQLITE_API int sqlite3_stmt_scanstatus(
|
|
|
9966
10142
|
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
9967
10143
|
void *pOut /* Result written here */
|
|
9968
10144
|
);
|
|
10145
|
+
SQLITE_API int sqlite3_stmt_scanstatus_v2(
|
|
10146
|
+
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
|
|
10147
|
+
int idx, /* Index of loop to report on */
|
|
10148
|
+
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
|
|
10149
|
+
int flags, /* Mask of flags defined below */
|
|
10150
|
+
void *pOut /* Result written here */
|
|
10151
|
+
);
|
|
10152
|
+
|
|
10153
|
+
/*
|
|
10154
|
+
** CAPI3REF: Prepared Statement Scan Status
|
|
10155
|
+
** KEYWORDS: {scan status flags}
|
|
10156
|
+
*/
|
|
10157
|
+
#define SQLITE_SCANSTAT_COMPLEX 0x0001
|
|
9969
10158
|
|
|
9970
10159
|
/*
|
|
9971
10160
|
** CAPI3REF: Zero Scan-Status Counters
|
|
@@ -10056,6 +10245,10 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
10056
10245
|
** function is not defined for operations on WITHOUT ROWID tables, or for
|
|
10057
10246
|
** DELETE operations on rowid tables.
|
|
10058
10247
|
**
|
|
10248
|
+
** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from
|
|
10249
|
+
** the previous call on the same [database connection] D, or NULL for
|
|
10250
|
+
** the first call on D.
|
|
10251
|
+
**
|
|
10059
10252
|
** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()],
|
|
10060
10253
|
** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces
|
|
10061
10254
|
** provide additional information about a preupdate event. These routines
|
|
@@ -10095,7 +10288,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
10095
10288
|
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
|
10096
10289
|
** the pre-update hook is invoked with SQLITE_DELETE. This is because the
|
|
10097
10290
|
** in this case the new values are not available. In this case, when a
|
|
10098
|
-
** callback made with op==SQLITE_DELETE is
|
|
10291
|
+
** callback made with op==SQLITE_DELETE is actually a write using the
|
|
10099
10292
|
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
|
10100
10293
|
** the index of the column being written. In other cases, where the
|
|
10101
10294
|
** pre-update hook is being invoked for some other reason, including a
|
|
@@ -10461,6 +10654,19 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10461
10654
|
# undef double
|
|
10462
10655
|
#endif
|
|
10463
10656
|
|
|
10657
|
+
#if defined(__wasi__)
|
|
10658
|
+
# undef SQLITE_WASI
|
|
10659
|
+
# define SQLITE_WASI 1
|
|
10660
|
+
# undef SQLITE_OMIT_WAL
|
|
10661
|
+
# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
|
|
10662
|
+
# ifndef SQLITE_OMIT_LOAD_EXTENSION
|
|
10663
|
+
# define SQLITE_OMIT_LOAD_EXTENSION
|
|
10664
|
+
# endif
|
|
10665
|
+
# ifndef SQLITE_THREADSAFE
|
|
10666
|
+
# define SQLITE_THREADSAFE 0
|
|
10667
|
+
# endif
|
|
10668
|
+
#endif
|
|
10669
|
+
|
|
10464
10670
|
#ifdef __cplusplus
|
|
10465
10671
|
} /* End of the 'extern "C"' block */
|
|
10466
10672
|
#endif
|
|
@@ -10667,16 +10873,20 @@ SQLITE_API int sqlite3session_create(
|
|
|
10667
10873
|
SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|
10668
10874
|
|
|
10669
10875
|
/*
|
|
10670
|
-
**
|
|
10876
|
+
** CAPI3REF: Configure a Session Object
|
|
10671
10877
|
** METHOD: sqlite3_session
|
|
10672
10878
|
**
|
|
10673
10879
|
** This method is used to configure a session object after it has been
|
|
10674
|
-
** created. At present the only valid
|
|
10675
|
-
** [SQLITE_SESSION_OBJCONFIG_SIZE].
|
|
10880
|
+
** created. At present the only valid values for the second parameter are
|
|
10881
|
+
** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID].
|
|
10676
10882
|
**
|
|
10677
|
-
|
|
10883
|
+
*/
|
|
10884
|
+
SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg);
|
|
10885
|
+
|
|
10886
|
+
/*
|
|
10887
|
+
** CAPI3REF: Options for sqlite3session_object_config
|
|
10678
10888
|
**
|
|
10679
|
-
** The following values may passed as the the
|
|
10889
|
+
** The following values may passed as the the 2nd parameter to
|
|
10680
10890
|
** sqlite3session_object_config().
|
|
10681
10891
|
**
|
|
10682
10892
|
** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd>
|
|
@@ -10692,12 +10902,21 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|
|
10692
10902
|
**
|
|
10693
10903
|
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
|
|
10694
10904
|
** the first table has been attached to the session object.
|
|
10905
|
+
**
|
|
10906
|
+
** <dt>SQLITE_SESSION_OBJCONFIG_ROWID <dd>
|
|
10907
|
+
** This option is used to set, clear or query the flag that enables
|
|
10908
|
+
** collection of data for tables with no explicit PRIMARY KEY.
|
|
10909
|
+
**
|
|
10910
|
+
** Normally, tables with no explicit PRIMARY KEY are simply ignored
|
|
10911
|
+
** by the sessions module. However, if this flag is set, it behaves
|
|
10912
|
+
** as if such tables have a column "_rowid_ INTEGER PRIMARY KEY" inserted
|
|
10913
|
+
** as their leftmost columns.
|
|
10914
|
+
**
|
|
10915
|
+
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after
|
|
10916
|
+
** the first table has been attached to the session object.
|
|
10695
10917
|
*/
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
/*
|
|
10699
|
-
*/
|
|
10700
|
-
#define SQLITE_SESSION_OBJCONFIG_SIZE 1
|
|
10918
|
+
#define SQLITE_SESSION_OBJCONFIG_SIZE 1
|
|
10919
|
+
#define SQLITE_SESSION_OBJCONFIG_ROWID 2
|
|
10701
10920
|
|
|
10702
10921
|
/*
|
|
10703
10922
|
** CAPI3REF: Enable Or Disable A Session Object
|
|
@@ -11830,9 +12049,23 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
11830
12049
|
** Invert the changeset before applying it. This is equivalent to inverting
|
|
11831
12050
|
** a changeset using sqlite3changeset_invert() before applying it. It is
|
|
11832
12051
|
** an error to specify this flag with a patchset.
|
|
12052
|
+
**
|
|
12053
|
+
** <dt>SQLITE_CHANGESETAPPLY_IGNORENOOP <dd>
|
|
12054
|
+
** Do not invoke the conflict handler callback for any changes that
|
|
12055
|
+
** would not actually modify the database even if they were applied.
|
|
12056
|
+
** Specifically, this means that the conflict handler is not invoked
|
|
12057
|
+
** for:
|
|
12058
|
+
** <ul>
|
|
12059
|
+
** <li>a delete change if the row being deleted cannot be found,
|
|
12060
|
+
** <li>an update change if the modified fields are already set to
|
|
12061
|
+
** their new values in the conflicting row, or
|
|
12062
|
+
** <li>an insert change if all fields of the conflicting row match
|
|
12063
|
+
** the row being inserted.
|
|
12064
|
+
** </ul>
|
|
11833
12065
|
*/
|
|
11834
12066
|
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
|
|
11835
12067
|
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
|
12068
|
+
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
|
|
11836
12069
|
|
|
11837
12070
|
/*
|
|
11838
12071
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
@@ -12573,7 +12806,7 @@ struct Fts5PhraseIter {
|
|
|
12573
12806
|
** See xPhraseFirstColumn above.
|
|
12574
12807
|
*/
|
|
12575
12808
|
struct Fts5ExtensionApi {
|
|
12576
|
-
int iVersion; /* Currently always set to
|
|
12809
|
+
int iVersion; /* Currently always set to 2 */
|
|
12577
12810
|
|
|
12578
12811
|
void *(*xUserData)(Fts5Context*);
|
|
12579
12812
|
|
|
@@ -12802,8 +13035,8 @@ struct Fts5ExtensionApi {
|
|
|
12802
13035
|
** as separate queries of the FTS index are required for each synonym.
|
|
12803
13036
|
**
|
|
12804
13037
|
** When using methods (2) or (3), it is important that the tokenizer only
|
|
12805
|
-
** provide synonyms when tokenizing document text (method (
|
|
12806
|
-
** text (method (
|
|
13038
|
+
** provide synonyms when tokenizing document text (method (3)) or query
|
|
13039
|
+
** text (method (2)), not both. Doing so will not cause any errors, but is
|
|
12807
13040
|
** inefficient.
|
|
12808
13041
|
*/
|
|
12809
13042
|
typedef struct Fts5Tokenizer Fts5Tokenizer;
|
|
@@ -12851,7 +13084,7 @@ struct fts5_api {
|
|
|
12851
13084
|
int (*xCreateTokenizer)(
|
|
12852
13085
|
fts5_api *pApi,
|
|
12853
13086
|
const char *zName,
|
|
12854
|
-
void *
|
|
13087
|
+
void *pUserData,
|
|
12855
13088
|
fts5_tokenizer *pTokenizer,
|
|
12856
13089
|
void (*xDestroy)(void*)
|
|
12857
13090
|
);
|
|
@@ -12860,7 +13093,7 @@ struct fts5_api {
|
|
|
12860
13093
|
int (*xFindTokenizer)(
|
|
12861
13094
|
fts5_api *pApi,
|
|
12862
13095
|
const char *zName,
|
|
12863
|
-
void **
|
|
13096
|
+
void **ppUserData,
|
|
12864
13097
|
fts5_tokenizer *pTokenizer
|
|
12865
13098
|
);
|
|
12866
13099
|
|
|
@@ -12868,7 +13101,7 @@ struct fts5_api {
|
|
|
12868
13101
|
int (*xCreateFunction)(
|
|
12869
13102
|
fts5_api *pApi,
|
|
12870
13103
|
const char *zName,
|
|
12871
|
-
void *
|
|
13104
|
+
void *pUserData,
|
|
12872
13105
|
fts5_extension_function xFunction,
|
|
12873
13106
|
void (*xDestroy)(void*)
|
|
12874
13107
|
);
|