version 1.2, 2012/10/12 08:22:47
|
version 1.3, 2013/01/28 01:47:39
|
Line 107 extern "C" {
|
Line 107 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.7.10" | #define SQLITE_VERSION "3.7.15.2" |
#define SQLITE_VERSION_NUMBER 3007010 | #define SQLITE_VERSION_NUMBER 3007015 |
#define SQLITE_SOURCE_ID "2012-01-16 13:28:40 ebd01a8deffb5024a5d7494eef800d2366d97204" | #define SQLITE_SOURCE_ID "2013-01-09 11:53:05 c0e09560d26f0a6456be9dd3447f5311eb4f238f" |
|
|
/* |
/* |
** CAPI3REF: Run-Time Library Version Numbers |
** CAPI3REF: Run-Time Library Version Numbers |
Line 219 SQLITE_API int sqlite3_threadsafe(void);
|
Line 219 SQLITE_API int sqlite3_threadsafe(void);
|
** the opaque structure named "sqlite3". It is useful to think of an sqlite3 |
** the opaque structure named "sqlite3". It is useful to think of an sqlite3 |
** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and |
** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and |
** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] |
** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] |
** is its destructor. There are many other interfaces (such as | ** and [sqlite3_close_v2()] are its destructors. There are many other |
| ** interfaces (such as |
** [sqlite3_prepare_v2()], [sqlite3_create_function()], and |
** [sqlite3_prepare_v2()], [sqlite3_create_function()], and |
** [sqlite3_busy_timeout()] to name but three) that are methods on an |
** [sqlite3_busy_timeout()] to name but three) that are methods on an |
** sqlite3 object. |
** sqlite3 object. |
Line 266 typedef sqlite_uint64 sqlite3_uint64;
|
Line 267 typedef sqlite_uint64 sqlite3_uint64;
|
/* |
/* |
** CAPI3REF: Closing A Database Connection |
** CAPI3REF: Closing A Database Connection |
** |
** |
** ^The sqlite3_close() routine is the destructor for the [sqlite3] object. | ** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors |
** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is | ** for the [sqlite3] object. |
** successfully destroyed and all associated resources are deallocated. | ** ^Calls to sqlite3_close() and sqlite3_close_v2() return SQLITE_OK if |
| ** the [sqlite3] object is successfully destroyed and all associated |
| ** resources are deallocated. |
** |
** |
** Applications must [sqlite3_finalize | finalize] all [prepared statements] | ** ^If the database connection is associated with unfinalized prepared |
** and [sqlite3_blob_close | close] all [BLOB handles] associated with | ** statements or unfinished sqlite3_backup objects then sqlite3_close() |
** the [sqlite3] object prior to attempting to close the object. ^If | ** will leave the database connection open and return [SQLITE_BUSY]. |
| ** ^If sqlite3_close_v2() is called with unfinalized prepared statements |
| ** and unfinished sqlite3_backups, then the database connection becomes |
| ** an unusable "zombie" which will automatically be deallocated when the |
| ** last prepared statement is finalized or the last sqlite3_backup is |
| ** finished. The sqlite3_close_v2() interface is intended for use with |
| ** host languages that are garbage collected, and where the order in which |
| ** destructors are called is arbitrary. |
| ** |
| ** Applications should [sqlite3_finalize | finalize] all [prepared statements], |
| ** [sqlite3_blob_close | close] all [BLOB handles], and |
| ** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated |
| ** with the [sqlite3] object prior to attempting to close the object. ^If |
** sqlite3_close() is called on a [database connection] that still has |
** sqlite3_close() is called on a [database connection] that still has |
** outstanding [prepared statements] or [BLOB handles], then it returns | ** outstanding [prepared statements], [BLOB handles], and/or |
** SQLITE_BUSY. | ** [sqlite3_backup] objects then it returns SQLITE_OK but the deallocation |
| ** of resources is deferred until all [prepared statements], [BLOB handles], |
| ** and [sqlite3_backup] objects are also destroyed. |
** |
** |
** ^If [sqlite3_close()] is invoked while a transaction is open, | ** ^If an [sqlite3] object is destroyed while a transaction is open, |
** the transaction is automatically rolled back. |
** the transaction is automatically rolled back. |
** |
** |
** The C parameter to [sqlite3_close(C)] must be either a NULL | ** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)] |
| ** must be either a NULL |
** pointer or an [sqlite3] object pointer obtained |
** pointer or an [sqlite3] object pointer obtained |
** from [sqlite3_open()], [sqlite3_open16()], or |
** from [sqlite3_open()], [sqlite3_open16()], or |
** [sqlite3_open_v2()], and not previously closed. |
** [sqlite3_open_v2()], and not previously closed. |
** ^Calling sqlite3_close() with a NULL pointer argument is a | ** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer |
** harmless no-op. | ** argument is a harmless no-op. |
*/ |
*/ |
SQLITE_API int sqlite3_close(sqlite3 *); | SQLITE_API int sqlite3_close(sqlite3*); |
| SQLITE_API int sqlite3_close_v2(sqlite3*); |
|
|
/* |
/* |
** The type for a callback function. |
** The type for a callback function. |
Line 455 SQLITE_API int sqlite3_exec(
|
Line 474 SQLITE_API int sqlite3_exec(
|
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) |
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) |
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) |
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) |
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) |
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) |
|
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8)) |
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) |
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) |
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) |
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) |
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) |
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) |
|
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8)) |
|
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) |
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) |
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) |
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) |
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) |
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) |
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) |
|
#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8)) |
|
|
/* |
/* |
** CAPI3REF: Flags For File Open Operations |
** CAPI3REF: Flags For File Open Operations |
Line 476 SQLITE_API int sqlite3_exec(
|
Line 499 SQLITE_API int sqlite3_exec(
|
#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ |
#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ |
#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ |
#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ |
#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ |
|
#define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */ |
#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ |
#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ |
#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ |
#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ |
#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ |
#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ |
Line 495 SQLITE_API int sqlite3_exec(
|
Line 519 SQLITE_API int sqlite3_exec(
|
** CAPI3REF: Device Characteristics |
** CAPI3REF: Device Characteristics |
** |
** |
** The xDeviceCharacteristics method of the [sqlite3_io_methods] |
** The xDeviceCharacteristics method of the [sqlite3_io_methods] |
** object returns an integer which is a vector of the these | ** object returns an integer which is a vector of these |
** bit values expressing I/O characteristics of the mass storage |
** bit values expressing I/O characteristics of the mass storage |
** device that holds the file that the [sqlite3_io_methods] |
** device that holds the file that the [sqlite3_io_methods] |
** refers to. |
** refers to. |
Line 716 struct sqlite3_io_methods {
|
Line 740 struct sqlite3_io_methods {
|
** into an integer that the pArg argument points to. This capability |
** into an integer that the pArg argument points to. This capability |
** is used during testing and only needs to be supported when SQLITE_TEST |
** is used during testing and only needs to be supported when SQLITE_TEST |
** is defined. |
** is defined. |
** | ** <ul> |
| ** <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 |
** layer a hint of how large the database file will grow to be during the |
** layer a hint of how large the database file will grow to be during the |
** current transaction. This hint is not guaranteed to be accurate but it |
** current transaction. This hint is not guaranteed to be accurate but it |
Line 724 struct sqlite3_io_methods {
|
Line 749 struct sqlite3_io_methods {
|
** file space based on this hint in order to help writes to the database |
** file space based on this hint in order to help writes to the database |
** file run faster. |
** file run faster. |
** |
** |
|
** <li>[[SQLITE_FCNTL_CHUNK_SIZE]] |
** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS |
** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS |
** extends and truncates the database file in chunks of a size specified |
** extends and truncates the database file in chunks of a size specified |
** by the user. The fourth argument to [sqlite3_file_control()] should |
** by the user. The fourth argument to [sqlite3_file_control()] should |
Line 732 struct sqlite3_io_methods {
|
Line 758 struct sqlite3_io_methods {
|
** chunks (say 1MB at a time), may reduce file-system fragmentation and |
** chunks (say 1MB at a time), may reduce file-system fragmentation and |
** improve performance on some systems. |
** improve performance on some systems. |
** |
** |
|
** <li>[[SQLITE_FCNTL_FILE_POINTER]] |
** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer |
** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer |
** to the [sqlite3_file] object associated with a particular database |
** to the [sqlite3_file] object associated with a particular database |
** connection. See the [sqlite3_file_control()] documentation for |
** connection. See the [sqlite3_file_control()] documentation for |
** additional information. |
** additional information. |
** |
** |
|
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]] |
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by |
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by |
** SQLite and sent to all VFSes in place of a call to the xSync method |
** SQLite and sent to all VFSes in place of a call to the xSync method |
** when the database connection has [PRAGMA synchronous] set to OFF.)^ |
** when the database connection has [PRAGMA synchronous] set to OFF.)^ |
Line 747 struct sqlite3_io_methods {
|
Line 775 struct sqlite3_io_methods {
|
** opcode as doing so may disrupt the operation of the specialized VFSes |
** opcode as doing so may disrupt the operation of the specialized VFSes |
** that do require it. |
** that do require it. |
** |
** |
|
** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]] |
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic |
** retry counts and intervals for certain disk I/O operations for the |
** retry counts and intervals for certain disk I/O operations for the |
** windows [VFS] in order to provide robustness in the presence of |
** windows [VFS] in order to provide robustness in the presence of |
Line 763 struct sqlite3_io_methods {
|
Line 792 struct sqlite3_io_methods {
|
** into the array entry, allowing the current retry settings to be |
** into the array entry, allowing the current retry settings to be |
** interrogated. The zDbName parameter is ignored. |
** interrogated. The zDbName parameter is ignored. |
** |
** |
|
** <li>[[SQLITE_FCNTL_PERSIST_WAL]] |
** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the |
** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the |
** persistent [WAL | Write AHead Log] setting. By default, the auxiliary | ** persistent [WAL | Write Ahead Log] setting. By default, the auxiliary |
** write ahead log and shared memory files used for transaction control |
** write ahead log and shared memory files used for transaction control |
** are automatically deleted when the latest connection to the database |
** are automatically deleted when the latest connection to the database |
** closes. Setting persistent WAL mode causes those files to persist after |
** closes. Setting persistent WAL mode causes those files to persist after |
Line 777 struct sqlite3_io_methods {
|
Line 807 struct sqlite3_io_methods {
|
** WAL mode. If the integer is -1, then it is overwritten with the current |
** WAL mode. If the integer is -1, then it is overwritten with the current |
** WAL persistence setting. |
** WAL persistence setting. |
** |
** |
|
** <li>[[SQLITE_FCNTL_POWERSAFE_OVERWRITE]] |
** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the |
** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the |
** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting |
** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting |
** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the |
** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the |
Line 786 struct sqlite3_io_methods {
|
Line 817 struct sqlite3_io_methods {
|
** mode. If the integer is -1, then it is overwritten with the current |
** mode. If the integer is -1, then it is overwritten with the current |
** zero-damage mode setting. |
** zero-damage mode setting. |
** |
** |
|
** <li>[[SQLITE_FCNTL_OVERWRITE]] |
** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening |
** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening |
** a write transaction to indicate that, unless it is rolled back for some |
** a write transaction to indicate that, unless it is rolled back for some |
** reason, the entire database file will be overwritten by the current |
** reason, the entire database file will be overwritten by the current |
** transaction. This is used by VACUUM operations. |
** transaction. This is used by VACUUM operations. |
** |
** |
|
** <li>[[SQLITE_FCNTL_VFSNAME]] |
** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
** all [VFSes] in the VFS stack. The names are of all VFS shims and the |
** all [VFSes] in the VFS stack. The names are of all VFS shims and the |
** final bottom-level VFS are written into memory obtained from |
** final bottom-level VFS are written into memory obtained from |
Line 801 struct sqlite3_io_methods {
|
Line 834 struct sqlite3_io_methods {
|
** do anything. Callers should initialize the char* variable to a NULL |
** do anything. Callers should initialize the char* variable to a NULL |
** pointer in case this file-control is not implemented. This file-control |
** pointer in case this file-control is not implemented. This file-control |
** is intended for diagnostic use only. |
** is intended for diagnostic use only. |
|
** |
|
** <li>[[SQLITE_FCNTL_PRAGMA]] |
|
** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] |
|
** file control is sent to the open [sqlite3_file] object corresponding |
|
** to the database file to which the pragma statement refers. ^The argument |
|
** to the [SQLITE_FCNTL_PRAGMA] file control is an array of |
|
** pointers to strings (char**) in which the second element of the array |
|
** is the name of the pragma and the third element is the argument to the |
|
** pragma or NULL if the pragma has no argument. ^The handler for an |
|
** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element |
|
** of the char** argument point to a string obtained from [sqlite3_mprintf()] |
|
** or the equivalent and that string will become the result of the pragma or |
|
** the error message if the pragma fails. ^If the |
|
** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal |
|
** [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA] |
|
** file control returns [SQLITE_OK], then the parser assumes that the |
|
** VFS has handled the PRAGMA itself and the parser generates a no-op |
|
** prepared statement. ^If the [SQLITE_FCNTL_PRAGMA] file control returns |
|
** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means |
|
** that the VFS encountered an error while handling the [PRAGMA] and the |
|
** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA] |
|
** file control occurs at the beginning of pragma statement analysis and so |
|
** it is able to override built-in [PRAGMA] statements. |
|
** |
|
** <li>[[SQLITE_FCNTL_BUSYHANDLER]] |
|
** ^This file-control may be invoked by SQLite on the database file handle |
|
** shortly after it is opened in order to provide a custom VFS with access |
|
** to the connections busy-handler callback. The argument is of type (void **) |
|
** - an array of two (void *) values. The first (void *) actually points |
|
** to a function of type (int (*)(void *)). In order to invoke the connections |
|
** busy-handler, this function should be invoked with the second (void *) in |
|
** the array as the only argument. If it returns non-zero, then the operation |
|
** should be retried. If it returns zero, the custom VFS should abandon the |
|
** current operation. |
|
** |
|
** <li>[[SQLITE_FCNTL_TEMPFILENAME]] |
|
** ^Application can invoke this file-control to have SQLite generate a |
|
** temporary filename using the same algorithm that is followed to generate |
|
** temporary filenames for TEMP tables and other internal uses. The |
|
** argument should be a char** which will be filled with the filename |
|
** written into memory obtained from [sqlite3_malloc()]. The caller should |
|
** invoke [sqlite3_free()] on the result to avoid a memory leak. |
|
** |
|
** </ul> |
*/ |
*/ |
#define SQLITE_FCNTL_LOCKSTATE 1 |
#define SQLITE_FCNTL_LOCKSTATE 1 |
#define SQLITE_GET_LOCKPROXYFILE 2 |
#define SQLITE_GET_LOCKPROXYFILE 2 |
Line 815 struct sqlite3_io_methods {
|
Line 892 struct sqlite3_io_methods {
|
#define SQLITE_FCNTL_OVERWRITE 11 |
#define SQLITE_FCNTL_OVERWRITE 11 |
#define SQLITE_FCNTL_VFSNAME 12 |
#define SQLITE_FCNTL_VFSNAME 12 |
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13 |
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13 |
|
#define SQLITE_FCNTL_PRAGMA 14 |
|
#define SQLITE_FCNTL_BUSYHANDLER 15 |
|
#define SQLITE_FCNTL_TEMPFILENAME 16 |
|
|
/* |
/* |
** CAPI3REF: Mutex Handle |
** CAPI3REF: Mutex Handle |
Line 1511 struct sqlite3_mem_methods {
|
Line 1591 struct sqlite3_mem_methods {
|
** disabled. The default value may be changed by compiling with the |
** disabled. The default value may be changed by compiling with the |
** [SQLITE_USE_URI] symbol defined. |
** [SQLITE_USE_URI] symbol defined. |
** |
** |
|
** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN |
|
** <dd> This option takes a single integer argument which is interpreted as |
|
** a boolean in order to enable or disable the use of covering indices for |
|
** full table scans in the query optimizer. The default setting is determined |
|
** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on" |
|
** if that compile-time option is omitted. |
|
** The ability to disable the use of covering indices for full table scans |
|
** is because some incorrectly coded legacy applications might malfunction |
|
** malfunction when the optimization is enabled. Providing the ability to |
|
** disable the optimization allows the older, buggy application code to work |
|
** without change even with newer versions of SQLite. |
|
** |
** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]] |
** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]] |
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFNIG_GETPCACHE | ** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE |
** <dd> These options are obsolete and should not be used by new code. |
** <dd> These options are obsolete and should not be used by new code. |
** They are retained for backwards compatibility but are now no-ops. |
** They are retained for backwards compatibility but are now no-ops. |
** </dl> |
** </dl> |
|
** |
|
** [[SQLITE_CONFIG_SQLLOG]] |
|
** <dt>SQLITE_CONFIG_SQLLOG |
|
** <dd>This option is only available if sqlite is compiled with the |
|
** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should |
|
** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). |
|
** The second should be of type (void*). The callback is invoked by the library |
|
** in three separate circumstances, identified by the value passed as the |
|
** fourth parameter. If the fourth parameter is 0, then the database connection |
|
** passed as the second argument has just been opened. The third argument |
|
** points to a buffer containing the name of the main database file. If the |
|
** fourth parameter is 1, then the SQL statement that the third parameter |
|
** points to has just been executed. Or, if the fourth parameter is 2, then |
|
** the connection being passed as the second parameter is being closed. The |
|
** third parameter is passed NULL In this case. |
|
** </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 */ |
Line 1536 struct sqlite3_mem_methods {
|
Line 1644 struct sqlite3_mem_methods {
|
#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_SQLLOG 21 /* xSqllog, void* */ |
|
|
/* |
/* |
** CAPI3REF: Database Connection Configuration Options |
** CAPI3REF: Database Connection Configuration Options |
Line 2133 SQLITE_API char *sqlite3_vsnprintf(int,char*,const cha
|
Line 2243 SQLITE_API char *sqlite3_vsnprintf(int,char*,const cha
|
** implementation of these routines to be omitted. That capability |
** implementation of these routines to be omitted. That capability |
** is no longer provided. Only built-in memory allocators can be used. |
** is no longer provided. Only built-in memory allocators can be used. |
** |
** |
** The Windows OS interface layer calls | ** Prior to SQLite version 3.7.10, the Windows OS interface layer called |
** the system malloc() and free() directly when converting |
** the system malloc() and free() directly when converting |
** filenames between the UTF-8 encoding used by SQLite |
** filenames between the UTF-8 encoding used by SQLite |
** and whatever filename encoding is used by the particular Windows |
** and whatever filename encoding is used by the particular Windows |
** installation. Memory allocation errors are detected, but | ** installation. Memory allocation errors were detected, but |
** they are reported back as [SQLITE_CANTOPEN] or | ** they were reported back as [SQLITE_CANTOPEN] or |
** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. |
** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. |
** |
** |
** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] |
** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] |
Line 2539 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
Line 2649 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
** present, then the VFS specified by the option takes precedence over |
** present, then the VFS specified by the option takes precedence over |
** the value passed as the fourth parameter to sqlite3_open_v2(). |
** the value passed as the fourth parameter to sqlite3_open_v2(). |
** |
** |
** <li> <b>mode</b>: ^(The mode parameter may be set to either "ro", "rw" or | ** <li> <b>mode</b>: ^(The mode parameter may be set to either "ro", "rw", |
** "rwc". Attempting to set it to any other value is an error)^. | ** "rwc", or "memory". Attempting to set it to any other value is |
| ** an error)^. |
** ^If "ro" is specified, then the database is opened for read-only |
** ^If "ro" is specified, then the database is opened for read-only |
** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the |
** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the |
** third argument to sqlite3_prepare_v2(). ^If the mode option is set to | ** third argument to sqlite3_open_v2(). ^If the mode option is set to |
** "rw", then the database is opened for read-write (but not create) |
** "rw", then the database is opened for read-write (but not create) |
** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had |
** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had |
** been set. ^Value "rwc" is equivalent to setting both |
** been set. ^Value "rwc" is equivalent to setting both |
** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If sqlite3_open_v2() is | ** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is |
** used, it is an error to specify a value for the mode parameter that is | ** set to "memory" then a pure [in-memory database] that never reads |
** less restrictive than that specified by the flags passed as the third | ** or writes from disk is used. ^It is an error to specify a value for |
** parameter. | ** the mode parameter that is less restrictive than that specified by |
| ** the flags passed in the third parameter to sqlite3_open_v2(). |
** |
** |
** <li> <b>cache</b>: ^The cache parameter may be set to either "shared" or |
** <li> <b>cache</b>: ^The cache parameter may be set to either "shared" or |
** "private". ^Setting it to "shared" is equivalent to setting the |
** "private". ^Setting it to "shared" is equivalent to setting the |
Line 2609 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
Line 2721 SQLITE_API void sqlite3_progress_handler(sqlite3*, int
|
** codepage is currently defined. Filenames containing international |
** codepage is currently defined. Filenames containing international |
** characters must be converted to UTF-8 prior to passing them into |
** characters must be converted to UTF-8 prior to passing them into |
** sqlite3_open() or sqlite3_open_v2(). |
** sqlite3_open() or sqlite3_open_v2(). |
|
** |
|
** <b>Note to Windows Runtime users:</b> The temporary directory must be set |
|
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various |
|
** features that require the use of temporary files may fail. |
|
** |
|
** See also: [sqlite3_temp_directory] |
*/ |
*/ |
SQLITE_API int sqlite3_open( |
SQLITE_API int sqlite3_open( |
const char *filename, /* Database filename (UTF-8) */ |
const char *filename, /* Database filename (UTF-8) */ |
Line 2644 SQLITE_API int sqlite3_open_v2(
|
Line 2762 SQLITE_API int sqlite3_open_v2(
|
** |
** |
** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean |
** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean |
** parameter and returns true (1) or false (0) according to the value |
** parameter and returns true (1) or false (0) according to the value |
** of P. The value of P is true if it is "yes" or "true" or "on" or | ** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the |
** a non-zero number and is false otherwise. If P is not a query parameter | ** value of query parameter P is one of "yes", "true", or "on" in any |
** on F then sqlite3_uri_boolean(F,P,B) returns (B!=0). | ** case or if the value begins with a non-zero number. The |
| ** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of |
| ** query parameter P is one of "no", "false", or "off" in any case or |
| ** if the value begins with a numeric zero. If P is not a query |
| ** parameter on F or if the value of P is does not match any of the |
| ** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0). |
** |
** |
** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a |
** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a |
** 64-bit signed integer and returns that integer, or D if P does not |
** 64-bit signed integer and returns that integer, or D if P does not |
Line 2683 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*
|
Line 2806 SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*
|
** However, the error string might be overwritten or deallocated by |
** However, the error string might be overwritten or deallocated by |
** subsequent calls to other SQLite interface functions.)^ |
** subsequent calls to other SQLite interface functions.)^ |
** |
** |
|
** ^The sqlite3_errstr() interface returns the English-language text |
|
** that describes the [result code], as UTF-8. |
|
** ^(Memory to hold the error message string is managed internally |
|
** and must not be freed by the application)^. |
|
** |
** 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 2701 SQLITE_API int sqlite3_errcode(sqlite3 *db);
|
Line 2829 SQLITE_API int sqlite3_errcode(sqlite3 *db);
|
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); |
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); |
|
|
/* |
/* |
** CAPI3REF: SQL Statement Object |
** CAPI3REF: SQL Statement Object |
Line 3096 typedef struct sqlite3_context sqlite3_context;
|
Line 3225 typedef struct sqlite3_context sqlite3_context;
|
** ^(In those routines that have a fourth argument, its value is the |
** ^(In those routines that have a fourth argument, its value is the |
** number of bytes in the parameter. To be clear: the value is the |
** number of bytes in the parameter. To be clear: the value is the |
** number of <u>bytes</u> in the value, not the number of characters.)^ |
** number of <u>bytes</u> in the value, not the number of characters.)^ |
** ^If the fourth parameter is negative, the length of the string is | ** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16() |
| ** is negative, then the length of the string is |
** the number of bytes up to the first zero terminator. |
** the number of bytes up to the first zero terminator. |
|
** If the fourth parameter to sqlite3_bind_blob() is negative, then |
|
** the behavior is undefined. |
** If a non-negative fourth parameter is provided to sqlite3_bind_text() |
** If a non-negative fourth parameter is provided to sqlite3_bind_text() |
** or sqlite3_bind_text16() then that parameter must be the byte offset |
** or sqlite3_bind_text16() then that parameter must be the byte offset |
** where the NUL terminator would occur assuming the string were NUL |
** where the NUL terminator would occur assuming the string were NUL |
Line 4094 typedef void (*sqlite3_destructor_type)(void*);
|
Line 4226 typedef void (*sqlite3_destructor_type)(void*);
|
** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() |
** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() |
** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. |
** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. |
** |
** |
** ^The sqlite3_result_toobig() interface causes SQLite to throw an error | ** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an |
** indicating that a string or BLOB is too long to represent. | ** error indicating that a string or BLOB is too long to represent. |
** |
** |
** ^The sqlite3_result_nomem() interface causes SQLite to throw an error | ** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an |
** indicating that a memory allocation failed. | ** error indicating that a memory allocation failed. |
** |
** |
** ^The sqlite3_result_int() interface sets the return value |
** ^The sqlite3_result_int() interface sets the return value |
** of the application-defined function to be the 32-bit signed integer |
** of the application-defined function to be the 32-bit signed integer |
Line 4405 SQLITE_API int sqlite3_sleep(int);
|
Line 4537 SQLITE_API int sqlite3_sleep(int);
|
** Hence, if this variable is modified directly, either it should be |
** Hence, if this variable is modified directly, either it should be |
** made NULL or made to point to memory obtained from [sqlite3_malloc] |
** made NULL or made to point to memory obtained from [sqlite3_malloc] |
** or else the use of the [temp_store_directory pragma] should be avoided. |
** or else the use of the [temp_store_directory pragma] should be avoided. |
|
** |
|
** <b>Note to Windows Runtime users:</b> The temporary directory must be set |
|
** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various |
|
** features that require the use of temporary files may fail. Here is an |
|
** example of how to do this using C++ with the Windows Runtime: |
|
** |
|
** <blockquote><pre> |
|
** LPCWSTR zPath = Windows::Storage::ApplicationData::Current-> |
|
** TemporaryFolder->Path->Data(); |
|
** char zPathBuf[MAX_PATH + 1]; |
|
** memset(zPathBuf, 0, sizeof(zPathBuf)); |
|
** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf), |
|
** NULL, NULL); |
|
** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf); |
|
** </pre></blockquote> |
*/ |
*/ |
SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory; |
SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory; |
|
|
/* |
/* |
|
** CAPI3REF: Name Of The Folder Holding Database Files |
|
** |
|
** ^(If this global variable is made to point to a string which is |
|
** the name of a folder (a.k.a. directory), then all database files |
|
** specified with a relative pathname and created or accessed by |
|
** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed |
|
** to be relative to that directory.)^ ^If this variable is a NULL |
|
** pointer, then SQLite assumes that all database files specified |
|
** with a relative pathname are relative to the current directory |
|
** for the process. Only the windows VFS makes use of this global |
|
** variable; it is ignored by the unix VFS. |
|
** |
|
** Changing the value of this variable while a database connection is |
|
** open can result in a corrupt database. |
|
** |
|
** It is not safe to read or modify this variable in more than one |
|
** thread at a time. It is not safe to read or modify this variable |
|
** if a [database connection] is being used at the same time in a separate |
|
** thread. |
|
** It is intended that this variable be set once |
|
** as part of process initialization and before any SQLite interface |
|
** routines have been called and that this variable remain unchanged |
|
** thereafter. |
|
** |
|
** ^The [data_store_directory pragma] may modify this variable and cause |
|
** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, |
|
** the [data_store_directory pragma] always assumes that any string |
|
** that this variable points to is held in memory obtained from |
|
** [sqlite3_malloc] and the pragma may attempt to free that memory |
|
** using [sqlite3_free]. |
|
** Hence, if this variable is modified directly, either it should be |
|
** made NULL or made to point to memory obtained from [sqlite3_malloc] |
|
** or else the use of the [data_store_directory pragma] should be avoided. |
|
*/ |
|
SQLITE_API SQLITE_EXTERN char *sqlite3_data_directory; |
|
|
|
/* |
** CAPI3REF: Test For Auto-Commit Mode |
** CAPI3REF: Test For Auto-Commit Mode |
** KEYWORDS: {autocommit mode} |
** KEYWORDS: {autocommit mode} |
** |
** |
Line 4460 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
Line 4644 SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); |
|
|
/* |
/* |
|
** CAPI3REF: Determine if a database is read-only |
|
** |
|
** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N |
|
** of connection D is read-only, 0 if it is read/write, or -1 if N is not |
|
** the name of a database on connection D. |
|
*/ |
|
SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); |
|
|
|
/* |
** CAPI3REF: Find the next prepared statement |
** CAPI3REF: Find the next prepared statement |
** |
** |
** ^This interface returns a pointer to the next [prepared statement] after |
** ^This interface returns a pointer to the next [prepared statement] after |
Line 4577 SQLITE_API void *sqlite3_update_hook(
|
Line 4770 SQLITE_API void *sqlite3_update_hook(
|
|
|
/* |
/* |
** CAPI3REF: Enable Or Disable Shared Pager Cache |
** CAPI3REF: Enable Or Disable Shared Pager Cache |
** KEYWORDS: {shared cache} |
|
** |
** |
** ^(This routine enables or disables the sharing of the database cache |
** ^(This routine enables or disables the sharing of the database cache |
** and schema data structures between [database connection | connections] |
** and schema data structures between [database connection | connections] |
Line 4600 SQLITE_API void *sqlite3_update_hook(
|
Line 4792 SQLITE_API void *sqlite3_update_hook(
|
** future releases of SQLite. Applications that care about shared |
** future releases of SQLite. Applications that care about shared |
** cache setting should set it explicitly. |
** cache setting should set it explicitly. |
** |
** |
|
** This interface is threadsafe on processors where writing a |
|
** 32-bit integer is atomic. |
|
** |
** See Also: [SQLite Shared-Cache Mode] |
** See Also: [SQLite Shared-Cache Mode] |
*/ |
*/ |
SQLITE_API int sqlite3_enable_shared_cache(int); |
SQLITE_API int sqlite3_enable_shared_cache(int); |
Line 5405 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
Line 5600 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
** implementations are available in the SQLite core: |
** implementations are available in the SQLite core: |
** |
** |
** <ul> |
** <ul> |
** <li> SQLITE_MUTEX_OS2 |
|
** <li> SQLITE_MUTEX_PTHREADS |
** <li> SQLITE_MUTEX_PTHREADS |
** <li> SQLITE_MUTEX_W32 |
** <li> SQLITE_MUTEX_W32 |
** <li> SQLITE_MUTEX_NOOP |
** <li> SQLITE_MUTEX_NOOP |
Line 5413 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
Line 5607 SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
** |
** |
** ^The SQLITE_MUTEX_NOOP implementation is a set of routines |
** ^The SQLITE_MUTEX_NOOP implementation is a set of routines |
** that does no real locking and is appropriate for use in |
** that does no real locking and is appropriate for use in |
** a single-threaded application. ^The SQLITE_MUTEX_OS2, | ** a single-threaded application. ^The SQLITE_MUTEX_PTHREADS and |
** SQLITE_MUTEX_PTHREADS, and SQLITE_MUTEX_W32 implementations | ** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix |
** are appropriate for use on OS/2, Unix, and Windows. | ** and Windows. |
** |
** |
** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor |
** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor |
** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex |
** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex |
Line 5957 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int
|
Line 6151 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int
|
** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS |
** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS |
** is always 0. |
** is always 0. |
** </dd> |
** </dd> |
|
** |
|
** [[SQLITE_DBSTATUS_CACHE_WRITE]] ^(<dt>SQLITE_DBSTATUS_CACHE_WRITE</dt> |
|
** <dd>This parameter returns the number of dirty cache entries that have |
|
** been written to disk. Specifically, the number of pages written to the |
|
** wal file in wal mode databases, or the number of pages written to the |
|
** database file in rollback mode databases. Any pages written as part of |
|
** transaction rollback or database recovery operations are not included. |
|
** If an IO or other error occurs while writing a page to disk, the effect |
|
** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The |
|
** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0. |
|
** </dd> |
** </dl> |
** </dl> |
*/ |
*/ |
#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 |
#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 |
Line 5968 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int
|
Line 6173 SQLITE_API int sqlite3_db_status(sqlite3*, int op, int
|
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 |
#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 |
#define SQLITE_DBSTATUS_CACHE_HIT 7 |
#define SQLITE_DBSTATUS_CACHE_HIT 7 |
#define SQLITE_DBSTATUS_CACHE_MISS 8 |
#define SQLITE_DBSTATUS_CACHE_MISS 8 |
#define SQLITE_DBSTATUS_MAX 8 /* Largest defined DBSTATUS */ | #define SQLITE_DBSTATUS_CACHE_WRITE 9 |
| #define SQLITE_DBSTATUS_MAX 9 /* Largest defined DBSTATUS */ |
|
|
|
|
/* |
/* |
Line 6584 SQLITE_API int sqlite3_unlock_notify(
|
Line 6790 SQLITE_API int sqlite3_unlock_notify(
|
/* |
/* |
** CAPI3REF: String Comparison |
** CAPI3REF: String Comparison |
** |
** |
** ^The [sqlite3_strnicmp()] API allows applications and extensions to | ** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications |
** compare the contents of two buffers containing UTF-8 strings in a | ** and extensions to compare the contents of two buffers containing UTF-8 |
** case-independent fashion, using the same definition of case independence | ** strings in a case-independent fashion, using the same definition of "case |
** that SQLite uses internally when comparing identifiers. | ** independence" that SQLite uses internally when comparing identifiers. |
*/ |
*/ |
|
SQLITE_API int sqlite3_stricmp(const char *, const char *); |
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); |
SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); |
|
|
/* |
/* |
Line 6923 typedef struct sqlite3_rtree_geometry sqlite3_rtree_ge
|
Line 7130 typedef struct sqlite3_rtree_geometry sqlite3_rtree_ge
|
SQLITE_API int sqlite3_rtree_geometry_callback( |
SQLITE_API int sqlite3_rtree_geometry_callback( |
sqlite3 *db, |
sqlite3 *db, |
const char *zGeom, |
const char *zGeom, |
int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes), | #ifdef SQLITE_RTREE_INT_ONLY |
| int (*xGeom)(sqlite3_rtree_geometry*, int n, sqlite3_int64 *a, int *pRes), |
| #else |
| int (*xGeom)(sqlite3_rtree_geometry*, int n, double *a, int *pRes), |
| #endif |
void *pContext |
void *pContext |
); |
); |
|
|