version 1.6, 2021/07/16 18:35:51
|
version 1.6.2.1, 2023/09/25 15:19:30
|
Line 43 extern "C" {
|
Line 43 extern "C" {
|
|
|
|
|
/* |
/* |
** Provide the ability to override linkage features of the interface. | ** Facilitate override of interface linkage and calling conventions. |
| ** Be aware that these macros may not be used within this particular |
| ** translation of the amalgamation and its associated header file. |
| ** |
| ** The SQLITE_EXTERN and SQLITE_API macros are used to instruct the |
| ** compiler that the target identifier should have external linkage. |
| ** |
| ** The SQLITE_CDECL macro is used to set the calling convention for |
| ** public functions that accept a variable number of arguments. |
| ** |
| ** The SQLITE_APICALL macro is used to set the calling convention for |
| ** public functions that accept a fixed number of arguments. |
| ** |
| ** The SQLITE_STDCALL macro is no longer used and is now deprecated. |
| ** |
| ** The SQLITE_CALLBACK macro is used to set the calling convention for |
| ** function pointers. |
| ** |
| ** The SQLITE_SYSAPI macro is used to set the calling convention for |
| ** functions provided by the operating system. |
| ** |
| ** Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and |
| ** SQLITE_SYSAPI macros are used only when building for environments |
| ** that require non-default calling conventions. |
*/ |
*/ |
#ifndef SQLITE_EXTERN |
#ifndef SQLITE_EXTERN |
# define SQLITE_EXTERN extern |
# define SQLITE_EXTERN extern |
Line 123 extern "C" {
|
Line 146 extern "C" {
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
** [sqlite_version()] and [sqlite_source_id()]. |
** [sqlite_version()] and [sqlite_source_id()]. |
*/ |
*/ |
#define SQLITE_VERSION "3.35.1" | #define SQLITE_VERSION "3.43.1" |
#define SQLITE_VERSION_NUMBER 3035001 | #define SQLITE_VERSION_NUMBER 3043001 |
#define SQLITE_SOURCE_ID "2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a" | #define SQLITE_SOURCE_ID "2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0" |
|
|
/* |
/* |
** CAPI3REF: Run-Time Library Version Numbers |
** CAPI3REF: Run-Time Library Version Numbers |
Line 505 SQLITE_API int sqlite3_exec(
|
Line 528 SQLITE_API int sqlite3_exec(
|
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8)) |
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8)) |
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8)) |
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8)) |
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8)) |
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8)) |
|
#define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8)) |
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) |
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) |
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8)) |
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8)) |
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) |
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) |
Line 537 SQLITE_API int sqlite3_exec(
|
Line 561 SQLITE_API int sqlite3_exec(
|
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8)) |
#define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8)) |
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8)) |
#define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8)) |
#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8)) |
#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8)) |
|
#define SQLITE_CONSTRAINT_DATATYPE (SQLITE_CONSTRAINT |(12<<8)) |
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) |
#define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) |
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) |
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) |
|
#define SQLITE_NOTICE_RBU (SQLITE_NOTICE | (3<<8)) |
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) |
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) |
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) |
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) |
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) |
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) |
#define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8)) | #define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8)) /* internal use only */ |
|
|
/* |
/* |
** CAPI3REF: Flags For File Open Operations |
** CAPI3REF: Flags For File Open Operations |
Line 550 SQLITE_API int sqlite3_exec(
|
Line 576 SQLITE_API int sqlite3_exec(
|
** These bit values are intended for use in the |
** These bit values are intended for use in the |
** 3rd parameter to the [sqlite3_open_v2()] interface and |
** 3rd parameter to the [sqlite3_open_v2()] interface and |
** in the 4th parameter to the [sqlite3_vfs.xOpen] method. |
** in the 4th parameter to the [sqlite3_vfs.xOpen] method. |
|
** |
|
** Only those flags marked as "Ok for sqlite3_open_v2()" may be |
|
** used as the third argument to the [sqlite3_open_v2()] interface. |
|
** The other flags have historically been ignored by sqlite3_open_v2(), |
|
** though future versions of SQLite might change so that an error is |
|
** raised if any of the disallowed bits are passed into sqlite3_open_v2(). |
|
** Applications should not depend on the historical behavior. |
|
** |
|
** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
|
** [sqlite3_open_v2()] does *not* cause the underlying database file |
|
** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
|
** [sqlite3_open_v2()] has historically be a no-op and might become an |
|
** error in future versions of SQLite. |
*/ |
*/ |
#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
Line 572 SQLITE_API int sqlite3_exec(
|
Line 611 SQLITE_API int sqlite3_exec(
|
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ |
#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ |
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */ |
|
#define SQLITE_OPEN_EXRESCODE 0x02000000 /* Extended result codes */ |
|
|
/* Reserved: 0x00F00000 */ |
/* Reserved: 0x00F00000 */ |
/* Legacy compatibility: */ |
/* Legacy compatibility: */ |
Line 632 SQLITE_API int sqlite3_exec(
|
Line 672 SQLITE_API int sqlite3_exec(
|
** |
** |
** SQLite uses one of these integer values as the second |
** SQLite uses one of these integer values as the second |
** argument to calls it makes to the xLock() and xUnlock() methods |
** argument to calls it makes to the xLock() and xUnlock() methods |
** of an [sqlite3_io_methods] object. | ** of an [sqlite3_io_methods] object. These values are ordered from |
| ** lest restrictive to most restrictive. |
| ** |
| ** The argument to xLock() is always SHARED or higher. The argument to |
| ** xUnlock is either SHARED or NONE. |
*/ |
*/ |
#define SQLITE_LOCK_NONE 0 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
#define SQLITE_LOCK_SHARED 1 | #define SQLITE_LOCK_SHARED 1 /* xLock() or xUnlock() */ |
#define SQLITE_LOCK_RESERVED 2 | #define SQLITE_LOCK_RESERVED 2 /* xLock() only */ |
#define SQLITE_LOCK_PENDING 3 | #define SQLITE_LOCK_PENDING 3 /* xLock() only */ |
#define SQLITE_LOCK_EXCLUSIVE 4 | #define SQLITE_LOCK_EXCLUSIVE 4 /* xLock() only */ |
|
|
/* |
/* |
** CAPI3REF: Synchronization Type Flags |
** CAPI3REF: Synchronization Type Flags |
Line 716 struct sqlite3_file {
|
Line 760 struct sqlite3_file {
|
** <li> [SQLITE_LOCK_PENDING], or |
** <li> [SQLITE_LOCK_PENDING], or |
** <li> [SQLITE_LOCK_EXCLUSIVE]. |
** <li> [SQLITE_LOCK_EXCLUSIVE]. |
** </ul> |
** </ul> |
** xLock() increases the lock. xUnlock() decreases the lock. | ** xLock() upgrades the database file lock. In other words, xLock() moves the |
| ** database file lock in the direction NONE toward EXCLUSIVE. The argument to |
| ** xLock() is always on of SHARED, RESERVED, PENDING, or EXCLUSIVE, never |
| ** SQLITE_LOCK_NONE. If the database file lock is already at or above the |
| ** requested lock, then the call to xLock() is a no-op. |
| ** xUnlock() downgrades the database file lock to either SHARED or NONE. |
| * If the lock is already at or below the requested lock state, then the call |
| ** to xUnlock() is a no-op. |
** The xCheckReservedLock() method checks whether any database connection, |
** The xCheckReservedLock() method checks whether any database connection, |
** either in this process or in some other process, is holding a RESERVED, |
** either in this process or in some other process, is holding a RESERVED, |
** PENDING, or EXCLUSIVE lock on the file. It returns true |
** PENDING, or EXCLUSIVE lock on the file. It returns true |
Line 821 struct sqlite3_io_methods {
|
Line 872 struct sqlite3_io_methods {
|
** opcode causes the xFileControl method to write the current state of |
** opcode causes the xFileControl method to write the current state of |
** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], |
** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], |
** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) |
** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) |
** into an integer that the pArg argument points to. This capability | ** into an integer that the pArg argument points to. |
** is used during testing and is only available when the SQLITE_TEST | ** This capability is only available if SQLite is compiled with [SQLITE_DEBUG]. |
** compile-time option is used. | |
** |
** |
** <li>[[SQLITE_FCNTL_SIZE_HINT]] |
** <li>[[SQLITE_FCNTL_SIZE_HINT]] |
** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS |
** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS |
Line 1127 struct sqlite3_io_methods {
|
Line 1177 struct sqlite3_io_methods {
|
** in wal mode after the client has finished copying pages from the wal |
** in wal mode after the client has finished copying pages from the wal |
** file to the database file, but before the *-shm file is updated to |
** file to the database file, but before the *-shm file is updated to |
** record the fact that the pages have been checkpointed. |
** record the fact that the pages have been checkpointed. |
|
** |
|
** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
|
** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
|
** whether or not there is a database client in another process with a wal-mode |
|
** transaction open on the database or not. It is only available on unix.The |
|
** (void*) argument passed with this file-control should be a pointer to a |
|
** value of type (int). The integer value is set to 1 if the database is a wal |
|
** mode database and there exists at least one client in another process that |
|
** currently has an SQL transaction open on the database. It is set to 0 if |
|
** the database is not a wal-mode db, or if there is no such connection in any |
|
** other process. This opcode cannot be used to detect transactions opened |
|
** by clients within the current process, only within other processes. |
|
** |
|
** <li>[[SQLITE_FCNTL_CKSM_FILE]] |
|
** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the |
|
** [checksum VFS shim] only. |
|
** |
|
** <li>[[SQLITE_FCNTL_RESET_CACHE]] |
|
** If there is currently no transaction open on the database, and the |
|
** database is not a temp db, then the [SQLITE_FCNTL_RESET_CACHE] file-control |
|
** purges the contents of the in-memory page cache. If there is an open |
|
** transaction, or if the db is a temp-db, this opcode is a no-op, not an error. |
** </ul> |
** </ul> |
*/ |
*/ |
#define SQLITE_FCNTL_LOCKSTATE 1 |
#define SQLITE_FCNTL_LOCKSTATE 1 |
Line 1167 struct sqlite3_io_methods {
|
Line 1239 struct sqlite3_io_methods {
|
#define SQLITE_FCNTL_CKPT_DONE 37 |
#define SQLITE_FCNTL_CKPT_DONE 37 |
#define SQLITE_FCNTL_RESERVE_BYTES 38 |
#define SQLITE_FCNTL_RESERVE_BYTES 38 |
#define SQLITE_FCNTL_CKPT_START 39 |
#define SQLITE_FCNTL_CKPT_START 39 |
|
#define SQLITE_FCNTL_EXTERNAL_READER 40 |
|
#define SQLITE_FCNTL_CKSM_FILE 41 |
|
#define SQLITE_FCNTL_RESET_CACHE 42 |
|
|
/* deprecated names */ |
/* deprecated names */ |
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
Line 1197 typedef struct sqlite3_mutex sqlite3_mutex;
|
Line 1272 typedef struct sqlite3_mutex sqlite3_mutex;
|
typedef struct sqlite3_api_routines sqlite3_api_routines; |
typedef struct sqlite3_api_routines sqlite3_api_routines; |
|
|
/* |
/* |
|
** CAPI3REF: File Name |
|
** |
|
** Type [sqlite3_filename] is used by SQLite to pass filenames to the |
|
** xOpen method of a [VFS]. It may be cast to (const char*) and treated |
|
** as a normal, nul-terminated, UTF-8 buffer containing the filename, but |
|
** may also be passed to special APIs such as: |
|
** |
|
** <ul> |
|
** <li> sqlite3_filename_database() |
|
** <li> sqlite3_filename_journal() |
|
** <li> sqlite3_filename_wal() |
|
** <li> sqlite3_uri_parameter() |
|
** <li> sqlite3_uri_boolean() |
|
** <li> sqlite3_uri_int64() |
|
** <li> sqlite3_uri_key() |
|
** </ul> |
|
*/ |
|
typedef const char *sqlite3_filename; |
|
|
|
/* |
** CAPI3REF: OS Interface Object |
** CAPI3REF: OS Interface Object |
** |
** |
** An instance of the sqlite3_vfs object defines the interface between |
** An instance of the sqlite3_vfs object defines the interface between |
Line 1374 struct sqlite3_vfs {
|
Line 1469 struct sqlite3_vfs {
|
sqlite3_vfs *pNext; /* Next registered VFS */ |
sqlite3_vfs *pNext; /* Next registered VFS */ |
const char *zName; /* Name of this virtual file system */ |
const char *zName; /* Name of this virtual file system */ |
void *pAppData; /* Pointer to application-specific data */ |
void *pAppData; /* Pointer to application-specific data */ |
int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, | int (*xOpen)(sqlite3_vfs*, sqlite3_filename zName, sqlite3_file*, |
int flags, int *pOutFlags); |
int flags, int *pOutFlags); |
int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); |
int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); |
Line 1561 SQLITE_API int sqlite3_os_end(void);
|
Line 1656 SQLITE_API int sqlite3_os_end(void);
|
** must ensure that no other SQLite interfaces are invoked by other |
** must ensure that no other SQLite interfaces are invoked by other |
** threads while sqlite3_config() is running.</b> |
** threads while sqlite3_config() is running.</b> |
** |
** |
** The sqlite3_config() interface |
|
** may only be invoked prior to library initialization using |
|
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. |
|
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before |
|
** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. |
|
** Note, however, that ^sqlite3_config() can be called as part of the |
|
** implementation of an application-defined [sqlite3_os_init()]. |
|
** |
|
** The first argument to sqlite3_config() is an integer |
** The first argument to sqlite3_config() is an integer |
** [configuration option] that determines |
** [configuration option] that determines |
** what property of SQLite is to be configured. Subsequent arguments |
** what property of SQLite is to be configured. Subsequent arguments |
** vary depending on the [configuration option] |
** vary depending on the [configuration option] |
** in the first argument. |
** in the first argument. |
** |
** |
|
** For most configuration options, the sqlite3_config() interface |
|
** may only be invoked prior to library initialization using |
|
** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. |
|
** The exceptional configuration options that may be invoked at any time |
|
** are called "anytime configuration options". |
|
** ^If sqlite3_config() is called after [sqlite3_initialize()] and before |
|
** [sqlite3_shutdown()] with a first argument that is not an anytime |
|
** configuration option, then the sqlite3_config() call will return SQLITE_MISUSE. |
|
** Note, however, that ^sqlite3_config() can be called as part of the |
|
** implementation of an application-defined [sqlite3_os_init()]. |
|
** |
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. |
** ^If the option is unknown or SQLite is unable to set the option |
** ^If the option is unknown or SQLite is unable to set the option |
** then this routine returns a non-zero [error code]. |
** then this routine returns a non-zero [error code]. |
Line 1682 struct sqlite3_mem_methods {
|
Line 1780 struct sqlite3_mem_methods {
|
** These constants are the available integer configuration options that |
** These constants are the available integer configuration options that |
** can be passed as the first argument to the [sqlite3_config()] interface. |
** can be passed as the first argument to the [sqlite3_config()] interface. |
** |
** |
|
** Most of the configuration options for sqlite3_config() |
|
** will only work if invoked prior to [sqlite3_initialize()] or after |
|
** [sqlite3_shutdown()]. The few exceptions to this rule are called |
|
** "anytime configuration options". |
|
** ^Calling [sqlite3_config()] with a first argument that is not an |
|
** anytime configuration option in between calls to [sqlite3_initialize()] and |
|
** [sqlite3_shutdown()] is a no-op that returns SQLITE_MISUSE. |
|
** |
|
** The set of anytime configuration options can change (by insertions |
|
** and/or deletions) from one release of SQLite to the next. |
|
** As of SQLite version 3.42.0, the complete set of anytime configuration |
|
** options is: |
|
** <ul> |
|
** <li> SQLITE_CONFIG_LOG |
|
** <li> SQLITE_CONFIG_PCACHE_HDRSZ |
|
** </ul> |
|
** |
** New configuration options may be added in future releases of SQLite. |
** New configuration options may be added in future releases of SQLite. |
** Existing configuration options might be discontinued. Applications |
** Existing configuration options might be discontinued. Applications |
** should check the return code from [sqlite3_config()] to make sure that |
** should check the return code from [sqlite3_config()] to make sure that |
Line 2028 struct sqlite3_mem_methods {
|
Line 2143 struct sqlite3_mem_methods {
|
** compile-time option is not set, then the default maximum is 1073741824. |
** compile-time option is not set, then the default maximum is 1073741824. |
** </dl> |
** </dl> |
*/ |
*/ |
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ | #define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ |
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ | #define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ |
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ | #define SQLITE_CONFIG_SERIALIZED 3 /* nil */ |
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ | #define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ |
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ | #define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ |
#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ | #define SQLITE_CONFIG_SCRATCH 6 /* No longer used */ |
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ | #define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ |
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ | #define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ |
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ | #define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ |
#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ | #define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ |
#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ | #define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ |
/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ | /* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ |
#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ | #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ |
#define SQLITE_CONFIG_PCACHE 14 /* no-op */ | #define SQLITE_CONFIG_PCACHE 14 /* no-op */ |
#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ | #define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ |
#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ | #define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ |
#define SQLITE_CONFIG_URI 17 /* int */ | #define SQLITE_CONFIG_URI 17 /* int */ |
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ | #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ |
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ | #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ |
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ |
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ |
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ | #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ |
#define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ | #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ |
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ |
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ |
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ |
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ |
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ |
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ |
Line 2090 struct sqlite3_mem_methods {
|
Line 2205 struct sqlite3_mem_methods {
|
** configuration for a database connection can only be changed when that |
** configuration for a database connection can only be changed when that |
** connection is not currently using lookaside memory, or in other words |
** connection is not currently using lookaside memory, or in other words |
** when the "current value" returned by |
** when the "current value" returned by |
** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. | ** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero. |
** Any attempt to change the lookaside memory configuration when lookaside |
** Any attempt to change the lookaside memory configuration when lookaside |
** memory is in use leaves the configuration unchanged and returns |
** memory is in use leaves the configuration unchanged and returns |
** [SQLITE_BUSY].)^</dd> |
** [SQLITE_BUSY].)^</dd> |
Line 2240 struct sqlite3_mem_methods {
|
Line 2355 struct sqlite3_mem_methods {
|
** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0); |
** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0); |
** </ol> |
** </ol> |
** Because resetting a database is destructive and irreversible, the |
** Because resetting a database is destructive and irreversible, the |
** process requires the use of this obscure API and multiple steps to help | ** process requires the use of this obscure API and multiple steps to |
** ensure that it does not happen by accident. | ** help ensure that it does not happen by accident. Because this |
| ** feature must be capable of resetting corrupt databases, and |
| ** shutting down virtual tables may require access to that corrupt |
| ** storage, the library must abandon any installed virtual tables |
| ** without calling their xDestroy() methods. |
** |
** |
** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt> |
** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt> |
** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the |
** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the |
Line 2252 struct sqlite3_mem_methods {
|
Line 2371 struct sqlite3_mem_methods {
|
** <ul> |
** <ul> |
** <li> The [PRAGMA writable_schema=ON] statement. |
** <li> The [PRAGMA writable_schema=ON] statement. |
** <li> The [PRAGMA journal_mode=OFF] statement. |
** <li> The [PRAGMA journal_mode=OFF] statement. |
|
** <li> The [PRAGMA schema_version=N] statement. |
** <li> Writes to the [sqlite_dbpage] virtual table. |
** <li> Writes to the [sqlite_dbpage] virtual table. |
** <li> Direct writes to [shadow tables]. |
** <li> Direct writes to [shadow tables]. |
** </ul> |
** </ul> |
Line 2279 struct sqlite3_mem_methods {
|
Line 2399 struct sqlite3_mem_methods {
|
** </dd> |
** </dd> |
** |
** |
** [[SQLITE_DBCONFIG_DQS_DML]] |
** [[SQLITE_DBCONFIG_DQS_DML]] |
** <dt>SQLITE_DBCONFIG_DQS_DML</td> | ** <dt>SQLITE_DBCONFIG_DQS_DML</dt> |
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates |
** <dd>The SQLITE_DBCONFIG_DQS_DML option activates or deactivates |
** the legacy [double-quoted string literal] misfeature for DML statements |
** the legacy [double-quoted string literal] misfeature for DML statements |
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The |
** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The |
Line 2288 struct sqlite3_mem_methods {
|
Line 2408 struct sqlite3_mem_methods {
|
** </dd> |
** </dd> |
** |
** |
** [[SQLITE_DBCONFIG_DQS_DDL]] |
** [[SQLITE_DBCONFIG_DQS_DDL]] |
** <dt>SQLITE_DBCONFIG_DQS_DDL</td> | ** <dt>SQLITE_DBCONFIG_DQS_DDL</dt> |
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates |
** <dd>The SQLITE_DBCONFIG_DQS option activates or deactivates |
** the legacy [double-quoted string literal] misfeature for DDL statements, |
** the legacy [double-quoted string literal] misfeature for DDL statements, |
** such as CREATE TABLE and CREATE INDEX. The |
** such as CREATE TABLE and CREATE INDEX. The |
Line 2297 struct sqlite3_mem_methods {
|
Line 2417 struct sqlite3_mem_methods {
|
** </dd> |
** </dd> |
** |
** |
** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] |
** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] |
** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</td> | ** <dt>SQLITE_DBCONFIG_TRUSTED_SCHEMA</dt> |
** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to |
** <dd>The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to |
** assume that database schemas are untainted by malicious content. |
** assume that database schemas are untainted by malicious content. |
** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite |
** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite |
Line 2317 struct sqlite3_mem_methods {
|
Line 2437 struct sqlite3_mem_methods {
|
** </dd> |
** </dd> |
** |
** |
** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</td> | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
** the legacy file format flag. When activated, this flag causes all newly |
** the legacy file format flag. When activated, this flag causes all newly |
** created database file to have a schema format version number (the 4-byte |
** created database file to have a schema format version number (the 4-byte |
Line 2326 struct sqlite3_mem_methods {
|
Line 2446 struct sqlite3_mem_methods {
|
** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
** newly created databases are generally not understandable by SQLite versions |
** newly created databases are generally not understandable by SQLite versions |
** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
** is now scarcely any need to generated database files that are compatible | ** is now scarcely any need to generate database files that are compatible |
** all the way back to version 3.0.0, and so this setting is of little |
** all the way back to version 3.0.0, and so this setting is of little |
** practical use, but is provided so that SQLite can continue to claim the |
** practical use, but is provided so that SQLite can continue to claim the |
** ability to generate new database files that are compatible with version |
** ability to generate new database files that are compatible with version |
Line 2335 struct sqlite3_mem_methods {
|
Line 2455 struct sqlite3_mem_methods {
|
** the [VACUUM] command will fail with an obscure error when attempting to |
** the [VACUUM] command will fail with an obscure error when attempting to |
** process a table with generated columns and a descending index. This is |
** process a table with generated columns and a descending index. This is |
** not considered a bug since SQLite versions 3.3.0 and earlier do not support |
** not considered a bug since SQLite versions 3.3.0 and earlier do not support |
** either generated columns or decending indexes. | ** either generated columns or descending indexes. |
** </dd> |
** </dd> |
|
** |
|
** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]] |
|
** <dt>SQLITE_DBCONFIG_STMT_SCANSTATUS</dt> |
|
** <dd>The SQLITE_DBCONFIG_STMT_SCANSTATUS option is only useful in |
|
** SQLITE_ENABLE_STMT_SCANSTATUS builds. In this case, it sets or clears |
|
** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
|
** statistics. For statistics to be collected, the flag must be set on |
|
** the database handle both when the SQL statement is prepared and when it |
|
** is stepped. The flag is set (collection of statistics is enabled) |
|
** by default. This option takes two arguments: an integer and a pointer to |
|
** an integer.. The first argument is 1, 0, or -1 to enable, disable, or |
|
** leave unchanged the statement scanstatus option. If the second argument |
|
** is not NULL, then the value of the statement scanstatus setting after |
|
** processing the first argument is written into the integer that the second |
|
** argument points to. |
|
** </dd> |
|
** |
|
** [[SQLITE_DBCONFIG_REVERSE_SCANORDER]] |
|
** <dt>SQLITE_DBCONFIG_REVERSE_SCANORDER</dt> |
|
** <dd>The SQLITE_DBCONFIG_REVERSE_SCANORDER option changes the default order |
|
** in which tables and indexes are scanned so that the scans start at the end |
|
** and work toward the beginning rather than starting at the beginning and |
|
** working toward the end. Setting SQLITE_DBCONFIG_REVERSE_SCANORDER is the |
|
** same as setting [PRAGMA reverse_unordered_selects]. This option takes |
|
** two arguments which are an integer and a pointer to an integer. The first |
|
** argument is 1, 0, or -1 to enable, disable, or leave unchanged the |
|
** reverse scan order flag, respectively. If the second argument is not NULL, |
|
** then 0 or 1 is written into the integer that the second argument points to |
|
** depending on if the reverse scan order flag is set after processing the |
|
** first argument. |
|
** </dd> |
|
** |
** </dl> |
** </dl> |
*/ |
*/ |
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ |
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ |
Line 2357 struct sqlite3_mem_methods {
|
Line 2509 struct sqlite3_mem_methods {
|
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ |
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ |
#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ |
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ |
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ |
#define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */ | #define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */ |
| #define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */ |
| #define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */ |
|
|
/* |
/* |
** CAPI3REF: Enable Or Disable Extended Result Codes |
** CAPI3REF: Enable Or Disable Extended Result Codes |
Line 2445 SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*
|
Line 2599 SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*
|
** CAPI3REF: Count The Number Of Rows Modified |
** CAPI3REF: Count The Number Of Rows Modified |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
** |
** |
** ^This function returns the number of rows modified, inserted or | ** ^These functions return the number of rows modified, inserted or |
** deleted by the most recently completed INSERT, UPDATE or DELETE |
** deleted by the most recently completed INSERT, UPDATE or DELETE |
** statement on the database connection specified by the only parameter. |
** statement on the database connection specified by the only parameter. |
** ^Executing any other type of SQL statement does not modify the value | ** The two functions are identical except for the type of the return value |
** returned by this function. | ** and that if the number of rows modified by the most recent INSERT, UPDATE |
| ** or DELETE is greater than the maximum value supported by type "int", then |
| ** the return value of sqlite3_changes() is undefined. ^Executing any other |
| ** type of SQL statement does not modify the value returned by these functions. |
** |
** |
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are |
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are |
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], |
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers], |
Line 2498 SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*
|
Line 2655 SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*
|
** </ul> |
** </ul> |
*/ |
*/ |
SQLITE_API int sqlite3_changes(sqlite3*); |
SQLITE_API int sqlite3_changes(sqlite3*); |
|
SQLITE_API sqlite3_int64 sqlite3_changes64(sqlite3*); |
|
|
/* |
/* |
** CAPI3REF: Total Number Of Rows Modified |
** CAPI3REF: Total Number Of Rows Modified |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
** |
** |
** ^This function returns the total number of rows inserted, modified or | ** ^These functions return the total number of rows inserted, modified or |
** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed |
** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed |
** since the database connection was opened, including those executed as |
** since the database connection was opened, including those executed as |
** part of trigger programs. ^Executing any other type of SQL statement | ** part of trigger programs. The two functions are identical except for the |
** does not affect the value returned by sqlite3_total_changes(). | ** type of the return value and that if the number of rows modified by the |
| ** connection exceeds the maximum value supported by type "int", then |
| ** the return value of sqlite3_total_changes() is undefined. ^Executing |
| ** any other type of SQL statement does not affect the value returned by |
| ** sqlite3_total_changes(). |
** |
** |
** ^Changes made as part of [foreign key actions] are included in the |
** ^Changes made as part of [foreign key actions] are included in the |
** count, but those made as part of REPLACE constraint resolution are |
** count, but those made as part of REPLACE constraint resolution are |
Line 2535 SQLITE_API int sqlite3_changes(sqlite3*);
|
Line 2697 SQLITE_API int sqlite3_changes(sqlite3*);
|
** </ul> |
** </ul> |
*/ |
*/ |
SQLITE_API int sqlite3_total_changes(sqlite3*); |
SQLITE_API int sqlite3_total_changes(sqlite3*); |
|
SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*); |
|
|
/* |
/* |
** CAPI3REF: Interrupt A Long-Running Query |
** CAPI3REF: Interrupt A Long-Running Query |
Line 2570 SQLITE_API int sqlite3_total_changes(sqlite3*);
|
Line 2733 SQLITE_API int sqlite3_total_changes(sqlite3*);
|
** ^A call to sqlite3_interrupt(D) that occurs when there are no running |
** ^A call to sqlite3_interrupt(D) that occurs when there are no running |
** SQL statements is a no-op and has no effect on SQL statements |
** SQL statements is a no-op and has no effect on SQL statements |
** that are started after the sqlite3_interrupt() call returns. |
** that are started after the sqlite3_interrupt() call returns. |
|
** |
|
** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether |
|
** or not an interrupt is currently in effect for [database connection] D. |
|
** It returns 1 if an interrupt is currently in effect, or 0 otherwise. |
*/ |
*/ |
SQLITE_API void sqlite3_interrupt(sqlite3*); |
SQLITE_API void sqlite3_interrupt(sqlite3*); |
|
SQLITE_API int sqlite3_is_interrupted(sqlite3*); |
|
|
/* |
/* |
** CAPI3REF: Determine If An SQL Statement Is Complete |
** CAPI3REF: Determine If An SQL Statement Is Complete |
Line 3189 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sql
|
Line 3357 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sql
|
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same |
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same |
** information as is provided by the [sqlite3_profile()] callback. |
** information as is provided by the [sqlite3_profile()] callback. |
** ^The P argument is a pointer to the [prepared statement] and the |
** ^The P argument is a pointer to the [prepared statement] and the |
** X argument points to a 64-bit integer which is the estimated of | ** X argument points to a 64-bit integer which is approximately |
** the number of nanosecond that the prepared statement took to run. | ** the number of nanoseconds that the prepared statement took to run. |
** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. |
** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes. |
** |
** |
** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt> |
** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt> |
Line 3222 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sql
|
Line 3390 SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sql
|
** M argument should be the bitwise OR-ed combination of |
** M argument should be the bitwise OR-ed combination of |
** zero or more [SQLITE_TRACE] constants. |
** zero or more [SQLITE_TRACE] constants. |
** |
** |
** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides | ** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P) |
** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). | ** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or |
| ** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each |
| ** database connection may have at most one trace callback. |
** |
** |
** ^The X callback is invoked whenever any of the events identified by |
** ^The X callback is invoked whenever any of the events identified by |
** mask M occur. ^The integer return value from the callback is currently |
** mask M occur. ^The integer return value from the callback is currently |
Line 3253 SQLITE_API int sqlite3_trace_v2(
|
Line 3423 SQLITE_API int sqlite3_trace_v2(
|
** |
** |
** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback |
** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback |
** function X to be invoked periodically during long running calls to |
** function X to be invoked periodically during long running calls to |
** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for | ** [sqlite3_step()] and [sqlite3_prepare()] and similar for |
** database connection D. An example use for this |
** database connection D. An example use for this |
** interface is to keep a GUI updated during a large query. |
** interface is to keep a GUI updated during a large query. |
** |
** |
Line 3278 SQLITE_API int sqlite3_trace_v2(
|
Line 3448 SQLITE_API int sqlite3_trace_v2(
|
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their |
** database connections for the meaning of "modify" in this paragraph. |
** database connections for the meaning of "modify" in this paragraph. |
** |
** |
|
** The progress handler callback would originally only be invoked from the |
|
** bytecode engine. It still might be invoked during [sqlite3_prepare()] |
|
** and similar because those routines might force a reparse of the schema |
|
** which involves running the bytecode engine. However, beginning with |
|
** SQLite version 3.41.0, the progress handler callback might also be |
|
** invoked directly from [sqlite3_prepare()] while analyzing and generating |
|
** code for complex queries. |
*/ |
*/ |
SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); |
|
|
Line 3314 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
Line 3491 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
** |
** |
** <dl> |
** <dl> |
** ^(<dt>[SQLITE_OPEN_READONLY]</dt> |
** ^(<dt>[SQLITE_OPEN_READONLY]</dt> |
** <dd>The database is opened in read-only mode. If the database does not | ** <dd>The database is opened in read-only mode. If the database does |
** already exist, an error is returned.</dd>)^ | ** not already exist, an error is returned.</dd>)^ |
** |
** |
** ^(<dt>[SQLITE_OPEN_READWRITE]</dt> |
** ^(<dt>[SQLITE_OPEN_READWRITE]</dt> |
** <dd>The database is opened for reading and writing if possible, or reading | ** <dd>The database is opened for reading and writing if possible, or |
** only if the file is write protected by the operating system. In either | ** reading only if the file is write protected by the operating |
** case the database must already exist, otherwise an error is returned.</dd>)^ | ** system. In either case the database must already exist, otherwise |
| ** an error is returned. For historical reasons, if opening in |
| ** read-write mode fails due to OS-level permissions, an attempt is |
| ** made to open it in read-only mode. [sqlite3_db_readonly()] can be |
| ** used to determine whether the database is actually |
| ** read-write.</dd>)^ |
** |
** |
** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt> |
** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt> |
** <dd>The database is opened for reading and writing, and is created if |
** <dd>The database is opened for reading and writing, and is created if |
Line 3358 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
Line 3540 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
** <dd>The database is opened [shared cache] enabled, overriding |
** <dd>The database is opened [shared cache] enabled, overriding |
** the default shared cache setting provided by |
** the default shared cache setting provided by |
** [sqlite3_enable_shared_cache()].)^ |
** [sqlite3_enable_shared_cache()].)^ |
|
** The [use of shared cache mode is discouraged] and hence shared cache |
|
** capabilities may be omitted from many builds of SQLite. In such cases, |
|
** this option is a no-op. |
** |
** |
** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
** <dd>The database is opened [shared cache] disabled, overriding |
** <dd>The database is opened [shared cache] disabled, overriding |
** the default shared cache setting provided by |
** the default shared cache setting provided by |
** [sqlite3_enable_shared_cache()].)^ |
** [sqlite3_enable_shared_cache()].)^ |
** |
** |
|
** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
|
** <dd>The database connection comes up in "extended result code mode". |
|
** In other words, the database behaves has if |
|
** [sqlite3_extended_result_codes(db,1)] where called on the database |
|
** connection as soon as the connection is created. In addition to setting |
|
** the extended result code mode, this flag also causes [sqlite3_open_v2()] |
|
** to return an extended result code.</dd> |
|
** |
** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
** [[OPEN_NOFOLLOW]] ^(<dt>[SQLITE_OPEN_NOFOLLOW]</dt> |
** <dd>The database filename is not allowed to be a symbolic link</dd> | ** <dd>The database filename is not allowed to contain a symbolic link</dd> |
** </dl>)^ |
** </dl>)^ |
** |
** |
** If the 3rd parameter to sqlite3_open_v2() is not one of the |
** If the 3rd parameter to sqlite3_open_v2() is not one of the |
** required combinations shown above optionally combined with other |
** required combinations shown above optionally combined with other |
** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] |
** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] |
** then the behavior is undefined. | ** then the behavior is undefined. Historic versions of SQLite |
| ** have silently ignored surplus bits in the flags parameter to |
| ** sqlite3_open_v2(), however that behavior might not be carried through |
| ** into future versions of SQLite and so applications should not rely |
| ** upon it. Note in particular that the SQLITE_OPEN_EXCLUSIVE flag is a no-op |
| ** for sqlite3_open_v2(). The SQLITE_OPEN_EXCLUSIVE does *not* cause |
| ** the open to fail if the database already exists. The SQLITE_OPEN_EXCLUSIVE |
| ** flag is intended for use by the [sqlite3_vfs|VFS interface] only, and not |
| ** by sqlite3_open_v2(). |
** |
** |
** ^The fourth parameter to sqlite3_open_v2() is the name of the |
** ^The fourth parameter to sqlite3_open_v2() is the name of the |
** [sqlite3_vfs] object that defines the operating system interface that |
** [sqlite3_vfs] object that defines the operating system interface that |
Line 3561 SQLITE_API int sqlite3_open_v2(
|
Line 3762 SQLITE_API int sqlite3_open_v2(
|
** as F) must be one of: |
** as F) must be one of: |
** <ul> |
** <ul> |
** <li> A database filename pointer created by the SQLite core and |
** <li> A database filename pointer created by the SQLite core and |
** passed into the xOpen() method of a VFS implemention, or | ** passed into the xOpen() method of a VFS implementation, or |
** <li> A filename obtained from [sqlite3_db_filename()], or |
** <li> A filename obtained from [sqlite3_db_filename()], or |
** <li> A new filename constructed using [sqlite3_create_filename()]. |
** <li> A new filename constructed using [sqlite3_create_filename()]. |
** </ul> |
** </ul> |
Line 3616 SQLITE_API int sqlite3_open_v2(
|
Line 3817 SQLITE_API int sqlite3_open_v2(
|
** |
** |
** See the [URI filename] documentation for additional information. |
** See the [URI filename] documentation for additional information. |
*/ |
*/ |
SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); | SQLITE_API const char *sqlite3_uri_parameter(sqlite3_filename z, const char *zParam); |
SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); | SQLITE_API int sqlite3_uri_boolean(sqlite3_filename z, const char *zParam, int bDefault); |
SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); | SQLITE_API sqlite3_int64 sqlite3_uri_int64(sqlite3_filename, const char*, sqlite3_int64); |
SQLITE_API const char *sqlite3_uri_key(const char *zFilename, int N); | SQLITE_API const char *sqlite3_uri_key(sqlite3_filename z, int N); |
|
|
/* |
/* |
** CAPI3REF: Translate filenames |
** CAPI3REF: Translate filenames |
Line 3648 SQLITE_API const char *sqlite3_uri_key(const char *zFi
|
Line 3849 SQLITE_API const char *sqlite3_uri_key(const char *zFi
|
** return value from [sqlite3_db_filename()], then the result is |
** return value from [sqlite3_db_filename()], then the result is |
** undefined and is likely a memory access violation. |
** undefined and is likely a memory access violation. |
*/ |
*/ |
SQLITE_API const char *sqlite3_filename_database(const char*); | SQLITE_API const char *sqlite3_filename_database(sqlite3_filename); |
SQLITE_API const char *sqlite3_filename_journal(const char*); | SQLITE_API const char *sqlite3_filename_journal(sqlite3_filename); |
SQLITE_API const char *sqlite3_filename_wal(const char*); | SQLITE_API const char *sqlite3_filename_wal(sqlite3_filename); |
|
|
/* |
/* |
** CAPI3REF: Database File Corresponding To A Journal |
** CAPI3REF: Database File Corresponding To A Journal |
Line 3674 SQLITE_API sqlite3_file *sqlite3_database_file_object(
|
Line 3875 SQLITE_API sqlite3_file *sqlite3_database_file_object(
|
/* |
/* |
** CAPI3REF: Create and Destroy VFS Filenames |
** CAPI3REF: Create and Destroy VFS Filenames |
** |
** |
** These interfces are provided for use by [VFS shim] implementations and | ** These interfaces are provided for use by [VFS shim] implementations and |
** are not useful outside of that context. |
** are not useful outside of that context. |
** |
** |
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of |
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of |
Line 3716 SQLITE_API sqlite3_file *sqlite3_database_file_object(
|
Line 3917 SQLITE_API sqlite3_file *sqlite3_database_file_object(
|
** then the corresponding [sqlite3_module.xClose() method should also be |
** then the corresponding [sqlite3_module.xClose() method should also be |
** invoked prior to calling sqlite3_free_filename(Y). |
** invoked prior to calling sqlite3_free_filename(Y). |
*/ |
*/ |
SQLITE_API char *sqlite3_create_filename( | SQLITE_API sqlite3_filename sqlite3_create_filename( |
const char *zDatabase, |
const char *zDatabase, |
const char *zJournal, |
const char *zJournal, |
const char *zWal, |
const char *zWal, |
int nParam, |
int nParam, |
const char **azParam |
const char **azParam |
); |
); |
SQLITE_API void sqlite3_free_filename(char*); | SQLITE_API void sqlite3_free_filename(sqlite3_filename); |
|
|
/* |
/* |
** CAPI3REF: Error Codes And Messages |
** CAPI3REF: Error Codes And Messages |
Line 3742 SQLITE_API void sqlite3_free_filename(char*);
|
Line 3943 SQLITE_API void sqlite3_free_filename(char*);
|
** sqlite3_extended_errcode() might change with each API call. |
** sqlite3_extended_errcode() might change with each API call. |
** Except, there are some interfaces that are guaranteed to never |
** Except, there are some interfaces that are guaranteed to never |
** change the value of the error code. The error-code preserving |
** change the value of the error code. The error-code preserving |
** interfaces are: | ** interfaces include the following: |
** |
** |
** <ul> |
** <ul> |
** <li> sqlite3_errcode() |
** <li> sqlite3_errcode() |
** <li> sqlite3_extended_errcode() |
** <li> sqlite3_extended_errcode() |
** <li> sqlite3_errmsg() |
** <li> sqlite3_errmsg() |
** <li> sqlite3_errmsg16() |
** <li> sqlite3_errmsg16() |
|
** <li> sqlite3_error_offset() |
** </ul> |
** </ul> |
** |
** |
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language |
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language |
Line 3763 SQLITE_API void sqlite3_free_filename(char*);
|
Line 3965 SQLITE_API void sqlite3_free_filename(char*);
|
** ^(Memory to hold the error message string is managed internally |
** ^(Memory to hold the error message string is managed internally |
** and must not be freed by the application)^. |
** and must not be freed by the application)^. |
** |
** |
|
** ^If the most recent error references a specific token in the input |
|
** SQL, the sqlite3_error_offset() interface returns the byte offset |
|
** of the start of that token. ^The byte offset returned by |
|
** sqlite3_error_offset() assumes that the input SQL is UTF8. |
|
** ^If the most recent error does not reference a specific token in the input |
|
** SQL, then the sqlite3_error_offset() function returns -1. |
|
** |
** When the serialized [threading mode] is in use, it might be the |
** When the serialized [threading mode] is in use, it might be the |
** case that a second error occurs on a separate thread in between |
** case that a second error occurs on a separate thread in between |
** the time of the first error and the call to these interfaces. |
** the time of the first error and the call to these interfaces. |
Line 3782 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
Line 3991 SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
SQLITE_API const char *sqlite3_errmsg(sqlite3*); |
SQLITE_API const char *sqlite3_errmsg(sqlite3*); |
SQLITE_API const void *sqlite3_errmsg16(sqlite3*); |
SQLITE_API const void *sqlite3_errmsg16(sqlite3*); |
SQLITE_API const char *sqlite3_errstr(int); |
SQLITE_API const char *sqlite3_errstr(int); |
|
SQLITE_API int sqlite3_error_offset(sqlite3 *db); |
|
|
/* |
/* |
** CAPI3REF: Prepared Statement Object |
** CAPI3REF: Prepared Statement Object |
Line 4139 SQLITE_API int sqlite3_prepare16_v3(
|
Line 4349 SQLITE_API int sqlite3_prepare16_v3(
|
** are managed by SQLite and are automatically freed when the prepared |
** are managed by SQLite and are automatically freed when the prepared |
** statement is finalized. |
** statement is finalized. |
** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
** ^The string returned by sqlite3_expanded_sql(P), on the other hand, |
** is obtained from [sqlite3_malloc()] and must be free by the application | ** is obtained from [sqlite3_malloc()] and must be freed by the application |
** by passing it to [sqlite3_free()]. |
** by passing it to [sqlite3_free()]. |
|
** |
|
** ^The sqlite3_normalized_sql() interface is only available if |
|
** the [SQLITE_ENABLE_NORMALIZE] compile-time option is defined. |
*/ |
*/ |
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); |
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); |
SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt); |
|
#ifdef SQLITE_ENABLE_NORMALIZE |
SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt); |
SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt); |
|
#endif |
|
|
/* |
/* |
** CAPI3REF: Determine If An SQL Statement Writes The Database |
** CAPI3REF: Determine If An SQL Statement Writes The Database |
Line 4179 SQLITE_API const char *sqlite3_normalized_sql(sqlite3_
|
Line 4394 SQLITE_API const char *sqlite3_normalized_sql(sqlite3_
|
** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and |
** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and |
** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so |
** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so |
** sqlite3_stmt_readonly() returns false for those commands. |
** sqlite3_stmt_readonly() returns false for those commands. |
|
** |
|
** ^This routine returns false if there is any possibility that the |
|
** statement might change the database file. ^A false return does |
|
** not guarantee that the statement will change the database file. |
|
** ^For example, an UPDATE statement might have a WHERE clause that |
|
** makes it a no-op, but the sqlite3_stmt_readonly() result would still |
|
** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a |
|
** read-only no-op if the table already exists, but |
|
** sqlite3_stmt_readonly() still returns false for such a statement. |
|
** |
|
** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN] |
|
** statement, then sqlite3_stmt_readonly(X) returns the same value as |
|
** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted. |
*/ |
*/ |
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
|
|
Line 4195 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pSt
|
Line 4423 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pSt
|
SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt); |
SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt); |
|
|
/* |
/* |
|
** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement |
|
** METHOD: sqlite3_stmt |
|
** |
|
** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN |
|
** setting for [prepared statement] S. If E is zero, then S becomes |
|
** a normal prepared statement. If E is 1, then S behaves as if |
|
** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if |
|
** its SQL text began with "[EXPLAIN QUERY PLAN]". |
|
** |
|
** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared. |
|
** SQLite tries to avoid a reprepare, but a reprepare might be necessary |
|
** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode. |
|
** |
|
** Because of the potential need to reprepare, a call to |
|
** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be |
|
** reprepared because it was created using [sqlite3_prepare()] instead of |
|
** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and |
|
** hence has no saved SQL text with which to reprepare. |
|
** |
|
** Changing the explain setting for a prepared statement does not change |
|
** the original SQL text for the statement. Hence, if the SQL text originally |
|
** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0) |
|
** is called to convert the statement into an ordinary statement, the EXPLAIN |
|
** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S) |
|
** output, even though the statement now acts like a normal SQL statement. |
|
** |
|
** This routine returns SQLITE_OK if the explain mode is successfully |
|
** changed, or an error code if the explain mode could not be changed. |
|
** The explain mode cannot be changed while a statement is active. |
|
** Hence, it is good practice to call [sqlite3_reset(S)] |
|
** immediately prior to calling sqlite3_stmt_explain(S,E). |
|
*/ |
|
SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode); |
|
|
|
/* |
** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
** CAPI3REF: Determine If A Prepared Statement Has Been Reset |
** METHOD: sqlite3_stmt |
** METHOD: sqlite3_stmt |
** |
** |
Line 4247 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
Line 4510 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
** |
** |
** ^The sqlite3_value objects that are passed as parameters into the |
** ^The sqlite3_value objects that are passed as parameters into the |
** implementation of [application-defined SQL functions] are protected. |
** implementation of [application-defined SQL functions] are protected. |
|
** ^The sqlite3_value objects returned by [sqlite3_vtab_rhs_value()] |
|
** are protected. |
** ^The sqlite3_value object returned by |
** ^The sqlite3_value object returned by |
** [sqlite3_column_value()] is unprotected. |
** [sqlite3_column_value()] is unprotected. |
** Unprotected sqlite3_value objects may only be used as arguments |
** Unprotected sqlite3_value objects may only be used as arguments |
Line 4348 typedef struct sqlite3_context sqlite3_context;
|
Line 4613 typedef struct sqlite3_context sqlite3_context;
|
** contain embedded NULs. The result of expressions involving strings |
** contain embedded NULs. The result of expressions involving strings |
** with embedded NULs is undefined. |
** with embedded NULs is undefined. |
** |
** |
** ^The fifth argument to the BLOB and string binding interfaces | ** ^The fifth argument to the BLOB and string binding interfaces controls |
** is a destructor used to dispose of the BLOB or | ** or indicates the lifetime of the object referenced by the third parameter. |
** string after SQLite has finished with it. ^The destructor is called | ** These three options exist: |
** to dispose of the BLOB or string even if the call to the bind API fails, | ** ^ (1) A destructor to dispose of the BLOB or string after SQLite has finished |
** except the destructor is not called if the third parameter is a NULL | ** with it may be passed. ^It is called to dispose of the BLOB or string even |
** pointer or the fourth parameter is negative. | ** if the call to the bind API fails, except the destructor is not called if |
** ^If the fifth argument is | ** the third parameter is a NULL pointer or the fourth parameter is negative. |
** the special value [SQLITE_STATIC], then SQLite assumes that the | ** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that |
** information is in static, unmanaged space and does not need to be freed. | ** the application remains responsible for disposing of the object. ^In this |
** ^If the fifth argument has the value [SQLITE_TRANSIENT], then | ** case, the object and the provided pointer to it must remain valid until |
** SQLite makes its own private copy of the data immediately, before | ** either the prepared statement is finalized or the same SQL parameter is |
** the sqlite3_bind_*() routine returns. | ** bound to something else, whichever occurs sooner. |
| ** ^ (3) The constant, [SQLITE_TRANSIENT], may be passed to indicate that the |
| ** object is to be copied prior to the return from sqlite3_bind_*(). ^The |
| ** object and pointer to it must remain valid until then. ^SQLite will then |
| ** manage the lifetime of its private copy. |
** |
** |
** ^The sixth argument to sqlite3_bind_text64() must be one of |
** ^The sixth argument to sqlite3_bind_text64() must be one of |
** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE] |
** [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE] |
Line 4864 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
Line 5133 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
** even empty strings, are always zero-terminated. ^The return |
** even empty strings, are always zero-terminated. ^The return |
** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. |
** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. |
** |
** |
|
** ^Strings returned by sqlite3_column_text16() always have the endianness |
|
** which is native to the platform, regardless of the text encoding set |
|
** for the database. |
|
** |
** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an |
** <b>Warning:</b> ^The object returned by [sqlite3_column_value()] is an |
** [unprotected sqlite3_value] object. In a multithreaded environment, |
** [unprotected sqlite3_value] object. In a multithreaded environment, |
** an unprotected sqlite3_value object may only be used safely with |
** an unprotected sqlite3_value object may only be used safely with |
Line 4877 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
Line 5150 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
** [application-defined SQL functions] or [virtual tables], not within |
** [application-defined SQL functions] or [virtual tables], not within |
** top-level application code. |
** top-level application code. |
** |
** |
** The these routines may attempt to convert the datatype of the result. | ** These routines may attempt to convert the datatype of the result. |
** ^For example, if the internal representation is FLOAT and a text result |
** ^For example, if the internal representation is FLOAT and a text result |
** is requested, [sqlite3_snprintf()] is used internally to perform the |
** is requested, [sqlite3_snprintf()] is used internally to perform the |
** conversion automatically. ^(The following table details the conversions |
** conversion automatically. ^(The following table details the conversions |
Line 4902 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
Line 5175 SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt)
|
** <tr><td> TEXT <td> BLOB <td> No change |
** <tr><td> TEXT <td> BLOB <td> No change |
** <tr><td> BLOB <td> INTEGER <td> [CAST] to INTEGER |
** <tr><td> BLOB <td> INTEGER <td> [CAST] to INTEGER |
** <tr><td> BLOB <td> FLOAT <td> [CAST] to REAL |
** <tr><td> BLOB <td> FLOAT <td> [CAST] to REAL |
** <tr><td> BLOB <td> TEXT <td> Add a zero terminator if needed | ** <tr><td> BLOB <td> TEXT <td> [CAST] to TEXT, ensure zero terminator |
** </table> |
** </table> |
** </blockquote>)^ |
** </blockquote>)^ |
** |
** |
Line 5026 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
Line 5299 SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S |
** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S |
** back to the beginning of its program. |
** back to the beginning of its program. |
** |
** |
** ^If the most recent call to [sqlite3_step(S)] for the | ** ^The return code from [sqlite3_reset(S)] indicates whether or not |
** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], | ** the previous evaluation of prepared statement S completed successfully. |
** or if [sqlite3_step(S)] has never before been called on S, | ** ^If [sqlite3_step(S)] has never before been called on S or if |
** then [sqlite3_reset(S)] returns [SQLITE_OK]. | ** [sqlite3_step(S)] has not been called since the previous call |
| ** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return |
| ** [SQLITE_OK]. |
** |
** |
** ^If the most recent call to [sqlite3_step(S)] for the |
** ^If the most recent call to [sqlite3_step(S)] for the |
** [prepared statement] S indicated an error, then |
** [prepared statement] S indicated an error, then |
** [sqlite3_reset(S)] returns an appropriate [error code]. |
** [sqlite3_reset(S)] returns an appropriate [error code]. |
|
** ^The [sqlite3_reset(S)] interface might also return an [error code] |
|
** if there were no prior errors but the process of resetting |
|
** the prepared statement caused a new error. ^For example, if an |
|
** [INSERT] statement with a [RETURNING] clause is only stepped one time, |
|
** that one call to [sqlite3_step(S)] might return SQLITE_ROW but |
|
** the overall statement might still fail and the [sqlite3_reset(S)] call |
|
** might return SQLITE_BUSY if locking constraints prevent the |
|
** database change from committing. Therefore, it is important that |
|
** applications check the return code from [sqlite3_reset(S)] even if |
|
** no prior call to [sqlite3_step(S)] indicated a problem. |
** |
** |
** ^The [sqlite3_reset(S)] interface does not change the values |
** ^The [sqlite3_reset(S)] interface does not change the values |
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. |
Line 5101 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
Line 5386 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions, |
** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions, |
** index expressions, or the WHERE clause of partial indexes. |
** index expressions, or the WHERE clause of partial indexes. |
** |
** |
** <span style="background-color:#ffff90;"> |
|
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for |
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for |
** all application-defined SQL functions that do not need to be |
** all application-defined SQL functions that do not need to be |
** used inside of triggers, view, CHECK constraints, or other elements of |
** used inside of triggers, view, CHECK constraints, or other elements of |
Line 5111 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
Line 5395 SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
** a database file to include invocations of the function with parameters |
** a database file to include invocations of the function with parameters |
** chosen by the attacker, which the application will then execute when |
** chosen by the attacker, which the application will then execute when |
** the database file is opened and read. |
** the database file is opened and read. |
** </span> |
|
** |
** |
** ^(The fifth parameter is an arbitrary pointer. The implementation of the |
** ^(The fifth parameter is an arbitrary pointer. The implementation of the |
** function can gain access to this pointer using [sqlite3_user_data()].)^ |
** function can gain access to this pointer using [sqlite3_user_data()].)^ |
Line 5247 SQLITE_API int sqlite3_create_window_function(
|
Line 5530 SQLITE_API int sqlite3_create_window_function(
|
** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in |
** from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in |
** schema structures such as [CHECK constraints], [DEFAULT clauses], |
** schema structures such as [CHECK constraints], [DEFAULT clauses], |
** [expression indexes], [partial indexes], or [generated columns]. |
** [expression indexes], [partial indexes], or [generated columns]. |
** The SQLITE_DIRECTONLY flags is a security feature which is recommended | ** <p> |
** for all [application-defined SQL functions], and especially for functions | ** The SQLITE_DIRECTONLY flag is recommended for any |
** that have side-effects or that could potentially leak sensitive | ** [application-defined SQL function] |
** information. | ** that has side-effects or that could potentially leak sensitive information. |
| ** This will prevent attacks in which an application is tricked |
| ** into using a database file that has had its schema surreptitiously |
| ** modified to invoke the application-defined function in ways that are |
| ** harmful. |
| ** <p> |
| ** Some people say it is good practice to set SQLITE_DIRECTONLY on all |
| ** [application-defined SQL functions], regardless of whether or not they |
| ** are security sensitive, as doing so prevents those functions from being used |
| ** inside of the database schema, and thus ensures that the database |
| ** can be inspected and modified using generic tools (such as the [CLI]) |
| ** that do not have access to the application-defined functions. |
** </dd> |
** </dd> |
** |
** |
** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd> |
** [[SQLITE_INNOCUOUS]] <dt>SQLITE_INNOCUOUS</dt><dd> |
Line 5457 SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
Line 5751 SQLITE_API int sqlite3_value_nochange(sqlite3_value*);
|
SQLITE_API int sqlite3_value_frombind(sqlite3_value*); |
SQLITE_API int sqlite3_value_frombind(sqlite3_value*); |
|
|
/* |
/* |
|
** CAPI3REF: Report the internal text encoding state of an sqlite3_value object |
|
** METHOD: sqlite3_value |
|
** |
|
** ^(The sqlite3_value_encoding(X) interface returns one of [SQLITE_UTF8], |
|
** [SQLITE_UTF16BE], or [SQLITE_UTF16LE] according to the current text encoding |
|
** of the value X, assuming that X has type TEXT.)^ If sqlite3_value_type(X) |
|
** returns something other than SQLITE_TEXT, then the return value from |
|
** sqlite3_value_encoding(X) is meaningless. ^Calls to |
|
** [sqlite3_value_text(X)], [sqlite3_value_text16(X)], [sqlite3_value_text16be(X)], |
|
** [sqlite3_value_text16le(X)], [sqlite3_value_bytes(X)], or |
|
** [sqlite3_value_bytes16(X)] might change the encoding of the value X and |
|
** thus change the return from subsequent calls to sqlite3_value_encoding(X). |
|
** |
|
** This routine is intended for used by applications that test and validate |
|
** the SQLite implementation. This routine is inquiring about the opaque |
|
** internal state of an [sqlite3_value] object. Ordinary applications should |
|
** not need to know what the internal state of an sqlite3_value object is and |
|
** hence should not need to use this interface. |
|
*/ |
|
SQLITE_API int sqlite3_value_encoding(sqlite3_value*); |
|
|
|
/* |
** CAPI3REF: Finding The Subtype Of SQL Values |
** CAPI3REF: Finding The Subtype Of SQL Values |
** METHOD: sqlite3_value |
** METHOD: sqlite3_value |
** |
** |
Line 5476 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_
|
Line 5792 SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_
|
** object D and returns a pointer to that copy. ^The [sqlite3_value] returned |
** object D and returns a pointer to that copy. ^The [sqlite3_value] returned |
** is a [protected sqlite3_value] object even if the input is not. |
** is a [protected sqlite3_value] object even if the input is not. |
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a |
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a |
** memory allocation fails. | ** memory allocation fails. ^If V is a [pointer value], then the result |
| ** of sqlite3_value_dup(V) is a NULL value. |
** |
** |
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
** ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object |
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer |
Line 5507 SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
Line 5824 SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
** |
** |
** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer |
** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer |
** when first called if N is less than or equal to zero or if a memory |
** when first called if N is less than or equal to zero or if a memory |
** allocate error occurs. | ** allocation error occurs. |
** |
** |
** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is |
** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is |
** determined by the N parameter on first successful call. Changing the |
** determined by the N parameter on first successful call. Changing the |
Line 5712 typedef void (*sqlite3_destructor_type)(void*);
|
Line 6029 typedef void (*sqlite3_destructor_type)(void*);
|
** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]. |
** of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]. |
** ^SQLite takes the text result from the application from |
** ^SQLite takes the text result from the application from |
** the 2nd parameter of the sqlite3_result_text* interfaces. |
** the 2nd parameter of the sqlite3_result_text* interfaces. |
|
** ^If the 3rd parameter to any of the sqlite3_result_text* interfaces |
|
** other than sqlite3_result_text64() is negative, then SQLite computes |
|
** the string length itself by searching the 2nd parameter for the first |
|
** zero character. |
** ^If the 3rd parameter to the sqlite3_result_text* interfaces |
** ^If the 3rd parameter to the sqlite3_result_text* interfaces |
** is negative, then SQLite takes result text from the 2nd parameter |
|
** through the first zero character. |
|
** ^If the 3rd parameter to the sqlite3_result_text* interfaces |
|
** is non-negative, then as many bytes (not characters) of the text |
** is non-negative, then as many bytes (not characters) of the text |
** pointed to by the 2nd parameter are taken as the application-defined |
** pointed to by the 2nd parameter are taken as the application-defined |
** function result. If the 3rd parameter is non-negative, then it |
** function result. If the 3rd parameter is non-negative, then it |
Line 5988 SQLITE_API void sqlite3_activate_cerod(
|
Line 6306 SQLITE_API void sqlite3_activate_cerod(
|
** of the default VFS is not implemented correctly, or not implemented at |
** of the default VFS is not implemented correctly, or not implemented at |
** all, then the behavior of sqlite3_sleep() may deviate from the description |
** all, then the behavior of sqlite3_sleep() may deviate from the description |
** in the previous paragraphs. |
** in the previous paragraphs. |
|
** |
|
** If a negative argument is passed to sqlite3_sleep() the results vary by |
|
** VFS and operating system. Some system treat a negative argument as an |
|
** instruction to sleep forever. Others understand it to mean do not sleep |
|
** at all. ^In SQLite version 3.42.0 and later, a negative |
|
** argument passed into sqlite3_sleep() is changed to zero before it is relayed |
|
** down into the xSleep method of the VFS. |
*/ |
*/ |
SQLITE_API int sqlite3_sleep(int); |
SQLITE_API int sqlite3_sleep(int); |
|
|
Line 6159 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
Line 6484 SQLITE_API int sqlite3_get_autocommit(sqlite3*);
|
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); |
SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); |
|
|
/* |
/* |
|
** CAPI3REF: Return The Schema Name For A Database Connection |
|
** METHOD: sqlite3 |
|
** |
|
** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name |
|
** for the N-th database on database connection D, or a NULL pointer of N is |
|
** out of range. An N value of 0 means the main database file. An N of 1 is |
|
** the "temp" schema. Larger values of N correspond to various ATTACH-ed |
|
** databases. |
|
** |
|
** Space to hold the string that is returned by sqlite3_db_name() is managed |
|
** by SQLite itself. The string might be deallocated by any operation that |
|
** changes the schema, including [ATTACH] or [DETACH] or calls to |
|
** [sqlite3_serialize()] or [sqlite3_deserialize()], even operations that |
|
** occur on a different thread. Applications that need to |
|
** remember the string long-term should make their own copy. Applications that |
|
** are accessing the same database connection simultaneously on multiple |
|
** threads should mutex-protect calls to this API and should make their own |
|
** private copy of the result prior to releasing the mutex. |
|
*/ |
|
SQLITE_API const char *sqlite3_db_name(sqlite3 *db, int N); |
|
|
|
/* |
** CAPI3REF: Return The Filename For A Database Connection |
** CAPI3REF: Return The Filename For A Database Connection |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
** |
** |
Line 6188 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
Line 6535 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
** <li> [sqlite3_filename_wal()] |
** <li> [sqlite3_filename_wal()] |
** </ul> |
** </ul> |
*/ |
*/ |
SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); | SQLITE_API sqlite3_filename sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
|
|
/* |
/* |
** CAPI3REF: Determine if a database is read-only |
** CAPI3REF: Determine if a database is read-only |
Line 6318 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(
|
Line 6665 SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(
|
SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); |
|
|
/* |
/* |
|
** CAPI3REF: Autovacuum Compaction Amount Callback |
|
** METHOD: sqlite3 |
|
** |
|
** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback |
|
** function C that is invoked prior to each autovacuum of the database |
|
** file. ^The callback is passed a copy of the generic data pointer (P), |
|
** the schema-name of the attached database that is being autovacuumed, |
|
** the size of the database file in pages, the number of free pages, |
|
** and the number of bytes per page, respectively. The callback should |
|
** return the number of free pages that should be removed by the |
|
** autovacuum. ^If the callback returns zero, then no autovacuum happens. |
|
** ^If the value returned is greater than or equal to the number of |
|
** free pages, then a complete autovacuum happens. |
|
** |
|
** <p>^If there are multiple ATTACH-ed database files that are being |
|
** modified as part of a transaction commit, then the autovacuum pages |
|
** callback is invoked separately for each file. |
|
** |
|
** <p><b>The callback is not reentrant.</b> The callback function should |
|
** not attempt to invoke any other SQLite interface. If it does, bad |
|
** things may happen, including segmentation faults and corrupt database |
|
** files. The callback function should be a simple function that |
|
** does some arithmetic on its input parameters and returns a result. |
|
** |
|
** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional |
|
** destructor for the P parameter. ^If X is not NULL, then X(P) is |
|
** invoked whenever the database connection closes or when the callback |
|
** is overwritten by another invocation of sqlite3_autovacuum_pages(). |
|
** |
|
** <p>^There is only one autovacuum pages callback per database connection. |
|
** ^Each call to the sqlite3_autovacuum_pages() interface overrides all |
|
** previous invocations for that database connection. ^If the callback |
|
** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer, |
|
** then the autovacuum steps callback is cancelled. The return value |
|
** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might |
|
** be some other error code if something goes wrong. The current |
|
** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other |
|
** return codes might be added in future releases. |
|
** |
|
** <p>If no autovacuum pages callback is specified (the usual case) or |
|
** a NULL pointer is provided for the callback, |
|
** then the default behavior is to vacuum all free pages. So, in other |
|
** words, the default behavior is the same as if the callback function |
|
** were something like this: |
|
** |
|
** <blockquote><pre> |
|
** unsigned int demonstration_autovac_pages_callback( |
|
** void *pClientData, |
|
** const char *zSchema, |
|
** unsigned int nDbPage, |
|
** unsigned int nFreePage, |
|
** unsigned int nBytePerPage |
|
** ){ |
|
** return nFreePage; |
|
** } |
|
** </pre></blockquote> |
|
*/ |
|
SQLITE_API int sqlite3_autovacuum_pages( |
|
sqlite3 *db, |
|
unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int), |
|
void*, |
|
void(*)(void*) |
|
); |
|
|
|
|
|
/* |
** CAPI3REF: Data Change Notification Callbacks |
** CAPI3REF: Data Change Notification Callbacks |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
** |
** |
Line 6380 SQLITE_API void *sqlite3_update_hook(
|
Line 6793 SQLITE_API void *sqlite3_update_hook(
|
** to the same database. Sharing is enabled if the argument is true |
** to the same database. Sharing is enabled if the argument is true |
** and disabled if the argument is false.)^ |
** and disabled if the argument is false.)^ |
** |
** |
|
** This interface is omitted if SQLite is compiled with |
|
** [-DSQLITE_OMIT_SHARED_CACHE]. The [-DSQLITE_OMIT_SHARED_CACHE] |
|
** compile-time option is recommended because the |
|
** [use of shared cache mode is discouraged]. |
|
** |
** ^Cache sharing is enabled and disabled for an entire process. |
** ^Cache sharing is enabled and disabled for an entire process. |
** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). |
** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). |
** In prior versions of SQLite, |
** In prior versions of SQLite, |
Line 6478 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
Line 6896 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
** ^The soft heap limit may not be greater than the hard heap limit. |
** ^The soft heap limit may not be greater than the hard heap limit. |
** ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N) |
** ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N) |
** is invoked with a value of N that is greater than the hard heap limit, |
** is invoked with a value of N that is greater than the hard heap limit, |
** the the soft heap limit is set to the value of the hard heap limit. | ** the soft heap limit is set to the value of the hard heap limit. |
** ^The soft heap limit is automatically enabled whenever the hard heap |
** ^The soft heap limit is automatically enabled whenever the hard heap |
** limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and |
** limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and |
** the soft heap limit is outside the range of 1..N, then the soft heap |
** the soft heap limit is outside the range of 1..N, then the soft heap |
Line 6740 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEn
|
Line 7158 SQLITE_API int sqlite3_cancel_auto_extension(void(*xEn
|
SQLITE_API void sqlite3_reset_auto_extension(void); |
SQLITE_API void sqlite3_reset_auto_extension(void); |
|
|
/* |
/* |
** The interface to the virtual-table mechanism is currently considered |
|
** to be experimental. The interface might change in incompatible ways. |
|
** If this is a problem for you, do not use the interface at this time. |
|
** |
|
** When the virtual-table mechanism stabilizes, we will declare the |
|
** interface fixed, support it indefinitely, and remove this comment. |
|
*/ |
|
|
|
/* |
|
** Structures used by the virtual table interface |
** Structures used by the virtual table interface |
*/ |
*/ |
typedef struct sqlite3_vtab sqlite3_vtab; |
typedef struct sqlite3_vtab sqlite3_vtab; |
Line 6866 struct sqlite3_module {
|
Line 7275 struct sqlite3_module {
|
** when the omit flag is true there is no guarantee that the constraint will |
** when the omit flag is true there is no guarantee that the constraint will |
** not be checked again using byte code.)^ |
** not be checked again using byte code.)^ |
** |
** |
** ^The idxNum and idxPtr values are recorded and passed into the | ** ^The idxNum and idxStr values are recorded and passed into the |
** [xFilter] method. |
** [xFilter] method. |
** ^[sqlite3_free()] is used to free idxPtr if and only if | ** ^[sqlite3_free()] is used to free idxStr if and only if |
** needToFreeIdxPtr is true. | ** needToFreeIdxStr is true. |
** |
** |
** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in |
** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in |
** the correct order to satisfy the ORDER BY clause so that no separate |
** the correct order to satisfy the ORDER BY clause so that no separate |
Line 6958 struct sqlite3_index_info {
|
Line 7367 struct sqlite3_index_info {
|
** |
** |
** These macros define the allowed values for the |
** These macros define the allowed values for the |
** [sqlite3_index_info].aConstraint[].op field. Each value represents |
** [sqlite3_index_info].aConstraint[].op field. Each value represents |
** an operator that is part of a constraint term in the wHERE clause of | ** an operator that is part of a constraint term in the WHERE clause of |
** a query that uses a [virtual table]. |
** a query that uses a [virtual table]. |
|
** |
|
** ^The left-hand operand of the operator is given by the corresponding |
|
** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand |
|
** operand is the rowid. |
|
** The SQLITE_INDEX_CONSTRAINT_LIMIT and SQLITE_INDEX_CONSTRAINT_OFFSET |
|
** operators have no left-hand operand, and so for those operators the |
|
** corresponding aConstraint[].iColumn is meaningless and should not be |
|
** used. |
|
** |
|
** All operator values from SQLITE_INDEX_CONSTRAINT_FUNCTION through |
|
** value 255 are reserved to represent functions that are overloaded |
|
** by the [xFindFunction|xFindFunction method] of the virtual table |
|
** implementation. |
|
** |
|
** The right-hand operands for each constraint might be accessible using |
|
** the [sqlite3_vtab_rhs_value()] interface. Usually the right-hand |
|
** operand is only available if it appears as a single constant literal |
|
** in the input SQL. If the right-hand operand is another column or an |
|
** expression (even a constant expression) or a parameter, then the |
|
** sqlite3_vtab_rhs_value() probably will not be able to extract it. |
|
** ^The SQLITE_INDEX_CONSTRAINT_ISNULL and |
|
** SQLITE_INDEX_CONSTRAINT_ISNOTNULL operators have no right-hand operand |
|
** and hence calls to sqlite3_vtab_rhs_value() for those operators will |
|
** always return SQLITE_NOTFOUND. |
|
** |
|
** The collating sequence to be used for comparison can be found using |
|
** the [sqlite3_vtab_collation()] interface. For most real-world virtual |
|
** tables, the collating sequence of constraints does not matter (for example |
|
** because the constraints are numeric) and so the sqlite3_vtab_collation() |
|
** interface is not commonly needed. |
*/ |
*/ |
#define SQLITE_INDEX_CONSTRAINT_EQ 2 | #define SQLITE_INDEX_CONSTRAINT_EQ 2 |
#define SQLITE_INDEX_CONSTRAINT_GT 4 | #define SQLITE_INDEX_CONSTRAINT_GT 4 |
#define SQLITE_INDEX_CONSTRAINT_LE 8 | #define SQLITE_INDEX_CONSTRAINT_LE 8 |
#define SQLITE_INDEX_CONSTRAINT_LT 16 | #define SQLITE_INDEX_CONSTRAINT_LT 16 |
#define SQLITE_INDEX_CONSTRAINT_GE 32 | #define SQLITE_INDEX_CONSTRAINT_GE 32 |
#define SQLITE_INDEX_CONSTRAINT_MATCH 64 | #define SQLITE_INDEX_CONSTRAINT_MATCH 64 |
#define SQLITE_INDEX_CONSTRAINT_LIKE 65 | #define SQLITE_INDEX_CONSTRAINT_LIKE 65 |
#define SQLITE_INDEX_CONSTRAINT_GLOB 66 | #define SQLITE_INDEX_CONSTRAINT_GLOB 66 |
#define SQLITE_INDEX_CONSTRAINT_REGEXP 67 | #define SQLITE_INDEX_CONSTRAINT_REGEXP 67 |
#define SQLITE_INDEX_CONSTRAINT_NE 68 | #define SQLITE_INDEX_CONSTRAINT_NE 68 |
#define SQLITE_INDEX_CONSTRAINT_ISNOT 69 | #define SQLITE_INDEX_CONSTRAINT_ISNOT 69 |
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70 | #define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70 |
#define SQLITE_INDEX_CONSTRAINT_ISNULL 71 | #define SQLITE_INDEX_CONSTRAINT_ISNULL 71 |
#define SQLITE_INDEX_CONSTRAINT_IS 72 | #define SQLITE_INDEX_CONSTRAINT_IS 72 |
#define SQLITE_INDEX_CONSTRAINT_FUNCTION 150 | #define SQLITE_INDEX_CONSTRAINT_LIMIT 73 |
| #define SQLITE_INDEX_CONSTRAINT_OFFSET 74 |
| #define SQLITE_INDEX_CONSTRAINT_FUNCTION 150 |
|
|
/* |
/* |
** CAPI3REF: Register A Virtual Table Implementation |
** CAPI3REF: Register A Virtual Table Implementation |
Line 7004 struct sqlite3_index_info {
|
Line 7445 struct sqlite3_index_info {
|
** destructor. |
** destructor. |
** |
** |
** ^If the third parameter (the pointer to the sqlite3_module object) is |
** ^If the third parameter (the pointer to the sqlite3_module object) is |
** NULL then no new module is create and any existing modules with the | ** NULL then no new module is created and any existing modules with the |
** same name are dropped. |
** same name are dropped. |
** |
** |
** See also: [sqlite3_drop_modules()] |
** See also: [sqlite3_drop_modules()] |
Line 7117 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const ch
|
Line 7558 SQLITE_API int sqlite3_declare_vtab(sqlite3*, const ch
|
SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); |
|
|
/* |
/* |
** The interface to the virtual-table mechanism defined above (back up |
|
** to a comment remarkably similar to this one) is currently considered |
|
** to be experimental. The interface might change in incompatible ways. |
|
** If this is a problem for you, do not use the interface at this time. |
|
** |
|
** When the virtual-table mechanism stabilizes, we will declare the |
|
** interface fixed, support it indefinitely, and remove this comment. |
|
*/ |
|
|
|
/* |
|
** CAPI3REF: A Handle To An Open BLOB |
** CAPI3REF: A Handle To An Open BLOB |
** KEYWORDS: {BLOB handle} {BLOB handles} |
** KEYWORDS: {BLOB handle} {BLOB handles} |
** |
** |
Line 7509 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
Line 7940 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
** is undefined if the mutex is not currently entered by the |
** is undefined if the mutex is not currently entered by the |
** calling thread or is not currently allocated. |
** calling thread or is not currently allocated. |
** |
** |
** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or | ** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), |
** sqlite3_mutex_leave() is a NULL pointer, then all three routines | ** sqlite3_mutex_leave(), or sqlite3_mutex_free() is a NULL pointer, |
** behave as no-ops. | ** then any of the four routines behaves as a no-op. |
** |
** |
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. |
*/ |
*/ |
Line 7779 SQLITE_API int sqlite3_test_control(int op, ...);
|
Line 8210 SQLITE_API int sqlite3_test_control(int op, ...);
|
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29 |
#define SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS 29 |
#define SQLITE_TESTCTRL_SEEK_COUNT 30 |
#define SQLITE_TESTCTRL_SEEK_COUNT 30 |
#define SQLITE_TESTCTRL_TRACEFLAGS 31 |
#define SQLITE_TESTCTRL_TRACEFLAGS 31 |
#define SQLITE_TESTCTRL_LAST 31 /* Largest TESTCTRL */ | #define SQLITE_TESTCTRL_TUNE 32 |
| #define SQLITE_TESTCTRL_LOGEST 33 |
| #define SQLITE_TESTCTRL_USELONGDOUBLE 34 |
| #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */ |
|
|
/* |
/* |
** CAPI3REF: SQL Keyword Checking |
** CAPI3REF: SQL Keyword Checking |
Line 8302 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int
|
Line 8736 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int
|
** The counter is incremented on the first [sqlite3_step()] call of each |
** The counter is incremented on the first [sqlite3_step()] call of each |
** cycle. |
** cycle. |
** |
** |
|
** [[SQLITE_STMTSTATUS_FILTER_MISS]] |
|
** [[SQLITE_STMTSTATUS_FILTER HIT]] |
|
** <dt>SQLITE_STMTSTATUS_FILTER_HIT<br> |
|
** SQLITE_STMTSTATUS_FILTER_MISS</dt> |
|
** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join |
|
** step was bypassed because a Bloom filter returned not-found. The |
|
** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of |
|
** times that the Bloom filter returned a find, and thus the join step |
|
** had to be processed as normal. |
|
** |
** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt> |
** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt> |
** <dd>^This is the approximate number of bytes of heap memory |
** <dd>^This is the approximate number of bytes of heap memory |
** used to store the prepared statement. ^This value is not actually |
** used to store the prepared statement. ^This value is not actually |
Line 8316 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int
|
Line 8760 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int
|
#define SQLITE_STMTSTATUS_VM_STEP 4 |
#define SQLITE_STMTSTATUS_VM_STEP 4 |
#define SQLITE_STMTSTATUS_REPREPARE 5 |
#define SQLITE_STMTSTATUS_REPREPARE 5 |
#define SQLITE_STMTSTATUS_RUN 6 |
#define SQLITE_STMTSTATUS_RUN 6 |
|
#define SQLITE_STMTSTATUS_FILTER_MISS 7 |
|
#define SQLITE_STMTSTATUS_FILTER_HIT 8 |
#define SQLITE_STMTSTATUS_MEMUSED 99 |
#define SQLITE_STMTSTATUS_MEMUSED 99 |
|
|
/* |
/* |
Line 8727 typedef struct sqlite3_backup sqlite3_backup;
|
Line 9173 typedef struct sqlite3_backup sqlite3_backup;
|
** if the application incorrectly accesses the destination [database connection] |
** if the application incorrectly accesses the destination [database connection] |
** and so no error code is reported, but the operations may malfunction |
** and so no error code is reported, but the operations may malfunction |
** nevertheless. Use of the destination database connection while a |
** nevertheless. Use of the destination database connection while a |
** backup is in progress might also also cause a mutex deadlock. | ** backup is in progress might also cause a mutex deadlock. |
** |
** |
** If running in [shared cache mode], the application must |
** If running in [shared cache mode], the application must |
** guarantee that the shared cache used by the destination database |
** guarantee that the shared cache used by the destination database |
Line 8799 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup
|
Line 9245 SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup
|
** blocked connection already has a registered unlock-notify callback, |
** blocked connection already has a registered unlock-notify callback, |
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is |
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is |
** called with a NULL pointer as its second argument, then any existing |
** called with a NULL pointer as its second argument, then any existing |
** unlock-notify callback is canceled. ^The blocked connections | ** unlock-notify callback is cancelled. ^The blocked connections |
** unlock-notify callback may also be canceled by closing the blocked | ** unlock-notify callback may also be cancelled by closing the blocked |
** connection using [sqlite3_close()]. |
** connection using [sqlite3_close()]. |
** |
** |
** The unlock-notify callback is not reentrant. If an application invokes |
** The unlock-notify callback is not reentrant. If an application invokes |
Line 8979 SQLITE_API void sqlite3_log(int iErrCode, const char *
|
Line 9425 SQLITE_API void sqlite3_log(int iErrCode, const char *
|
** |
** |
** A single database handle may have at most a single write-ahead log callback |
** A single database handle may have at most a single write-ahead log callback |
** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any |
** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any |
** previously registered write-ahead log callback. ^Note that the | ** previously registered write-ahead log callback. ^The return value is |
** [sqlite3_wal_autocheckpoint()] interface and the | ** a copy of the third parameter from the previous call, if any, or 0. |
| ** ^Note that the [sqlite3_wal_autocheckpoint()] interface and the |
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will |
** overwrite any prior [sqlite3_wal_hook()] settings. |
** overwrite any prior [sqlite3_wal_hook()] settings. |
*/ |
*/ |
Line 9154 SQLITE_API int sqlite3_wal_checkpoint_v2(
|
Line 9601 SQLITE_API int sqlite3_wal_checkpoint_v2(
|
*/ |
*/ |
#define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */ |
#define SQLITE_CHECKPOINT_PASSIVE 0 /* Do as much as possible w/o blocking */ |
#define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */ |
#define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */ |
#define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for for readers */ | #define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for readers */ |
#define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */ |
#define SQLITE_CHECKPOINT_TRUNCATE 3 /* Like RESTART but also truncate WAL */ |
|
|
/* |
/* |
Line 9222 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, .
|
Line 9669 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, .
|
** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt> |
** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt> |
** <dd>Calls of the form |
** <dd>Calls of the form |
** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the |
** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the |
** the [xConnect] or [xCreate] methods of a [virtual table] implmentation | ** the [xConnect] or [xCreate] methods of a [virtual table] implementation |
** prohibits that virtual table from being used from within triggers and |
** prohibits that virtual table from being used from within triggers and |
** views. |
** views. |
** </dd> |
** </dd> |
Line 9230 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, .
|
Line 9677 SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, .
|
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt> |
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt> |
** <dd>Calls of the form |
** <dd>Calls of the form |
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the |
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the |
** the [xConnect] or [xCreate] methods of a [virtual table] implmentation | ** the [xConnect] or [xCreate] methods of a [virtual table] implementation |
** identify that virtual table as being safe to use from within triggers |
** identify that virtual table as being safe to use from within triggers |
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the |
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the |
** virtual table can do no serious harm even if it is controlled by a |
** virtual table can do no serious harm even if it is controlled by a |
** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS |
** malicious hacker. Developers should avoid setting the SQLITE_VTAB_INNOCUOUS |
** flag unless absolutely necessary. |
** flag unless absolutely necessary. |
** </dd> |
** </dd> |
|
** |
|
** [[SQLITE_VTAB_USES_ALL_SCHEMAS]]<dt>SQLITE_VTAB_USES_ALL_SCHEMAS</dt> |
|
** <dd>Calls of the form |
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_USES_ALL_SCHEMA) from within the |
|
** the [xConnect] or [xCreate] methods of a [virtual table] implementation |
|
** instruct the query planner to begin at least a read transaction on |
|
** all schemas ("main", "temp", and any ATTACH-ed databases) whenever the |
|
** virtual table is used. |
|
** </dd> |
** </dl> |
** </dl> |
*/ |
*/ |
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 |
#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 |
#define SQLITE_VTAB_INNOCUOUS 2 |
#define SQLITE_VTAB_INNOCUOUS 2 |
#define SQLITE_VTAB_DIRECTONLY 3 |
#define SQLITE_VTAB_DIRECTONLY 3 |
|
#define SQLITE_VTAB_USES_ALL_SCHEMAS 4 |
|
|
/* |
/* |
** CAPI3REF: Determine The Virtual Table Conflict Policy |
** CAPI3REF: Determine The Virtual Table Conflict Policy |
Line 9283 SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*)
|
Line 9740 SQLITE_API int sqlite3_vtab_nochange(sqlite3_context*)
|
|
|
/* |
/* |
** CAPI3REF: Determine The Collation For a Virtual Table Constraint |
** CAPI3REF: Determine The Collation For a Virtual Table Constraint |
|
** METHOD: sqlite3_index_info |
** |
** |
** This function may only be called from within a call to the [xBestIndex] |
** This function may only be called from within a call to the [xBestIndex] |
** method of a [virtual table]. | ** method of a [virtual table]. This function returns a pointer to a string |
| ** that is the name of the appropriate collation sequence to use for text |
| ** comparisons on the constraint identified by its arguments. |
** |
** |
** The first argument must be the sqlite3_index_info object that is the | ** The first argument must be the pointer to the [sqlite3_index_info] object |
** first parameter to the xBestIndex() method. The second argument must be | ** that is the first parameter to the xBestIndex() method. The second argument |
** an index into the aConstraint[] array belonging to the sqlite3_index_info | ** must be an index into the aConstraint[] array belonging to the |
** structure passed to xBestIndex. This function returns a pointer to a buffer | ** sqlite3_index_info structure passed to xBestIndex. |
** containing the name of the collation sequence for the corresponding | ** |
** constraint. | ** Important: |
| ** The first parameter must be the same pointer that is passed into the |
| ** xBestMethod() method. The first parameter may not be a pointer to a |
| ** different [sqlite3_index_info] object, even an exact copy. |
| ** |
| ** The return value is computed as follows: |
| ** |
| ** <ol> |
| ** <li><p> If the constraint comes from a WHERE clause expression that contains |
| ** a [COLLATE operator], then the name of the collation specified by |
| ** that COLLATE operator is returned. |
| ** <li><p> If there is no COLLATE operator, but the column that is the subject |
| ** of the constraint specifies an alternative collating sequence via |
| ** a [COLLATE clause] on the column definition within the CREATE TABLE |
| ** statement that was passed into [sqlite3_declare_vtab()], then the |
| ** name of that alternative collating sequence is returned. |
| ** <li><p> Otherwise, "BINARY" is returned. |
| ** </ol> |
*/ |
*/ |
SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vtab_collation(sqlite3_index_info*,int); | SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int); |
|
|
/* |
/* |
|
** CAPI3REF: Determine if a virtual table query is DISTINCT |
|
** METHOD: sqlite3_index_info |
|
** |
|
** This API may only be used from within an [xBestIndex|xBestIndex method] |
|
** of a [virtual table] implementation. The result of calling this |
|
** interface from outside of xBestIndex() is undefined and probably harmful. |
|
** |
|
** ^The sqlite3_vtab_distinct() interface returns an integer between 0 and |
|
** 3. The integer returned by sqlite3_vtab_distinct() |
|
** gives the virtual table additional information about how the query |
|
** planner wants the output to be ordered. As long as the virtual table |
|
** can meet the ordering requirements of the query planner, it may set |
|
** the "orderByConsumed" flag. |
|
** |
|
** <ol><li value="0"><p> |
|
** ^If the sqlite3_vtab_distinct() interface returns 0, that means |
|
** that the query planner needs the virtual table to return all rows in the |
|
** sort order defined by the "nOrderBy" and "aOrderBy" fields of the |
|
** [sqlite3_index_info] object. This is the default expectation. If the |
|
** virtual table outputs all rows in sorted order, then it is always safe for |
|
** the xBestIndex method to set the "orderByConsumed" flag, regardless of |
|
** the return value from sqlite3_vtab_distinct(). |
|
** <li value="1"><p> |
|
** ^(If the sqlite3_vtab_distinct() interface returns 1, that means |
|
** that the query planner does not need the rows to be returned in sorted order |
|
** as long as all rows with the same values in all columns identified by the |
|
** "aOrderBy" field are adjacent.)^ This mode is used when the query planner |
|
** is doing a GROUP BY. |
|
** <li value="2"><p> |
|
** ^(If the sqlite3_vtab_distinct() interface returns 2, that means |
|
** that the query planner does not need the rows returned in any particular |
|
** order, as long as rows with the same values in all "aOrderBy" columns |
|
** are adjacent.)^ ^(Furthermore, only a single row for each particular |
|
** combination of values in the columns identified by the "aOrderBy" field |
|
** needs to be returned.)^ ^It is always ok for two or more rows with the same |
|
** values in all "aOrderBy" columns to be returned, as long as all such rows |
|
** are adjacent. ^The virtual table may, if it chooses, omit extra rows |
|
** that have the same value for all columns identified by "aOrderBy". |
|
** ^However omitting the extra rows is optional. |
|
** This mode is used for a DISTINCT query. |
|
** <li value="3"><p> |
|
** ^(If the sqlite3_vtab_distinct() interface returns 3, that means |
|
** that the query planner needs only distinct rows but it does need the |
|
** rows to be sorted.)^ ^The virtual table implementation is free to omit |
|
** rows that are identical in all aOrderBy columns, if it wants to, but |
|
** it is not required to omit any rows. This mode is used for queries |
|
** that have both DISTINCT and ORDER BY clauses. |
|
** </ol> |
|
** |
|
** ^For the purposes of comparing virtual table output values to see if the |
|
** values are same value for sorting purposes, two NULL values are considered |
|
** to be the same. In other words, the comparison operator is "IS" |
|
** (or "IS NOT DISTINCT FROM") and not "==". |
|
** |
|
** If a virtual table implementation is unable to meet the requirements |
|
** specified above, then it must not set the "orderByConsumed" flag in the |
|
** [sqlite3_index_info] object or an incorrect answer may result. |
|
** |
|
** ^A virtual table implementation is always free to return rows in any order |
|
** it wants, as long as the "orderByConsumed" flag is not set. ^When the |
|
** the "orderByConsumed" flag is unset, the query planner will add extra |
|
** [bytecode] to ensure that the final results returned by the SQL query are |
|
** ordered correctly. The use of the "orderByConsumed" flag and the |
|
** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful |
|
** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed" |
|
** flag might help queries against a virtual table to run faster. Being |
|
** overly aggressive and setting the "orderByConsumed" flag when it is not |
|
** valid to do so, on the other hand, might cause SQLite to return incorrect |
|
** results. |
|
*/ |
|
SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*); |
|
|
|
/* |
|
** CAPI3REF: Identify and handle IN constraints in xBestIndex |
|
** |
|
** This interface may only be used from within an |
|
** [xBestIndex|xBestIndex() method] of a [virtual table] implementation. |
|
** The result of invoking this interface from any other context is |
|
** undefined and probably harmful. |
|
** |
|
** ^(A constraint on a virtual table of the form |
|
** "[IN operator|column IN (...)]" is |
|
** communicated to the xBestIndex method as a |
|
** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use |
|
** this constraint, it must set the corresponding |
|
** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under |
|
** the usual mode of handling IN operators, SQLite generates [bytecode] |
|
** that invokes the [xFilter|xFilter() method] once for each value |
|
** on the right-hand side of the IN operator.)^ Thus the virtual table |
|
** only sees a single value from the right-hand side of the IN operator |
|
** at a time. |
|
** |
|
** In some cases, however, it would be advantageous for the virtual |
|
** table to see all values on the right-hand of the IN operator all at |
|
** once. The sqlite3_vtab_in() interfaces facilitates this in two ways: |
|
** |
|
** <ol> |
|
** <li><p> |
|
** ^A call to sqlite3_vtab_in(P,N,-1) will return true (non-zero) |
|
** if and only if the [sqlite3_index_info|P->aConstraint][N] constraint |
|
** is an [IN operator] that can be processed all at once. ^In other words, |
|
** sqlite3_vtab_in() with -1 in the third argument is a mechanism |
|
** by which the virtual table can ask SQLite if all-at-once processing |
|
** of the IN operator is even possible. |
|
** |
|
** <li><p> |
|
** ^A call to sqlite3_vtab_in(P,N,F) with F==1 or F==0 indicates |
|
** to SQLite that the virtual table does or does not want to process |
|
** the IN operator all-at-once, respectively. ^Thus when the third |
|
** parameter (F) is non-negative, this interface is the mechanism by |
|
** which the virtual table tells SQLite how it wants to process the |
|
** IN operator. |
|
** </ol> |
|
** |
|
** ^The sqlite3_vtab_in(P,N,F) interface can be invoked multiple times |
|
** within the same xBestIndex method call. ^For any given P,N pair, |
|
** the return value from sqlite3_vtab_in(P,N,F) will always be the same |
|
** within the same xBestIndex call. ^If the interface returns true |
|
** (non-zero), that means that the constraint is an IN operator |
|
** that can be processed all-at-once. ^If the constraint is not an IN |
|
** operator or cannot be processed all-at-once, then the interface returns |
|
** false. |
|
** |
|
** ^(All-at-once processing of the IN operator is selected if both of the |
|
** following conditions are met: |
|
** |
|
** <ol> |
|
** <li><p> The P->aConstraintUsage[N].argvIndex value is set to a positive |
|
** integer. This is how the virtual table tells SQLite that it wants to |
|
** use the N-th constraint. |
|
** |
|
** <li><p> The last call to sqlite3_vtab_in(P,N,F) for which F was |
|
** non-negative had F>=1. |
|
** </ol>)^ |
|
** |
|
** ^If either or both of the conditions above are false, then SQLite uses |
|
** the traditional one-at-a-time processing strategy for the IN constraint. |
|
** ^If both conditions are true, then the argvIndex-th parameter to the |
|
** xFilter method will be an [sqlite3_value] that appears to be NULL, |
|
** but which can be passed to [sqlite3_vtab_in_first()] and |
|
** [sqlite3_vtab_in_next()] to find all values on the right-hand side |
|
** of the IN constraint. |
|
*/ |
|
SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle); |
|
|
|
/* |
|
** CAPI3REF: Find all elements on the right-hand side of an IN constraint. |
|
** |
|
** These interfaces are only useful from within the |
|
** [xFilter|xFilter() method] of a [virtual table] implementation. |
|
** The result of invoking these interfaces from any other context |
|
** is undefined and probably harmful. |
|
** |
|
** The X parameter in a call to sqlite3_vtab_in_first(X,P) or |
|
** sqlite3_vtab_in_next(X,P) should be one of the parameters to the |
|
** xFilter method which invokes these routines, and specifically |
|
** a parameter that was previously selected for all-at-once IN constraint |
|
** processing use the [sqlite3_vtab_in()] interface in the |
|
** [xBestIndex|xBestIndex method]. ^(If the X parameter is not |
|
** an xFilter argument that was selected for all-at-once IN constraint |
|
** processing, then these routines return [SQLITE_ERROR].)^ |
|
** |
|
** ^(Use these routines to access all values on the right-hand side |
|
** of the IN constraint using code like the following: |
|
** |
|
** <blockquote><pre> |
|
** for(rc=sqlite3_vtab_in_first(pList, &pVal); |
|
** rc==SQLITE_OK && pVal; |
|
** rc=sqlite3_vtab_in_next(pList, &pVal) |
|
** ){ |
|
** // do something with pVal |
|
** } |
|
** if( rc!=SQLITE_OK ){ |
|
** // an error has occurred |
|
** } |
|
** </pre></blockquote>)^ |
|
** |
|
** ^On success, the sqlite3_vtab_in_first(X,P) and sqlite3_vtab_in_next(X,P) |
|
** routines return SQLITE_OK and set *P to point to the first or next value |
|
** on the RHS of the IN constraint. ^If there are no more values on the |
|
** right hand side of the IN constraint, then *P is set to NULL and these |
|
** routines return [SQLITE_DONE]. ^The return value might be |
|
** some other value, such as SQLITE_NOMEM, in the event of a malfunction. |
|
** |
|
** The *ppOut values returned by these routines are only valid until the |
|
** next call to either of these routines or until the end of the xFilter |
|
** method from which these routines were called. If the virtual table |
|
** implementation needs to retain the *ppOut values for longer, it must make |
|
** copies. The *ppOut values are [protected sqlite3_value|protected]. |
|
*/ |
|
SQLITE_API int sqlite3_vtab_in_first(sqlite3_value *pVal, sqlite3_value **ppOut); |
|
SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut); |
|
|
|
/* |
|
** CAPI3REF: Constraint values in xBestIndex() |
|
** METHOD: sqlite3_index_info |
|
** |
|
** This API may only be used from within the [xBestIndex|xBestIndex method] |
|
** of a [virtual table] implementation. The result of calling this interface |
|
** from outside of an xBestIndex method are undefined and probably harmful. |
|
** |
|
** ^When the sqlite3_vtab_rhs_value(P,J,V) interface is invoked from within |
|
** the [xBestIndex] method of a [virtual table] implementation, with P being |
|
** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and |
|
** J being a 0-based index into P->aConstraint[], then this routine |
|
** attempts to set *V to the value of the right-hand operand of |
|
** that constraint if the right-hand operand is known. ^If the |
|
** right-hand operand is not known, then *V is set to a NULL pointer. |
|
** ^The sqlite3_vtab_rhs_value(P,J,V) interface returns SQLITE_OK if |
|
** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V) |
|
** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th |
|
** constraint is not available. ^The sqlite3_vtab_rhs_value() interface |
|
** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if |
|
** something goes wrong. |
|
** |
|
** The sqlite3_vtab_rhs_value() interface is usually only successful if |
|
** the right-hand operand of a constraint is a literal value in the original |
|
** SQL statement. If the right-hand operand is an expression or a reference |
|
** to some other column or a [host parameter], then sqlite3_vtab_rhs_value() |
|
** will probably return [SQLITE_NOTFOUND]. |
|
** |
|
** ^(Some constraints, such as [SQLITE_INDEX_CONSTRAINT_ISNULL] and |
|
** [SQLITE_INDEX_CONSTRAINT_ISNOTNULL], have no right-hand operand. For such |
|
** constraints, sqlite3_vtab_rhs_value() always returns SQLITE_NOTFOUND.)^ |
|
** |
|
** ^The [sqlite3_value] object returned in *V is a protected sqlite3_value |
|
** and remains valid for the duration of the xBestIndex method call. |
|
** ^When xBestIndex returns, the sqlite3_value object returned by |
|
** sqlite3_vtab_rhs_value() is automatically deallocated. |
|
** |
|
** The "_rhs_" in the name of this routine is an abbreviation for |
|
** "Right-Hand Side". |
|
*/ |
|
SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **ppVal); |
|
|
|
/* |
** CAPI3REF: Conflict resolution modes |
** CAPI3REF: Conflict resolution modes |
** KEYWORDS: {conflict resolution mode} |
** KEYWORDS: {conflict resolution mode} |
** |
** |
Line 9326 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
Line 10039 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
** managed by the prepared statement S and will be automatically freed when |
** managed by the prepared statement S and will be automatically freed when |
** S is finalized. |
** S is finalized. |
** |
** |
|
** Not all values are available for all query elements. When a value is |
|
** not available, the output variable is set to -1 if the value is numeric, |
|
** or to NULL if it is a string (SQLITE_SCANSTAT_NAME). |
|
** |
** <dl> |
** <dl> |
** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt> |
** [[SQLITE_SCANSTAT_NLOOP]] <dt>SQLITE_SCANSTAT_NLOOP</dt> |
** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be |
** <dd>^The [sqlite3_int64] variable pointed to by the V parameter will be |
Line 9353 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
Line 10070 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] |
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] |
** description for the X-th loop. |
** description for the X-th loop. |
** |
** |
** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECT</dt> | ** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt> |
** <dd>^The "int" variable pointed to by the V parameter will be set to the |
** <dd>^The "int" variable pointed to by the V parameter will be set to the |
** "select-id" for the X-th loop. The select-id identifies which query or | ** id for the X-th query plan element. The id value is unique within the |
** subquery the loop is part of. The main query has a select-id of zero. | ** statement. The select-id is the same value as is output in the first |
** The select-id is the same value as is output in the first column | ** column of an [EXPLAIN QUERY PLAN] query. |
** of an [EXPLAIN QUERY PLAN] query. | ** |
| ** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt> |
| ** <dd>The "int" variable pointed to by the V parameter will be set to the |
| ** the id of the parent of the current query element, if applicable, or |
| ** to zero if the query element has no parent. This is the same value as |
| ** returned in the second column of an [EXPLAIN QUERY PLAN] query. |
| ** |
| ** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt> |
| ** <dd>The sqlite3_int64 output value is set to the number of cycles, |
| ** according to the processor time-stamp counter, that elapsed while the |
| ** query element was being processed. This value is not available for |
| ** all query elements - if it is unavailable the output variable is |
| ** set to -1. |
** </dl> |
** </dl> |
*/ |
*/ |
#define SQLITE_SCANSTAT_NLOOP 0 |
#define SQLITE_SCANSTAT_NLOOP 0 |
Line 9367 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
Line 10096 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
#define SQLITE_SCANSTAT_NAME 3 |
#define SQLITE_SCANSTAT_NAME 3 |
#define SQLITE_SCANSTAT_EXPLAIN 4 |
#define SQLITE_SCANSTAT_EXPLAIN 4 |
#define SQLITE_SCANSTAT_SELECTID 5 |
#define SQLITE_SCANSTAT_SELECTID 5 |
|
#define SQLITE_SCANSTAT_PARENTID 6 |
|
#define SQLITE_SCANSTAT_NCYCLE 7 |
|
|
/* |
/* |
** CAPI3REF: Prepared Statement Scan Status |
** CAPI3REF: Prepared Statement Scan Status |
** METHOD: sqlite3_stmt |
** METHOD: sqlite3_stmt |
** |
** |
** This interface returns information about the predicted and measured | ** These interfaces return information about the predicted and measured |
** performance for pStmt. Advanced applications can use this |
** performance for pStmt. Advanced applications can use this |
** interface to compare the predicted and the measured performance and |
** interface to compare the predicted and the measured performance and |
** issue warnings and/or rerun [ANALYZE] if discrepancies are found. |
** issue warnings and/or rerun [ANALYZE] if discrepancies are found. |
Line 9383 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
Line 10114 SQLITE_API SQLITE_EXPERIMENTAL const char *sqlite3_vta
|
** |
** |
** The "iScanStatusOp" parameter determines which status information to return. |
** The "iScanStatusOp" parameter determines which status information to return. |
** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior |
** The "iScanStatusOp" must be one of the [scanstatus options] or the behavior |
** of this interface is undefined. | ** of this interface is undefined. ^The requested measurement is written into |
** ^The requested measurement is written into a variable pointed to by | ** a variable pointed to by the "pOut" parameter. |
** the "pOut" parameter. | |
** Parameter "idx" identifies the specific loop to retrieve statistics for. | |
** Loops are numbered starting from zero. ^If idx is out of range - less than | |
** zero or greater than or equal to the total number of loops used to implement | |
** the statement - a non-zero value is returned and the variable that pOut | |
** points to is unchanged. | |
** |
** |
** ^Statistics might not be available for all loops in all statements. ^In cases | ** The "flags" parameter must be passed a mask of flags. At present only |
** where there exist loops with no available statistics, this function behaves | ** one flag is defined - SQLITE_SCANSTAT_COMPLEX. If SQLITE_SCANSTAT_COMPLEX |
** as if the loop did not exist - it returns non-zero and leave the variable | ** is specified, then status information is available for all elements |
** that pOut points to unchanged. | ** of a query plan that are reported by "EXPLAIN QUERY PLAN" output. If |
| ** SQLITE_SCANSTAT_COMPLEX is not specified, then only query plan elements |
| ** that correspond to query loops (the "SCAN..." and "SEARCH..." elements of |
| ** the EXPLAIN QUERY PLAN output) are available. Invoking API |
| ** sqlite3_stmt_scanstatus() is equivalent to calling |
| ** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter. |
** |
** |
|
** Parameter "idx" identifies the specific query element to retrieve statistics |
|
** for. Query elements are numbered starting from zero. A value of -1 may be |
|
** to query for statistics regarding the entire query. ^If idx is out of range |
|
** - less than -1 or greater than or equal to the total number of query |
|
** elements used to implement the statement - a non-zero value is returned and |
|
** the variable that pOut points to is unchanged. |
|
** |
** See also: [sqlite3_stmt_scanstatus_reset()] |
** See also: [sqlite3_stmt_scanstatus_reset()] |
*/ |
*/ |
SQLITE_API int sqlite3_stmt_scanstatus( |
SQLITE_API int sqlite3_stmt_scanstatus( |
Line 9405 SQLITE_API int sqlite3_stmt_scanstatus(
|
Line 10142 SQLITE_API int sqlite3_stmt_scanstatus(
|
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
void *pOut /* Result written here */ |
void *pOut /* Result written here */ |
); |
); |
|
SQLITE_API int sqlite3_stmt_scanstatus_v2( |
|
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */ |
|
int idx, /* Index of loop to report on */ |
|
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */ |
|
int flags, /* Mask of flags defined below */ |
|
void *pOut /* Result written here */ |
|
); |
|
|
/* |
/* |
|
** CAPI3REF: Prepared Statement Scan Status |
|
** KEYWORDS: {scan status flags} |
|
*/ |
|
#define SQLITE_SCANSTAT_COMPLEX 0x0001 |
|
|
|
/* |
** CAPI3REF: Zero Scan-Status Counters |
** CAPI3REF: Zero Scan-Status Counters |
** METHOD: sqlite3_stmt |
** METHOD: sqlite3_stmt |
** |
** |
Line 9495 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 10245 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** function is not defined for operations on WITHOUT ROWID tables, or for |
** function is not defined for operations on WITHOUT ROWID tables, or for |
** DELETE operations on rowid tables. |
** DELETE operations on rowid tables. |
** |
** |
|
** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from |
|
** the previous call on the same [database connection] D, or NULL for |
|
** the first call on D. |
|
** |
** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()], |
** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()], |
** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces |
** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces |
** provide additional information about a preupdate event. These routines |
** provide additional information about a preupdate event. These routines |
Line 9531 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 10285 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** triggers; or 2 for changes resulting from triggers called by top-level |
** triggers; or 2 for changes resulting from triggers called by top-level |
** triggers; and so forth. |
** triggers; and so forth. |
** |
** |
|
** When the [sqlite3_blob_write()] API is used to update a blob column, |
|
** the pre-update hook is invoked with SQLITE_DELETE. This is because the |
|
** in this case the new values are not available. In this case, when a |
|
** callback made with op==SQLITE_DELETE is actually a write using the |
|
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns |
|
** the index of the column being written. In other cases, where the |
|
** pre-update hook is being invoked for some other reason, including a |
|
** regular DELETE, sqlite3_preupdate_blobwrite() returns -1. |
|
** |
** See also: [sqlite3_update_hook()] |
** See also: [sqlite3_update_hook()] |
*/ |
*/ |
#if defined(SQLITE_ENABLE_PREUPDATE_HOOK) |
#if defined(SQLITE_ENABLE_PREUPDATE_HOOK) |
Line 9551 SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, s
|
Line 10314 SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, s
|
SQLITE_API int sqlite3_preupdate_count(sqlite3 *); |
SQLITE_API int sqlite3_preupdate_count(sqlite3 *); |
SQLITE_API int sqlite3_preupdate_depth(sqlite3 *); |
SQLITE_API int sqlite3_preupdate_depth(sqlite3 *); |
SQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
SQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
|
SQLITE_API int sqlite3_preupdate_blobwrite(sqlite3 *); |
#endif |
#endif |
|
|
/* |
/* |
Line 9789 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_re
|
Line 10553 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_re
|
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory |
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory |
** allocation error occurs. |
** allocation error occurs. |
** |
** |
** This interface is only available if SQLite is compiled with the | ** This interface is omitted if SQLite is compiled with the |
** [SQLITE_ENABLE_DESERIALIZE] option. | ** [SQLITE_OMIT_DESERIALIZE] option. |
*/ |
*/ |
SQLITE_API unsigned char *sqlite3_serialize( |
SQLITE_API unsigned char *sqlite3_serialize( |
sqlite3 *db, /* The database connection */ |
sqlite3 *db, /* The database connection */ |
Line 9837 SQLITE_API unsigned char *sqlite3_serialize(
|
Line 10601 SQLITE_API unsigned char *sqlite3_serialize(
|
** database is currently in a read transaction or is involved in a backup |
** database is currently in a read transaction or is involved in a backup |
** operation. |
** operation. |
** |
** |
|
** It is not possible to deserialized into the TEMP database. If the |
|
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the |
|
** function returns SQLITE_ERROR. |
|
** |
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the |
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the |
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then |
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then |
** [sqlite3_free()] is invoked on argument P prior to returning. |
** [sqlite3_free()] is invoked on argument P prior to returning. |
** |
** |
** This interface is only available if SQLite is compiled with the | ** This interface is omitted if SQLite is compiled with the |
** [SQLITE_ENABLE_DESERIALIZE] option. | ** [SQLITE_OMIT_DESERIALIZE] option. |
*/ |
*/ |
SQLITE_API int sqlite3_deserialize( |
SQLITE_API int sqlite3_deserialize( |
sqlite3 *db, /* The database connection */ |
sqlite3 *db, /* The database connection */ |
Line 9886 SQLITE_API int sqlite3_deserialize(
|
Line 10654 SQLITE_API int sqlite3_deserialize(
|
# undef double |
# undef double |
#endif |
#endif |
|
|
|
#if defined(__wasi__) |
|
# undef SQLITE_WASI |
|
# define SQLITE_WASI 1 |
|
# undef SQLITE_OMIT_WAL |
|
# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */ |
|
# ifndef SQLITE_OMIT_LOAD_EXTENSION |
|
# define SQLITE_OMIT_LOAD_EXTENSION |
|
# endif |
|
# ifndef SQLITE_THREADSAFE |
|
# define SQLITE_THREADSAFE 0 |
|
# endif |
|
#endif |
|
|
#ifdef __cplusplus |
#ifdef __cplusplus |
} /* End of the 'extern "C"' block */ |
} /* End of the 'extern "C"' block */ |
#endif |
#endif |
Line 10091 SQLITE_API int sqlite3session_create(
|
Line 10872 SQLITE_API int sqlite3session_create(
|
*/ |
*/ |
SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); |
SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); |
|
|
|
/* |
|
** CAPI3REF: Configure a Session Object |
|
** METHOD: sqlite3_session |
|
** |
|
** This method is used to configure a session object after it has been |
|
** created. At present the only valid values for the second parameter are |
|
** [SQLITE_SESSION_OBJCONFIG_SIZE] and [SQLITE_SESSION_OBJCONFIG_ROWID]. |
|
** |
|
*/ |
|
SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg); |
|
|
/* |
/* |
|
** CAPI3REF: Options for sqlite3session_object_config |
|
** |
|
** The following values may passed as the the 2nd parameter to |
|
** sqlite3session_object_config(). |
|
** |
|
** <dt>SQLITE_SESSION_OBJCONFIG_SIZE <dd> |
|
** This option is used to set, clear or query the flag that enables |
|
** the [sqlite3session_changeset_size()] API. Because it imposes some |
|
** computational overhead, this API is disabled by default. Argument |
|
** pArg must point to a value of type (int). If the value is initially |
|
** 0, then the sqlite3session_changeset_size() API is disabled. If it |
|
** is greater than 0, then the same API is enabled. Or, if the initial |
|
** value is less than zero, no change is made. In all cases the (int) |
|
** variable is set to 1 if the sqlite3session_changeset_size() API is |
|
** enabled following the current call, or 0 otherwise. |
|
** |
|
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after |
|
** the first table has been attached to the session object. |
|
** |
|
** <dt>SQLITE_SESSION_OBJCONFIG_ROWID <dd> |
|
** This option is used to set, clear or query the flag that enables |
|
** collection of data for tables with no explicit PRIMARY KEY. |
|
** |
|
** Normally, tables with no explicit PRIMARY KEY are simply ignored |
|
** by the sessions module. However, if this flag is set, it behaves |
|
** as if such tables have a column "_rowid_ INTEGER PRIMARY KEY" inserted |
|
** as their leftmost columns. |
|
** |
|
** It is an error (SQLITE_MISUSE) to attempt to modify this setting after |
|
** the first table has been attached to the session object. |
|
*/ |
|
#define SQLITE_SESSION_OBJCONFIG_SIZE 1 |
|
#define SQLITE_SESSION_OBJCONFIG_ROWID 2 |
|
|
|
/* |
** CAPI3REF: Enable Or Disable A Session Object |
** CAPI3REF: Enable Or Disable A Session Object |
** METHOD: sqlite3_session |
** METHOD: sqlite3_session |
** |
** |
Line 10336 SQLITE_API int sqlite3session_changeset(
|
Line 11162 SQLITE_API int sqlite3session_changeset(
|
); |
); |
|
|
/* |
/* |
|
** CAPI3REF: Return An Upper-limit For The Size Of The Changeset |
|
** METHOD: sqlite3_session |
|
** |
|
** By default, this function always returns 0. For it to return |
|
** a useful result, the sqlite3_session object must have been configured |
|
** to enable this API using sqlite3session_object_config() with the |
|
** SQLITE_SESSION_OBJCONFIG_SIZE verb. |
|
** |
|
** When enabled, this function returns an upper limit, in bytes, for the size |
|
** of the changeset that might be produced if sqlite3session_changeset() were |
|
** called. The final changeset size might be equal to or smaller than the |
|
** size in bytes returned by this function. |
|
*/ |
|
SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession); |
|
|
|
/* |
** CAPI3REF: Load The Difference Between Tables Into A Session |
** CAPI3REF: Load The Difference Between Tables Into A Session |
** METHOD: sqlite3_session |
** METHOD: sqlite3_session |
** |
** |
Line 11207 SQLITE_API int sqlite3changeset_apply_v2(
|
Line 12049 SQLITE_API int sqlite3changeset_apply_v2(
|
** Invert the changeset before applying it. This is equivalent to inverting |
** Invert the changeset before applying it. This is equivalent to inverting |
** a changeset using sqlite3changeset_invert() before applying it. It is |
** a changeset using sqlite3changeset_invert() before applying it. It is |
** an error to specify this flag with a patchset. |
** an error to specify this flag with a patchset. |
|
** |
|
** <dt>SQLITE_CHANGESETAPPLY_IGNORENOOP <dd> |
|
** Do not invoke the conflict handler callback for any changes that |
|
** would not actually modify the database even if they were applied. |
|
** Specifically, this means that the conflict handler is not invoked |
|
** for: |
|
** <ul> |
|
** <li>a delete change if the row being deleted cannot be found, |
|
** <li>an update change if the modified fields are already set to |
|
** their new values in the conflicting row, or |
|
** <li>an insert change if all fields of the conflicting row match |
|
** the row being inserted. |
|
** </ul> |
*/ |
*/ |
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 |
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001 |
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002 |
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002 |
|
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004 |
|
|
/* |
/* |
** CAPI3REF: Constants Passed To The Conflict Handler |
** CAPI3REF: Constants Passed To The Conflict Handler |
Line 11950 struct Fts5PhraseIter {
|
Line 12806 struct Fts5PhraseIter {
|
** See xPhraseFirstColumn above. |
** See xPhraseFirstColumn above. |
*/ |
*/ |
struct Fts5ExtensionApi { |
struct Fts5ExtensionApi { |
int iVersion; /* Currently always set to 3 */ | int iVersion; /* Currently always set to 2 */ |
|
|
void *(*xUserData)(Fts5Context*); |
void *(*xUserData)(Fts5Context*); |
|
|
Line 12179 struct Fts5ExtensionApi {
|
Line 13035 struct Fts5ExtensionApi {
|
** as separate queries of the FTS index are required for each synonym. |
** as separate queries of the FTS index are required for each synonym. |
** |
** |
** When using methods (2) or (3), it is important that the tokenizer only |
** When using methods (2) or (3), it is important that the tokenizer only |
** provide synonyms when tokenizing document text (method (2)) or query | ** provide synonyms when tokenizing document text (method (3)) or query |
** text (method (3)), not both. Doing so will not cause any errors, but is | ** text (method (2)), not both. Doing so will not cause any errors, but is |
** inefficient. |
** inefficient. |
*/ |
*/ |
typedef struct Fts5Tokenizer Fts5Tokenizer; |
typedef struct Fts5Tokenizer Fts5Tokenizer; |
Line 12228 struct fts5_api {
|
Line 13084 struct fts5_api {
|
int (*xCreateTokenizer)( |
int (*xCreateTokenizer)( |
fts5_api *pApi, |
fts5_api *pApi, |
const char *zName, |
const char *zName, |
void *pContext, | void *pUserData, |
fts5_tokenizer *pTokenizer, |
fts5_tokenizer *pTokenizer, |
void (*xDestroy)(void*) |
void (*xDestroy)(void*) |
); |
); |
Line 12237 struct fts5_api {
|
Line 13093 struct fts5_api {
|
int (*xFindTokenizer)( |
int (*xFindTokenizer)( |
fts5_api *pApi, |
fts5_api *pApi, |
const char *zName, |
const char *zName, |
void **ppContext, | void **ppUserData, |
fts5_tokenizer *pTokenizer |
fts5_tokenizer *pTokenizer |
); |
); |
|
|
Line 12245 struct fts5_api {
|
Line 13101 struct fts5_api {
|
int (*xCreateFunction)( |
int (*xCreateFunction)( |
fts5_api *pApi, |
fts5_api *pApi, |
const char *zName, |
const char *zName, |
void *pContext, | void *pUserData, |
fts5_extension_function xFunction, |
fts5_extension_function xFunction, |
void (*xDestroy)(void*) |
void (*xDestroy)(void*) |
); |
); |