Mercurial > embed
comparison libsqlite/sqlite3.h @ 109:772d594d8733 default tip @
sqlite: upgrade to 3.42.0
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 24 May 2023 15:12:34 +0200 |
parents | c77f122053cc |
children |
comparison
equal
deleted
inserted
replaced
108:c77f122053cc | 109:772d594d8733 |
---|---|
144 ** | 144 ** |
145 ** See also: [sqlite3_libversion()], | 145 ** See also: [sqlite3_libversion()], |
146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()], | 146 ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
147 ** [sqlite_version()] and [sqlite_source_id()]. | 147 ** [sqlite_version()] and [sqlite_source_id()]. |
148 */ | 148 */ |
149 #define SQLITE_VERSION "3.41.1" | 149 #define SQLITE_VERSION "3.42.0" |
150 #define SQLITE_VERSION_NUMBER 3041001 | 150 #define SQLITE_VERSION_NUMBER 3042000 |
151 #define SQLITE_SOURCE_ID "2023-03-10 12:13:52 20399f3eda5ec249d147ba9e48da6e87f969d7966a9a896764ca437ff7e737ff" | 151 #define SQLITE_SOURCE_ID "2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0" |
152 | 152 |
153 /* | 153 /* |
154 ** CAPI3REF: Run-Time Library Version Numbers | 154 ** CAPI3REF: Run-Time Library Version Numbers |
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid | 155 ** KEYWORDS: sqlite3_version sqlite3_sourceid |
156 ** | 156 ** |
1653 ** | 1653 ** |
1654 ** <b>The sqlite3_config() interface is not threadsafe. The application | 1654 ** <b>The sqlite3_config() interface is not threadsafe. The application |
1655 ** must ensure that no other SQLite interfaces are invoked by other | 1655 ** must ensure that no other SQLite interfaces are invoked by other |
1656 ** threads while sqlite3_config() is running.</b> | 1656 ** threads while sqlite3_config() is running.</b> |
1657 ** | 1657 ** |
1658 ** The sqlite3_config() interface | |
1659 ** may only be invoked prior to library initialization using | |
1660 ** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. | |
1661 ** ^If sqlite3_config() is called after [sqlite3_initialize()] and before | |
1662 ** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. | |
1663 ** Note, however, that ^sqlite3_config() can be called as part of the | |
1664 ** implementation of an application-defined [sqlite3_os_init()]. | |
1665 ** | |
1666 ** The first argument to sqlite3_config() is an integer | 1658 ** The first argument to sqlite3_config() is an integer |
1667 ** [configuration option] that determines | 1659 ** [configuration option] that determines |
1668 ** what property of SQLite is to be configured. Subsequent arguments | 1660 ** what property of SQLite is to be configured. Subsequent arguments |
1669 ** vary depending on the [configuration option] | 1661 ** vary depending on the [configuration option] |
1670 ** in the first argument. | 1662 ** in the first argument. |
1663 ** | |
1664 ** For most configuration options, the sqlite3_config() interface | |
1665 ** may only be invoked prior to library initialization using | |
1666 ** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. | |
1667 ** The exceptional configuration options that may be invoked at any time | |
1668 ** are called "anytime configuration options". | |
1669 ** ^If sqlite3_config() is called after [sqlite3_initialize()] and before | |
1670 ** [sqlite3_shutdown()] with a first argument that is not an anytime | |
1671 ** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE. | |
1672 ** Note, however, that ^sqlite3_config() can be called as part of the | |
1673 ** implementation of an application-defined [sqlite3_os_init()]. | |
1671 ** | 1674 ** |
1672 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. | 1675 ** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
1673 ** ^If the option is unknown or SQLite is unable to set the option | 1676 ** ^If the option is unknown or SQLite is unable to set the option |
1674 ** then this routine returns a non-zero [error code]. | 1677 ** then this routine returns a non-zero [error code]. |
1675 */ | 1678 */ |
1773 ** CAPI3REF: Configuration Options | 1776 ** CAPI3REF: Configuration Options |
1774 ** KEYWORDS: {configuration option} | 1777 ** KEYWORDS: {configuration option} |
1775 ** | 1778 ** |
1776 ** These constants are the available integer configuration options that | 1779 ** These constants are the available integer configuration options that |
1777 ** can be passed as the first argument to the [sqlite3_config()] interface. | 1780 ** can be passed as the first argument to the [sqlite3_config()] interface. |
1781 ** | |
1782 ** Most of the configuration options for sqlite3_config() | |
1783 ** will only work if invoked prior to [sqlite3_initialize()] or after | |
1784 ** [sqlite3_shutdown()]. The few exceptions to this rule are called | |
1785 ** "anytime configuration options". | |
1786 ** ^Calling [sqlite3_config()] with a first argument that is not an | |
1787 ** anytime configuration option in between calls to [sqlite3_initialize()] and | |
1788 ** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE. | |
1789 ** | |
1790 ** The set of anytime configuration options can change (by insertions | |
1791 ** and/or deletions) from one release of SQLite to the next. | |
1792 ** As of SQLite version 3.42.0, the complete set of anytime configuration | |
1793 ** options is: | |
1794 ** <ul> | |
1795 ** <li> SQLITE_CONFIG_LOG | |
1796 ** <li> SQLITE_CONFIG_PCACHE_HDRSZ | |
1797 ** </ul> | |
1778 ** | 1798 ** |
1779 ** New configuration options may be added in future releases of SQLite. | 1799 ** New configuration options may be added in future releases of SQLite. |
1780 ** Existing configuration options might be discontinued. Applications | 1800 ** Existing configuration options might be discontinued. Applications |
1781 ** should check the return code from [sqlite3_config()] to make sure that | 1801 ** should check the return code from [sqlite3_config()] to make sure that |
1782 ** the call worked. The [sqlite3_config()] interface will return a | 1802 ** the call worked. The [sqlite3_config()] interface will return a |
2120 ** configuration setting is never used, then the default maximum is determined | 2140 ** configuration setting is never used, then the default maximum is determined |
2121 ** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that | 2141 ** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that |
2122 ** compile-time option is not set, then the default maximum is 1073741824. | 2142 ** compile-time option is not set, then the default maximum is 1073741824. |
2123 ** </dl> | 2143 ** </dl> |
2124 */ | 2144 */ |
2125 #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ | 2145 #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ |
2126 #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ | 2146 #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ |
2127 #define SQLITE_CONFIG_SERIALIZED 3 /* nil */ | 2147 #define SQLITE_CONFIG_SERIALIZED 3 /* nil */ |
2128 #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ | 2148 #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ |
2129 #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ | 2149 #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ |
2130 #define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ | 2150 #define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ |
2131 #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ | 2151 #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ |
2132 #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ | 2152 #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ |
2133 #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ | 2153 #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ |
2134 #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ | 2154 #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ |
2135 #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ | 2155 #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ |
2136 /* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ | 2156 /* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ |
2137 #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ | 2157 #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ |
2138 #define SQLITE_CONFIG_PCACHE 14 /* no-op */ | 2158 #define SQLITE_CONFIG_PCACHE 14 /* no-op */ |
2139 #define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ | 2159 #define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ |
2140 #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ | 2160 #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ |
2141 #define SQLITE_CONFIG_URI 17 /* int */ | 2161 #define SQLITE_CONFIG_URI 17 /* int */ |
2142 #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ | 2162 #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ |
2143 #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ | 2163 #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ |
2144 #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ | 2164 #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ |
2145 #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ | 2165 #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ |
2146 #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ | 2166 #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ |
2147 #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ | 2167 #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ |
2148 #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ | 2168 #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ |
2149 #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ | 2169 #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ |
2150 #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ | 2170 #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ |
2151 #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */ | 2171 #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */ |
2376 ** additional information. This feature can also be turned on and off | 2396 ** additional information. This feature can also be turned on and off |
2377 ** using the [PRAGMA legacy_alter_table] statement. | 2397 ** using the [PRAGMA legacy_alter_table] statement. |
2378 ** </dd> | 2398 ** </dd> |
2379 ** | 2399 ** |
2380 ** [[SQLITE_DBCONFIG_DQS_DML]] | 2400 ** [[SQLITE_DBCONFIG_DQS_DML]] |
2381 ** <dt>SQLITE_DBCONFIG_DQS_DML</td> | 2401 ** <dt>SQLITE_DBCONFIG_DQS_DML</dt> |
2382 ** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates | 2402 ** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates |
2383 ** the legacy [double-quoted string literal] misfeature for DML statements | 2403 ** the legacy [double-quoted string literal] misfeature for DML statements |
2384 ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The | 2404 ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The |
2385 ** default value of this setting is determined by the [-DSQLITE_DQS] | 2405 ** default value of this setting is determined by the [-DSQLITE_DQS] |
2386 ** compile-time option. | 2406 ** compile-time option. |
2387 ** </dd> | 2407 ** </dd> |
2388 ** | 2408 ** |
2389 ** [[SQLITE_DBCONFIG_DQS_DDL]] | 2409 ** [[SQLITE_DBCONFIG_DQS_DDL]] |
2390 ** <dt>SQLITE_DBCONFIG_DQS_DDL</td> | 2410 ** <dt>SQLITE_DBCONFIG_DQS_DDL</dt> |
2391 ** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates | 2411 ** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates |
2392 ** the legacy [double-quoted string literal] misfeature for DDL statements, | 2412 ** the legacy [double-quoted string literal] misfeature for DDL statements, |
2393 ** such as CREATE TABLE and CREATE INDEX. The | 2413 ** such as CREATE TABLE and CREATE INDEX. The |
2394 ** default value of this setting is determined by the [-DSQLITE_DQS] | 2414 ** default value of this setting is determined by the [-DSQLITE_DQS] |
2395 ** compile-time option. | 2415 ** compile-time option. |
2396 ** </dd> | 2416 ** </dd> |
2397 ** | 2417 ** |
2398 ** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] | 2418 ** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] |
2399 ** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</td> | 2419 ** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</dt> |
2400 ** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to | 2420 ** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to |
2401 ** assume that database schemas are untainted by malicious content. | 2421 ** assume that database schemas are untainted by malicious content. |
2402 ** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite | 2422 ** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite |
2403 ** takes additional defensive steps to protect the application from harm | 2423 ** takes additional defensive steps to protect the application from harm |
2404 ** including: | 2424 ** including: |
2414 ** all applications are advised to turn it off if possible. This setting | 2434 ** all applications are advised to turn it off if possible. This setting |
2415 ** can also be controlled using the [PRAGMA trusted_schema] statement. | 2435 ** can also be controlled using the [PRAGMA trusted_schema] statement. |
2416 ** </dd> | 2436 ** </dd> |
2417 ** | 2437 ** |
2418 ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] | 2438 ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
2419 ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</td> | 2439 ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
2420 ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates | 2440 ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
2421 ** the legacy file format flag. When activated, this flag causes all newly | 2441 ** the legacy file format flag. When activated, this flag causes all newly |
2422 ** created database file to have a schema format version number (the 4-byte | 2442 ** created database file to have a schema format version number (the 4-byte |
2423 ** integer found at offset 44 into the database header) of 1. This in turn | 2443 ** integer found at offset 44 into the database header) of 1. This in turn |
2424 ** means that the resulting database file will be readable and writable by | 2444 ** means that the resulting database file will be readable and writable by |
2425 ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, | 2445 ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
2426 ** newly created databases are generally not understandable by SQLite versions | 2446 ** newly created databases are generally not understandable by SQLite versions |
2427 ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there | 2447 ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
2428 ** is now scarcely any need to generated database files that are compatible | 2448 ** is now scarcely any need to generate database files that are compatible |
2429 ** all the way back to version 3.0.0, and so this setting is of little | 2449 ** all the way back to version 3.0.0, and so this setting is of little |
2430 ** practical use, but is provided so that SQLite can continue to claim the | 2450 ** practical use, but is provided so that SQLite can continue to claim the |
2431 ** ability to generate new database files that are compatible with version | 2451 ** ability to generate new database files that are compatible with version |
2432 ** 3.0.0. | 2452 ** 3.0.0. |
2433 ** <p>Note that when the SQLITE_DBCONFIG_LEGACY_FILE_FORMAT setting is on, | 2453 ** <p>Note that when the SQLITE_DBCONFIG_LEGACY_FILE_FORMAT setting is on, |
2434 ** the [VACUUM] command will fail with an obscure error when attempting to | 2454 ** the [VACUUM] command will fail with an obscure error when attempting to |
2435 ** process a table with generated columns and a descending index. This is | 2455 ** process a table with generated columns and a descending index. This is |
2436 ** not considered a bug since SQLite versions 3.3.0 and earlier do not support | 2456 ** not considered a bug since SQLite versions 3.3.0 and earlier do not support |
2437 ** either generated columns or decending indexes. | 2457 ** either generated columns or decending indexes. |
2438 ** </dd> | 2458 ** </dd> |
2459 ** | |
2460 ** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]] | |
2461 ** <dt>SQLITE_DBCONFIG_STMT_SCANSTATUS</dt> | |
2462 ** <dd>The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in | |
2463 ** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears | |
2464 ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() | |
2465 ** statistics. For statistics to be collected, the flag must be set on | |
2466 ** the database handle both when the SQL statement is prepared and when it | |
2467 ** is stepped. The flag is set (collection of statistics is enabled) | |
2468 ** by default. This option takes two arguments: an integer and a pointer to | |
2469 ** an integer.. The first argument is 1, 0, or -1 to enable, disable, or | |
2470 ** leave unchanged the statement scanstatus option. If the second argument | |
2471 ** is not NULL, then the value of the statement scanstatus setting after | |
2472 ** processing the first argument is written into the integer that the second | |
2473 ** argument points to. | |
2474 ** </dd> | |
2475 ** | |
2476 ** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]] | |
2477 ** <dt>SQLITE_DBCONFIG_REVERSE_SCANORDER</dt> | |
2478 ** <dd>The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order | |
2479 ** in which tables and indexes are scanned so that the scans start at the end | |
2480 ** and work toward the beginning rather than starting at the beginning and | |
2481 ** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the | |
2482 ** same as setting [PRAGMA reverse_unordered_selects]. This option takes | |
2483 ** two arguments which are an integer and a pointer to an integer. The first | |
2484 ** argument is 1, 0, or -1 to enable, disable, or leave unchanged the | |
2485 ** reverse scan order flag, respectively. If the second argument is not NULL, | |
2486 ** then 0 or 1 is written into the integer that the second argument points to | |
2487 ** depending on if the reverse scan order flag is set after processing the | |
2488 ** first argument. | |
2489 ** </dd> | |
2490 ** | |
2439 ** </dl> | 2491 ** </dl> |
2440 */ | 2492 */ |
2441 #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ | 2493 #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ |
2442 #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ | 2494 #define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ |
2443 #define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ | 2495 #define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ |
2454 #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */ | 2506 #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */ |
2455 #define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */ | 2507 #define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */ |
2456 #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ | 2508 #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ |
2457 #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ | 2509 #define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ |
2458 #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ | 2510 #define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ |
2459 #define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */ | 2511 #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */ |
2512 #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */ | |
2513 #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */ | |
2460 | 2514 |
2461 /* | 2515 /* |
2462 ** CAPI3REF: Enable Or Disable Extended Result Codes | 2516 ** CAPI3REF: Enable Or Disable Extended Result Codes |
2463 ** METHOD: sqlite3 | 2517 ** METHOD: sqlite3 |
2464 ** | 2518 ** |
6199 ** ^SQLite implements this interface by calling the xSleep() | 6253 ** ^SQLite implements this interface by calling the xSleep() |
6200 ** method of the default [sqlite3_vfs] object. If the xSleep() method | 6254 ** method of the default [sqlite3_vfs] object. If the xSleep() method |
6201 ** of the default VFS is not implemented correctly, or not implemented at | 6255 ** of the default VFS is not implemented correctly, or not implemented at |
6202 ** all, then the behavior of sqlite3_sleep() may deviate from the description | 6256 ** all, then the behavior of sqlite3_sleep() may deviate from the description |
6203 ** in the previous paragraphs. | 6257 ** in the previous paragraphs. |
6258 ** | |
6259 ** If a negative argument is passed to sqlite3_sleep() the results vary by | |
6260 ** VFS and operating system. Some system treat a negative argument as an | |
6261 ** instruction to sleep forever. Others understand it to mean do not sleep | |
6262 ** at all. ^In SQLite version 3.42.0 and later, a negative | |
6263 ** argument passed into sqlite3_sleep() is changed to zero before it is relayed | |
6264 ** down into the xSleep method of the VFS. | |
6204 */ | 6265 */ |
6205 SQLITE_API int sqlite3_sleep(int); | 6266 SQLITE_API int sqlite3_sleep(int); |
6206 | 6267 |
6207 /* | 6268 /* |
6208 ** CAPI3REF: Name Of The Folder Holding Temporary Files | 6269 ** CAPI3REF: Name Of The Folder Holding Temporary Files |
7826 ** ^The sqlite3_mutex_leave() routine exits a mutex that was | 7887 ** ^The sqlite3_mutex_leave() routine exits a mutex that was |
7827 ** previously entered by the same thread. The behavior | 7888 ** previously entered by the same thread. The behavior |
7828 ** is undefined if the mutex is not currently entered by the | 7889 ** is undefined if the mutex is not currently entered by the |
7829 ** calling thread or is not currently allocated. | 7890 ** calling thread or is not currently allocated. |
7830 ** | 7891 ** |
7831 ** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or | 7892 ** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), |
7832 ** sqlite3_mutex_leave() is a NULL pointer, then all three routines | 7893 ** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer, |
7833 ** behave as no-ops. | 7894 ** then any of the four routines behaves as a no-op. |
7834 ** | 7895 ** |
7835 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. | 7896 ** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
7836 */ | 7897 */ |
7837 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); | 7898 SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); |
7838 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); | 7899 SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); |
9562 ** </dd> | 9623 ** </dd> |
9563 ** | 9624 ** |
9564 ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt> | 9625 ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt> |
9565 ** <dd>Calls of the form | 9626 ** <dd>Calls of the form |
9566 ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the | 9627 ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the |
9567 ** the [xConnect] or [xCreate] methods of a [virtual table] implmentation | 9628 ** the [xConnect] or [xCreate] methods of a [virtual table] implementation |
9568 ** identify that virtual table as being safe to use from within triggers | 9629 ** identify that virtual table as being safe to use from within triggers |
9569 ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the | 9630 ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the |
9570 ** virtual table can do no serious harm even if it is controlled by a | 9631 ** virtual table can do no serious harm even if it is controlled by a |
9571 ** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS | 9632 ** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS |
9572 ** flag unless absolutely necessary. | 9633 ** flag unless absolutely necessary. |
9573 ** </dd> | 9634 ** </dd> |
9635 ** | |
9636 ** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]<dt>SQLITE_VTAB_USES_ALL_SCHEMAS</dt> | |
9637 ** <dd>Calls of the form | |
9638 ** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the | |
9639 ** the [xConnect] or [xCreate] methods of a [virtual table] implementation | |
9640 ** instruct the query planner to begin at least a read transaction on | |
9641 ** all schemas ("main", "temp", and any ATTACH-ed databases) whenever the | |
9642 ** virtual table is used. | |
9643 ** </dd> | |
9574 ** </dl> | 9644 ** </dl> |
9575 */ | 9645 */ |
9576 #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 | 9646 #define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 |
9577 #define SQLITE_VTAB_INNOCUOUS 2 | 9647 #define SQLITE_VTAB_INNOCUOUS 2 |
9578 #define SQLITE_VTAB_DIRECTONLY 3 | 9648 #define SQLITE_VTAB_DIRECTONLY 3 |
9649 #define SQLITE_VTAB_USES_ALL_SCHEMAS 4 | |
9579 | 9650 |
9580 /* | 9651 /* |
9581 ** CAPI3REF: Determine The Virtual Table Conflict Policy | 9652 ** CAPI3REF: Determine The Virtual Table Conflict Policy |
9582 ** | 9653 ** |
9583 ** This function may only be called from within a call to the [xUpdate] method | 9654 ** This function may only be called from within a call to the [xUpdate] method |
10748 ** [sqlite3session_create()] for details. | 10819 ** [sqlite3session_create()] for details. |
10749 */ | 10820 */ |
10750 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); | 10821 SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); |
10751 | 10822 |
10752 /* | 10823 /* |
10753 ** CAPIREF: Conigure a Session Object | 10824 ** CAPI3REF: Configure a Session Object |
10754 ** METHOD: sqlite3_session | 10825 ** METHOD: sqlite3_session |
10755 ** | 10826 ** |
10756 ** This method is used to configure a session object after it has been | 10827 ** This method is used to configure a session object after it has been |
10757 ** created. At present the only valid value for the second parameter is | 10828 ** created. At present the only valid values for the second parameter are |
10758 ** [SQLITE_SESSION_OBJCONFIG_SIZE]. | 10829 ** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID]. |
10759 ** | 10830 ** |
10760 ** Arguments for sqlite3session_object_config() | 10831 */ |
10761 ** | 10832 SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); |
10762 ** The following values may passed as the the 4th parameter to | 10833 |
10834 /* | |
10835 ** CAPI3REF: Options for sqlite3session_object_config | |
10836 ** | |
10837 ** The following values may passed as the the 2nd parameter to | |
10763 ** sqlite3session_object_config(). | 10838 ** sqlite3session_object_config(). |
10764 ** | 10839 ** |
10765 ** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd> | 10840 ** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd> |
10766 ** This option is used to set, clear or query the flag that enables | 10841 ** This option is used to set, clear or query the flag that enables |
10767 ** the [sqlite3session_changeset_size()] API. Because it imposes some | 10842 ** the [sqlite3session_changeset_size()] API. Because it imposes some |
10773 ** variable is set to 1 if the sqlite3session_changeset_size() API is | 10848 ** variable is set to 1 if the sqlite3session_changeset_size() API is |
10774 ** enabled following the current call, or 0 otherwise. | 10849 ** enabled following the current call, or 0 otherwise. |
10775 ** | 10850 ** |
10776 ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after | 10851 ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after |
10777 ** the first table has been attached to the session object. | 10852 ** the first table has been attached to the session object. |
10778 */ | 10853 ** |
10779 SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); | 10854 ** <dt>SQLITE_SESSION_OBJCONFIG_ROWID <dd> |
10780 | 10855 ** This option is used to set, clear or query the flag that enables |
10781 /* | 10856 ** collection of data for tables with no explicit PRIMARY KEY. |
10782 */ | 10857 ** |
10783 #define SQLITE_SESSION_OBJCONFIG_SIZE 1 | 10858 ** Normally, tables with no explicit PRIMARY KEY are simply ignored |
10859 ** by the sessions module. However, if this flag is set, it behaves | |
10860 ** as if such tables have a column "_rowid_ INTEGER PRIMARY KEY" inserted | |
10861 ** as their leftmost columns. | |
10862 ** | |
10863 ** It is an error (SQLITE_MISUSE) to attempt to modify this setting after | |
10864 ** the first table has been attached to the session object. | |
10865 */ | |
10866 #define SQLITE_SESSION_OBJCONFIG_SIZE 1 | |
10867 #define SQLITE_SESSION_OBJCONFIG_ROWID 2 | |
10784 | 10868 |
10785 /* | 10869 /* |
10786 ** CAPI3REF: Enable Or Disable A Session Object | 10870 ** CAPI3REF: Enable Or Disable A Session Object |
10787 ** METHOD: sqlite3_session | 10871 ** METHOD: sqlite3_session |
10788 ** | 10872 ** |
11911 ** | 11995 ** |
11912 ** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> | 11996 ** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> |
11913 ** Invert the changeset before applying it. This is equivalent to inverting | 11997 ** Invert the changeset before applying it. This is equivalent to inverting |
11914 ** a changeset using sqlite3changeset_invert() before applying it. It is | 11998 ** a changeset using sqlite3changeset_invert() before applying it. It is |
11915 ** an error to specify this flag with a patchset. | 11999 ** an error to specify this flag with a patchset. |
12000 ** | |
12001 ** <dt>SQLITE_CHANGESETAPPLY_IGNORENOOP <dd> | |
12002 ** Do not invoke the conflict handler callback for any changes that | |
12003 ** would not actually modify the database even if they were applied. | |
12004 ** Specifically, this means that the conflict handler is not invoked | |
12005 ** for: | |
12006 ** <ul> | |
12007 ** <li>a delete change if the row being deleted cannot be found, | |
12008 ** <li>an update change if the modified fields are already set to | |
12009 ** their new values in the conflicting row, or | |
12010 ** <li>an insert change if all fields of the conflicting row match | |
12011 ** the row being inserted. | |
12012 ** </ul> | |
11916 */ | 12013 */ |
11917 #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 | 12014 #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 |
11918 #define SQLITE_CHANGESETAPPLY_INVERT 0x0002 | 12015 #define SQLITE_CHANGESETAPPLY_INVERT 0x0002 |
12016 #define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004 | |
11919 | 12017 |
11920 /* | 12018 /* |
11921 ** CAPI3REF: Constants Passed To The Conflict Handler | 12019 ** CAPI3REF: Constants Passed To The Conflict Handler |
11922 ** | 12020 ** |
11923 ** Values that may be passed as the second argument to a conflict-handler. | 12021 ** Values that may be passed as the second argument to a conflict-handler. |