version 1.4, 2017/02/13 16:52:50
|
version 1.4.2.1, 2017/06/12 09:25:09
|
Line 108 extern "C" {
|
Line 108 extern "C" {
|
** be held constant and Z will be incremented or else Y will be incremented |
** be held constant and Z will be incremented or else Y will be incremented |
** and Z will be reset to zero. |
** and Z will be reset to zero. |
** |
** |
** Since version 3.6.18, SQLite source code has been stored in the | ** Since [version 3.6.18] ([dateof:3.6.18]), |
| ** SQLite source code has been stored in the |
** <a href="http://www.fossil-scm.org/">Fossil configuration management |
** <a href="http://www.fossil-scm.org/">Fossil configuration management |
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to |
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to |
** a string which identifies a particular check-in of SQLite |
** a string which identifies a particular check-in of SQLite |
** within its configuration management system. ^The SQLITE_SOURCE_ID |
** within its configuration management system. ^The SQLITE_SOURCE_ID |
** string contains the date and time of the check-in (UTC) and an SHA1 | ** string contains the date and time of the check-in (UTC) and a SHA1 |
** hash of the entire source tree. | ** or SHA3-256 hash of the entire source tree. |
** |
** |
** See also: [sqlite3_libversion()], |
** See also: [sqlite3_libversion()], |
** [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.14.2" | #define SQLITE_VERSION "3.19.3" |
#define SQLITE_VERSION_NUMBER 3014002 | #define SQLITE_VERSION_NUMBER 3019003 |
#define SQLITE_SOURCE_ID "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6" | #define SQLITE_SOURCE_ID "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b" |
|
|
/* |
/* |
** CAPI3REF: Run-Time Library Version Numbers |
** CAPI3REF: Run-Time Library Version Numbers |
** KEYWORDS: sqlite3_version, sqlite3_sourceid | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
** |
** |
** These interfaces provide the same information as the [SQLITE_VERSION], |
** These interfaces provide the same information as the [SQLITE_VERSION], |
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
Line 258 typedef struct sqlite3 sqlite3;
|
Line 259 typedef struct sqlite3 sqlite3;
|
*/ |
*/ |
#ifdef SQLITE_INT64_TYPE |
#ifdef SQLITE_INT64_TYPE |
typedef SQLITE_INT64_TYPE sqlite_int64; |
typedef SQLITE_INT64_TYPE sqlite_int64; |
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; | # ifdef SQLITE_UINT64_TYPE |
| typedef SQLITE_UINT64_TYPE sqlite_uint64; |
| # else |
| typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; |
| # endif |
#elif defined(_MSC_VER) || defined(__BORLANDC__) |
#elif defined(_MSC_VER) || defined(__BORLANDC__) |
typedef __int64 sqlite_int64; |
typedef __int64 sqlite_int64; |
typedef unsigned __int64 sqlite_uint64; |
typedef unsigned __int64 sqlite_uint64; |
Line 452 SQLITE_API int sqlite3_exec(
|
Line 457 SQLITE_API int sqlite3_exec(
|
** [result codes]. However, experience has shown that many of |
** [result codes]. However, experience has shown that many of |
** these result codes are too coarse-grained. They do not provide as |
** these result codes are too coarse-grained. They do not provide as |
** much information about problems as programmers might like. In an effort to |
** much information about problems as programmers might like. In an effort to |
** address this, newer versions of SQLite (version 3.3.8 and later) include | ** address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8] |
| ** and later) include |
** support for additional result codes that provide more detailed information |
** support for additional result codes that provide more detailed information |
** about errors. These [extended result codes] are enabled or disabled |
** about errors. These [extended result codes] are enabled or disabled |
** on a per database connection basis using the |
** on a per database connection basis using the |
Line 570 SQLITE_API int sqlite3_exec(
|
Line 576 SQLITE_API int sqlite3_exec(
|
** file that were written at the application level might have changed |
** file that were written at the application level might have changed |
** and that adjacent bytes, even bytes within the same sector are |
** and that adjacent bytes, even bytes within the same sector are |
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
** flag indicate that a file cannot be deleted when open. The | ** flag indicates that a file cannot be deleted when open. The |
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on |
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on |
** read-only media and cannot be changed even by processes with |
** read-only media and cannot be changed even by processes with |
** elevated privileges. |
** elevated privileges. |
Line 720 struct sqlite3_file {
|
Line 726 struct sqlite3_file {
|
** <li> [SQLITE_IOCAP_ATOMIC64K] |
** <li> [SQLITE_IOCAP_ATOMIC64K] |
** <li> [SQLITE_IOCAP_SAFE_APPEND] |
** <li> [SQLITE_IOCAP_SAFE_APPEND] |
** <li> [SQLITE_IOCAP_SEQUENTIAL] |
** <li> [SQLITE_IOCAP_SEQUENTIAL] |
|
** <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN] |
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE] |
|
** <li> [SQLITE_IOCAP_IMMUTABLE] |
** </ul> |
** </ul> |
** |
** |
** The SQLITE_IOCAP_ATOMIC property means that all writes of |
** The SQLITE_IOCAP_ATOMIC property means that all writes of |
Line 848 struct sqlite3_io_methods {
|
Line 857 struct sqlite3_io_methods {
|
** opcode allows these two values (10 retries and 25 milliseconds of delay) |
** opcode allows these two values (10 retries and 25 milliseconds of delay) |
** to be adjusted. The values are changed for all database connections |
** to be adjusted. The values are changed for all database connections |
** within the same process. The argument is a pointer to an array of two |
** within the same process. The argument is a pointer to an array of two |
** integers where the first integer i the new retry count and the second | ** integers where the first integer is the new retry count and the second |
** integer is the delay. If either integer is negative, then the setting |
** integer is the delay. If either integer is negative, then the setting |
** is not changed but instead the prior value of that setting is written |
** is not changed but instead the prior value of that setting is written |
** into the array entry, allowing the current retry settings to be |
** into the array entry, allowing the current retry settings to be |
Line 976 struct sqlite3_io_methods {
|
Line 985 struct sqlite3_io_methods {
|
** on whether or not the file has been renamed, moved, or deleted since it |
** on whether or not the file has been renamed, moved, or deleted since it |
** was first opened. |
** was first opened. |
** |
** |
|
** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]] |
|
** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the |
|
** underlying native file handle associated with a file handle. This file |
|
** control interprets its argument as a pointer to a native file handle and |
|
** writes the resulting value there. |
|
** |
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]] |
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]] |
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This |
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This |
** opcode causes the xFileControl method to swap the file handle with the one |
** opcode causes the xFileControl method to swap the file handle with the one |
Line 1026 struct sqlite3_io_methods {
|
Line 1041 struct sqlite3_io_methods {
|
#define SQLITE_FCNTL_RBU 26 |
#define SQLITE_FCNTL_RBU 26 |
#define SQLITE_FCNTL_VFS_POINTER 27 |
#define SQLITE_FCNTL_VFS_POINTER 27 |
#define SQLITE_FCNTL_JOURNAL_POINTER 28 |
#define SQLITE_FCNTL_JOURNAL_POINTER 28 |
|
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29 |
|
#define SQLITE_FCNTL_PDB 30 |
|
|
/* deprecated names */ |
/* deprecated names */ |
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE |
Line 1969 struct sqlite3_mem_methods {
|
Line 1986 struct sqlite3_mem_methods {
|
** be a NULL pointer, in which case the new setting is not reported back. |
** be a NULL pointer, in which case the new setting is not reported back. |
** </dd> |
** </dd> |
** |
** |
|
** <dt>SQLITE_DBCONFIG_MAINDBNAME</dt> |
|
** <dd> ^This option is used to change the name of the "main" database |
|
** schema. ^The sole argument is a pointer to a constant UTF8 string |
|
** which will become the new schema name in place of "main". ^SQLite |
|
** does not make a copy of the new main schema name string, so the application |
|
** must ensure that the argument passed into this DBCONFIG option is unchanged |
|
** until after the database connection closes. |
|
** </dd> |
|
** |
|
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt> |
|
** <dd> Usually, when a database in wal mode is closed or detached from a |
|
** database handle, SQLite checks if this will mean that there are now no |
|
** connections at all to the database. If so, it performs a checkpoint |
|
** operation before closing the connection. This option may be used to |
|
** override this behaviour. The first parameter passed to this operation |
|
** is an integer - non-zero to disable checkpoints-on-close, or zero (the |
|
** default) to enable them. The second parameter is a pointer to an integer |
|
** into which is written 0 or 1 to indicate whether checkpoints-on-close |
|
** have been disabled - 0 if they are not disabled, 1 if they are. |
|
** </dd> |
|
** |
** </dl> |
** </dl> |
*/ |
*/ |
|
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ |
#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ |
#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ |
#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */ |
#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */ |
|
#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */ |
|
|
|
|
/* |
/* |
Line 2000 SQLITE_API int sqlite3_extended_result_codes(sqlite3*,
|
Line 2040 SQLITE_API int sqlite3_extended_result_codes(sqlite3*,
|
** the table has a column of type [INTEGER PRIMARY KEY] then that column |
** the table has a column of type [INTEGER PRIMARY KEY] then that column |
** is another alias for the rowid. |
** is another alias for the rowid. |
** |
** |
** ^The sqlite3_last_insert_rowid(D) interface returns the [rowid] of the | ** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of |
** most recent successful [INSERT] into a rowid table or [virtual table] | ** the most recent successful [INSERT] into a rowid table or [virtual table] |
** on database connection D. | ** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not |
** ^Inserts into [WITHOUT ROWID] tables are not recorded. | ** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred |
** ^If no successful [INSERT]s into rowid tables | ** on the database connection D, then sqlite3_last_insert_rowid(D) returns |
** have ever occurred on the database connection D, | ** zero. |
** then sqlite3_last_insert_rowid(D) returns zero. | |
** |
** |
** ^(If an [INSERT] occurs within a trigger or within a [virtual table] | ** As well as being set automatically as rows are inserted into database |
** method, then this routine will return the [rowid] of the inserted | ** tables, the value returned by this function may be set explicitly by |
** row as long as the trigger or virtual table method is running. | ** [sqlite3_set_last_insert_rowid()] |
** But once the trigger or virtual table method ends, the value returned | |
** by this routine reverts to what it was before the trigger or virtual | |
** table method began.)^ | |
** |
** |
|
** Some virtual table implementations may INSERT rows into rowid tables as |
|
** part of committing a transaction (e.g. to flush data accumulated in memory |
|
** to disk). In this case subsequent calls to this function return the rowid |
|
** associated with these internal INSERT operations, which leads to |
|
** unintuitive results. Virtual table implementations that do write to rowid |
|
** tables in this way can avoid this problem by restoring the original |
|
** rowid value using [sqlite3_set_last_insert_rowid()] before returning |
|
** control to the user. |
|
** |
|
** ^(If an [INSERT] occurs within a trigger then this routine will |
|
** return the [rowid] of the inserted row as long as the trigger is |
|
** running. Once the trigger program ends, the value returned |
|
** by this routine reverts to what it was before the trigger was fired.)^ |
|
** |
** ^An [INSERT] that fails due to a constraint violation is not a |
** ^An [INSERT] that fails due to a constraint violation is not a |
** successful [INSERT] and does not change the value returned by this |
** successful [INSERT] and does not change the value returned by this |
** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, |
** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, |
Line 2041 SQLITE_API int sqlite3_extended_result_codes(sqlite3*,
|
Line 2091 SQLITE_API int sqlite3_extended_result_codes(sqlite3*,
|
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); |
SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); |
|
|
/* |
/* |
|
** CAPI3REF: Set the Last Insert Rowid value. |
|
** METHOD: sqlite3 |
|
** |
|
** The sqlite3_set_last_insert_rowid(D, R) method allows the application to |
|
** set the value returned by calling sqlite3_last_insert_rowid(D) to R |
|
** without inserting a row into the database. |
|
*/ |
|
SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64); |
|
|
|
/* |
** CAPI3REF: Count The Number Of Rows Modified |
** CAPI3REF: Count The Number Of Rows Modified |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
** |
** |
Line 2151 SQLITE_API int sqlite3_total_changes(sqlite3*);
|
Line 2211 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. |
** |
|
** If the database connection closes while [sqlite3_interrupt()] |
|
** is running then bad things will likely happen. |
|
*/ |
*/ |
SQLITE_API void sqlite3_interrupt(sqlite3*); |
SQLITE_API void sqlite3_interrupt(sqlite3*); |
|
|
Line 2616 SQLITE_API void sqlite3_randomness(int N, void *P);
|
Line 2673 SQLITE_API void sqlite3_randomness(int N, void *P);
|
/* |
/* |
** CAPI3REF: Compile-Time Authorization Callbacks |
** CAPI3REF: Compile-Time Authorization Callbacks |
** METHOD: sqlite3 |
** METHOD: sqlite3 |
|
** KEYWORDS: {authorizer callback} |
** |
** |
** ^This routine registers an authorizer callback with a particular |
** ^This routine registers an authorizer callback with a particular |
** [database connection], supplied in the first argument. |
** [database connection], supplied in the first argument. |
Line 2643 SQLITE_API void sqlite3_randomness(int N, void *P);
|
Line 2701 SQLITE_API void sqlite3_randomness(int N, void *P);
|
** parameter to the sqlite3_set_authorizer() interface. ^The second parameter |
** parameter to the sqlite3_set_authorizer() interface. ^The second parameter |
** to the callback is an integer [SQLITE_COPY | action code] that specifies |
** to the callback is an integer [SQLITE_COPY | action code] that specifies |
** the particular action to be authorized. ^The third through sixth parameters |
** the particular action to be authorized. ^The third through sixth parameters |
** to the callback are zero-terminated strings that contain additional | ** to the callback are either NULL pointers or zero-terminated strings |
** details about the action to be authorized. | ** that contain additional details about the action to be authorized. |
| ** Applications must always be prepared to encounter a NULL pointer in any |
| ** of the third through the sixth parameters of the authorization callback. |
** |
** |
** ^If the action code is [SQLITE_READ] |
** ^If the action code is [SQLITE_READ] |
** and the callback returns [SQLITE_IGNORE] then the |
** and the callback returns [SQLITE_IGNORE] then the |
Line 2653 SQLITE_API void sqlite3_randomness(int N, void *P);
|
Line 2713 SQLITE_API void sqlite3_randomness(int N, void *P);
|
** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] |
** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] |
** return can be used to deny an untrusted user access to individual |
** return can be used to deny an untrusted user access to individual |
** columns of a table. |
** columns of a table. |
|
** ^When a table is referenced by a [SELECT] but no column values are |
|
** extracted from that table (for example in a query like |
|
** "SELECT count(*) FROM tab") then the [SQLITE_READ] authorizer callback |
|
** is invoked once for that table with a column name that is an empty string. |
** ^If the action code is [SQLITE_DELETE] and the callback returns |
** ^If the action code is [SQLITE_DELETE] and the callback returns |
** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the |
** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the |
** [truncate optimization] is disabled and all rows are deleted individually. |
** [truncate optimization] is disabled and all rows are deleted individually. |
Line 3364 SQLITE_API int sqlite3_limit(sqlite3*, int id, int new
|
Line 3428 SQLITE_API int sqlite3_limit(sqlite3*, int id, int new
|
** |
** |
** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt> |
** [[SQLITE_LIMIT_VDBE_OP]] ^(<dt>SQLITE_LIMIT_VDBE_OP</dt> |
** <dd>The maximum number of instructions in a virtual machine program |
** <dd>The maximum number of instructions in a virtual machine program |
** used to implement an SQL statement. This limit is not currently | ** used to implement an SQL statement. If [sqlite3_prepare_v2()] or |
** enforced, though that might be added in some future release of | ** the equivalent tries to allocate space for more than this many opcodes |
** SQLite.</dd>)^ | ** in a single prepared statement, an SQLITE_NOMEM error is returned.</dd>)^ |
** |
** |
** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt> |
** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt> |
** <dd>The maximum number of arguments on a function.</dd>)^ |
** <dd>The maximum number of arguments on a function.</dd>)^ |
Line 3404 SQLITE_API int sqlite3_limit(sqlite3*, int id, int new
|
Line 3468 SQLITE_API int sqlite3_limit(sqlite3*, int id, int new
|
#define SQLITE_LIMIT_TRIGGER_DEPTH 10 |
#define SQLITE_LIMIT_TRIGGER_DEPTH 10 |
#define SQLITE_LIMIT_WORKER_THREADS 11 |
#define SQLITE_LIMIT_WORKER_THREADS 11 |
|
|
|
|
/* |
/* |
** CAPI3REF: Compiling An SQL Statement |
** CAPI3REF: Compiling An SQL Statement |
** KEYWORDS: {SQL statement compiler} |
** KEYWORDS: {SQL statement compiler} |
Line 3577 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pS
|
Line 3642 SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pS
|
** sqlite3_stmt_readonly() to return true since, while those statements |
** sqlite3_stmt_readonly() to return true since, while those statements |
** change the configuration of a database connection, they do not make |
** change the configuration of a database connection, they do not make |
** changes to the content of the database files on disk. |
** changes to the content of the database files on disk. |
|
** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since |
|
** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and |
|
** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so |
|
** sqlite3_stmt_readonly() returns false for those commands. |
*/ |
*/ |
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); |
|
|
Line 3640 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
Line 3709 SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
|
** The [sqlite3_value_blob | sqlite3_value_type()] family of |
** The [sqlite3_value_blob | sqlite3_value_type()] family of |
** interfaces require protected sqlite3_value objects. |
** interfaces require protected sqlite3_value objects. |
*/ |
*/ |
typedef struct Mem sqlite3_value; | typedef struct sqlite3_value sqlite3_value; |
|
|
/* |
/* |
** CAPI3REF: SQL Function Context Object |
** CAPI3REF: SQL Function Context Object |
Line 3859 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
|
Line 3928 SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
|
** METHOD: sqlite3_stmt |
** METHOD: sqlite3_stmt |
** |
** |
** ^Return the number of columns in the result set returned by the |
** ^Return the number of columns in the result set returned by the |
** [prepared statement]. ^This routine returns 0 if pStmt is an SQL | ** [prepared statement]. ^If this routine returns 0, that means the |
** statement that does not return data (for example an [UPDATE]). | ** [prepared statement] returns no data (for example an [UPDATE]). |
| ** ^However, just because this routine returns a positive number does not |
| ** mean that one or more rows of data will be returned. ^A SELECT statement |
| ** will always have a positive sqlite3_column_count() but depending on the |
| ** WHERE clause constraints and the table content, it might return no rows. |
** |
** |
** See also: [sqlite3_data_count()] |
** See also: [sqlite3_data_count()] |
*/ |
*/ |
Line 4041 SQLITE_API const void *sqlite3_column_decltype16(sqlit
|
Line 4114 SQLITE_API const void *sqlite3_column_decltype16(sqlit
|
** other than [SQLITE_ROW] before any subsequent invocation of |
** other than [SQLITE_ROW] before any subsequent invocation of |
** sqlite3_step(). Failure to reset the prepared statement using |
** sqlite3_step(). Failure to reset the prepared statement using |
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from |
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from |
** sqlite3_step(). But after version 3.6.23.1, sqlite3_step() began | ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1], |
| ** sqlite3_step() began |
** calling [sqlite3_reset()] automatically in this circumstance rather |
** calling [sqlite3_reset()] automatically in this circumstance rather |
** than returning [SQLITE_MISUSE]. This is not considered a compatibility |
** than returning [SQLITE_MISUSE]. This is not considered a compatibility |
** break because any application that ever receives an SQLITE_MISUSE error |
** break because any application that ever receives an SQLITE_MISUSE error |
Line 4689 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_
|
Line 4763 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_
|
** the compiled regular expression can be reused on multiple |
** the compiled regular expression can be reused on multiple |
** invocations of the same function. |
** invocations of the same function. |
** |
** |
** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata | ** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the metadata |
** associated by the sqlite3_set_auxdata() function with the Nth argument | ** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument |
** value to the application-defined function. ^If there is no metadata | ** value to the application-defined function. ^N is zero for the left-most |
** associated with the function argument, this sqlite3_get_auxdata() interface | ** function argument. ^If there is no metadata |
| ** associated with the function argument, the sqlite3_get_auxdata(C,N) interface |
** returns a NULL pointer. |
** returns a NULL pointer. |
** |
** |
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th |
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th |
Line 4723 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_
|
Line 4798 SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_
|
** function parameters that are compile-time constants, including literal |
** function parameters that are compile-time constants, including literal |
** values and [parameters] and expressions composed from the same.)^ |
** values and [parameters] and expressions composed from the same.)^ |
** |
** |
|
** The value of the N parameter to these interfaces should be non-negative. |
|
** Future enhancements may make use of negative N values to define new |
|
** kinds of function caching behavior. |
|
** |
** These routines must be called from the same thread in which |
** These routines must be called from the same thread in which |
** the SQL function is running. |
** the SQL function is running. |
*/ |
*/ |
Line 5368 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(
|
Line 5447 SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(
|
** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified. |
** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified. |
** |
** |
** ^In the current implementation, the update hook |
** ^In the current implementation, the update hook |
** is not invoked when duplication rows are deleted because of an | ** is not invoked when conflicting rows are deleted because of an |
** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook |
** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook |
** invoked when rows are deleted using the [truncate optimization]. |
** invoked when rows are deleted using the [truncate optimization]. |
** The exceptions defined in this paragraph might change in a future |
** The exceptions defined in this paragraph might change in a future |
Line 5404 SQLITE_API void *sqlite3_update_hook(
|
Line 5483 SQLITE_API void *sqlite3_update_hook(
|
** and disabled if the argument is false.)^ |
** and disabled if the argument is false.)^ |
** |
** |
** ^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. In prior versions of SQLite, | ** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). |
| ** In prior versions of SQLite, |
** sharing was enabled or disabled for each thread separately. |
** sharing was enabled or disabled for each thread separately. |
** |
** |
** ^(The cache sharing mode set by this interface effects all subsequent |
** ^(The cache sharing mode set by this interface effects all subsequent |
Line 5498 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
Line 5578 SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
** from the heap. |
** from the heap. |
** </ul>)^ |
** </ul>)^ |
** |
** |
** Beginning with SQLite version 3.7.3, the soft heap limit is enforced | ** Beginning with SQLite [version 3.7.3] ([dateof:3.7.3]), |
| ** the soft heap limit is enforced |
** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] |
** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] |
** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT], |
** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT], |
** the soft heap limit is enforced on every memory allocation. Without |
** the soft heap limit is enforced on every memory allocation. Without |
Line 5892 struct sqlite3_module {
|
Line 5973 struct sqlite3_module {
|
** the xUpdate method are automatically rolled back by SQLite. |
** the xUpdate method are automatically rolled back by SQLite. |
** |
** |
** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info |
** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info |
** structure for SQLite version 3.8.2. If a virtual table extension is | ** structure for SQLite [version 3.8.2] ([dateof:3.8.2]). |
| ** If a virtual table extension is |
** used with an SQLite version earlier than 3.8.2, the results of attempting |
** used with an SQLite version earlier than 3.8.2, the results of attempting |
** to read or write the estimatedRows field are undefined (but are likely |
** to read or write the estimatedRows field are undefined (but are likely |
** to included crashing the application). The estimatedRows field should |
** to included crashing the application). The estimatedRows field should |
** therefore only be used if [sqlite3_libversion_number()] returns a |
** therefore only be used if [sqlite3_libversion_number()] returns a |
** value greater than or equal to 3008002. Similarly, the idxFlags field |
** value greater than or equal to 3008002. Similarly, the idxFlags field |
** was added for version 3.9.0. It may therefore only be used if | ** was added for [version 3.9.0] ([dateof:3.9.0]). |
| ** It may therefore only be used if |
** sqlite3_libversion_number() returns a value greater than or equal to |
** sqlite3_libversion_number() returns a value greater than or equal to |
** 3009000. |
** 3009000. |
*/ |
*/ |
Line 6146 typedef struct sqlite3_blob sqlite3_blob;
|
Line 6229 typedef struct sqlite3_blob sqlite3_blob;
|
** [database connection] error code and message accessible via |
** [database connection] error code and message accessible via |
** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. |
** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. |
** |
** |
|
** A BLOB referenced by sqlite3_blob_open() may be read using the |
|
** [sqlite3_blob_read()] interface and modified by using |
|
** [sqlite3_blob_write()]. The [BLOB handle] can be moved to a |
|
** different row of the same table using the [sqlite3_blob_reopen()] |
|
** interface. However, the column, table, or database of a [BLOB handle] |
|
** cannot be changed after the [BLOB handle] is opened. |
** |
** |
** ^(If the row that a BLOB handle points to is modified by an |
** ^(If the row that a BLOB handle points to is modified by an |
** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects |
** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects |
Line 6169 typedef struct sqlite3_blob sqlite3_blob;
|
Line 6258 typedef struct sqlite3_blob sqlite3_blob;
|
** |
** |
** To avoid a resource leak, every open [BLOB handle] should eventually |
** To avoid a resource leak, every open [BLOB handle] should eventually |
** be released by a call to [sqlite3_blob_close()]. |
** be released by a call to [sqlite3_blob_close()]. |
|
** |
|
** See also: [sqlite3_blob_close()], |
|
** [sqlite3_blob_reopen()], [sqlite3_blob_read()], |
|
** [sqlite3_blob_bytes()], [sqlite3_blob_write()]. |
*/ |
*/ |
SQLITE_API int sqlite3_blob_open( |
SQLITE_API int sqlite3_blob_open( |
sqlite3*, |
sqlite3*, |
Line 6184 SQLITE_API int sqlite3_blob_open(
|
Line 6277 SQLITE_API int sqlite3_blob_open(
|
** CAPI3REF: Move a BLOB Handle to a New Row |
** CAPI3REF: Move a BLOB Handle to a New Row |
** METHOD: sqlite3_blob |
** METHOD: sqlite3_blob |
** |
** |
** ^This function is used to move an existing blob handle so that it points | ** ^This function is used to move an existing [BLOB handle] so that it points |
** to a different row of the same database table. ^The new row is identified |
** to a different row of the same database table. ^The new row is identified |
** by the rowid value passed as the second argument. Only the row can be |
** by the rowid value passed as the second argument. Only the row can be |
** changed. ^The database, table and column on which the blob handle is open |
** changed. ^The database, table and column on which the blob handle is open |
** remain the same. Moving an existing blob handle to a new row can be | ** remain the same. Moving an existing [BLOB handle] to a new row is |
** faster than closing the existing handle and opening a new one. |
** faster than closing the existing handle and opening a new one. |
** |
** |
** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - |
** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - |
Line 6596 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
Line 6689 SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ |
#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ |
#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ |
#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ |
#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ |
#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ |
#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */ | #define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */ |
#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ |
#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ |
#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */ |
#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */ |
#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */ |
#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */ |
Line 6700 SQLITE_API int sqlite3_test_control(int op, ...);
|
Line 6793 SQLITE_API int sqlite3_test_control(int op, ...);
|
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 |
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 |
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 |
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 |
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */ |
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */ |
|
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19 |
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20 |
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20 |
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21 |
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21 |
#define SQLITE_TESTCTRL_BYTEORDER 22 |
#define SQLITE_TESTCTRL_BYTEORDER 22 |
Line 8116 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 8210 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** |
** |
** ^The [sqlite3_preupdate_hook()] interface registers a callback function |
** ^The [sqlite3_preupdate_hook()] interface registers a callback function |
** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation |
** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation |
** on a [rowid table]. | ** on a database table. |
** ^At most one preupdate hook may be registered at a time on a single |
** ^At most one preupdate hook may be registered at a time on a single |
** [database connection]; each call to [sqlite3_preupdate_hook()] overrides |
** [database connection]; each call to [sqlite3_preupdate_hook()] overrides |
** the previous setting. |
** the previous setting. |
Line 8125 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 8219 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as |
** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as |
** the first parameter to callbacks. |
** the first parameter to callbacks. |
** |
** |
** ^The preupdate hook only fires for changes to [rowid tables]; the preupdate | ** ^The preupdate hook only fires for changes to real database tables; the |
** hook is not invoked for changes to [virtual tables] or [WITHOUT ROWID] | ** preupdate hook is not invoked for changes to [virtual tables] or to |
** tables. | ** system tables like sqlite_master or sqlite_stat1. |
** |
** |
** ^The second parameter to the preupdate callback is a pointer to |
** ^The second parameter to the preupdate callback is a pointer to |
** the [database connection] that registered the preupdate hook. |
** the [database connection] that registered the preupdate hook. |
Line 8141 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 8235 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** databases.)^ |
** databases.)^ |
** ^The fifth parameter to the preupdate callback is the name of the |
** ^The fifth parameter to the preupdate callback is the name of the |
** table that is being modified. |
** table that is being modified. |
** ^The sixth parameter to the preupdate callback is the initial [rowid] of the |
|
** row being changes for SQLITE_UPDATE and SQLITE_DELETE changes and is |
|
** undefined for SQLITE_INSERT changes. |
|
** ^The seventh parameter to the preupdate callback is the final [rowid] of |
|
** the row being changed for SQLITE_UPDATE and SQLITE_INSERT changes and is |
|
** undefined for SQLITE_DELETE changes. |
|
** |
** |
|
** For an UPDATE or DELETE operation on a [rowid table], the sixth |
|
** parameter passed to the preupdate callback is the initial [rowid] of the |
|
** row being modified or deleted. For an INSERT operation on a rowid table, |
|
** or any operation on a WITHOUT ROWID table, the value of the sixth |
|
** parameter is undefined. For an INSERT or UPDATE on a rowid table the |
|
** seventh parameter is the final rowid value of the row being inserted |
|
** or updated. The value of the seventh parameter passed to the callback |
|
** function is not defined for operations on WITHOUT ROWID tables, or for |
|
** INSERT operations on rowid tables. |
|
** |
** 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 8186 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
Line 8284 SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
** |
** |
** See also: [sqlite3_update_hook()] |
** See also: [sqlite3_update_hook()] |
*/ |
*/ |
SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate_hook( | #if defined(SQLITE_ENABLE_PREUPDATE_HOOK) |
| SQLITE_API void *sqlite3_preupdate_hook( |
sqlite3 *db, |
sqlite3 *db, |
void(*xPreUpdate)( |
void(*xPreUpdate)( |
void *pCtx, /* Copy of third arg to preupdate_hook() */ |
void *pCtx, /* Copy of third arg to preupdate_hook() */ |
Line 8199 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate
|
Line 8298 SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_preupdate
|
), |
), |
void* |
void* |
); |
); |
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); | SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **); |
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_count(sqlite3 *); | SQLITE_API int sqlite3_preupdate_count(sqlite3 *); |
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_depth(sqlite3 *); | SQLITE_API int sqlite3_preupdate_depth(sqlite3 *); |
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); | SQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **); |
| #endif |
|
|
/* |
/* |
** CAPI3REF: Low-level system error code |
** CAPI3REF: Low-level system error code |
Line 8218 SQLITE_API int sqlite3_system_errno(sqlite3*);
|
Line 8318 SQLITE_API int sqlite3_system_errno(sqlite3*);
|
|
|
/* |
/* |
** CAPI3REF: Database Snapshot |
** CAPI3REF: Database Snapshot |
** KEYWORDS: {snapshot} | ** KEYWORDS: {snapshot} {sqlite3_snapshot} |
** EXPERIMENTAL |
** EXPERIMENTAL |
** |
** |
** An instance of the snapshot object records the state of a [WAL mode] |
** An instance of the snapshot object records the state of a [WAL mode] |
Line 8242 SQLITE_API int sqlite3_system_errno(sqlite3*);
|
Line 8342 SQLITE_API int sqlite3_system_errno(sqlite3*);
|
** to an historical snapshot (if possible). The destructor for |
** to an historical snapshot (if possible). The destructor for |
** sqlite3_snapshot objects is [sqlite3_snapshot_free()]. |
** sqlite3_snapshot objects is [sqlite3_snapshot_free()]. |
*/ |
*/ |
typedef struct sqlite3_snapshot sqlite3_snapshot; | typedef struct sqlite3_snapshot { |
| unsigned char hidden[48]; |
| } sqlite3_snapshot; |
|
|
/* |
/* |
** CAPI3REF: Record A Database Snapshot |
** CAPI3REF: Record A Database Snapshot |
Line 8253 typedef struct sqlite3_snapshot sqlite3_snapshot;
|
Line 8355 typedef struct sqlite3_snapshot sqlite3_snapshot;
|
** schema S in database connection D. ^On success, the |
** schema S in database connection D. ^On success, the |
** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly |
** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly |
** created [sqlite3_snapshot] object into *P and returns SQLITE_OK. |
** created [sqlite3_snapshot] object into *P and returns SQLITE_OK. |
** ^If schema S of [database connection] D is not a [WAL mode] database | ** If there is not already a read-transaction open on schema S when |
** that is in a read transaction, then [sqlite3_snapshot_get(D,S,P)] | ** this function is called, one is opened automatically. |
** leaves the *P value unchanged and returns an appropriate [error code]. | |
** |
** |
|
** The following must be true for this function to succeed. If any of |
|
** the following statements are false when sqlite3_snapshot_get() is |
|
** called, SQLITE_ERROR is returned. The final value of *P is undefined |
|
** in this case. |
|
** |
|
** <ul> |
|
** <li> The database handle must be in [autocommit mode]. |
|
** |
|
** <li> Schema S of [database connection] D must be a [WAL mode] database. |
|
** |
|
** <li> There must not be a write transaction open on schema S of database |
|
** connection D. |
|
** |
|
** <li> One or more transactions must have been written to the current wal |
|
** file since it was created on disk (by any connection). This means |
|
** that a snapshot cannot be taken on a wal mode database with no wal |
|
** file immediately after it is first opened. At least one transaction |
|
** must be written to it first. |
|
** </ul> |
|
** |
|
** This function may also return SQLITE_NOMEM. If it is called with the |
|
** database handle in autocommit mode but fails for some other reason, |
|
** whether or not a read transaction is opened on schema S is undefined. |
|
** |
** The [sqlite3_snapshot] object returned from a successful call to |
** The [sqlite3_snapshot] object returned from a successful call to |
** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()] |
** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()] |
** to avoid a memory leak. |
** to avoid a memory leak. |
Line 8349 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cm
|
Line 8474 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cm
|
); |
); |
|
|
/* |
/* |
|
** CAPI3REF: Recover snapshots from a wal file |
|
** EXPERIMENTAL |
|
** |
|
** If all connections disconnect from a database file but do not perform |
|
** a checkpoint, the existing wal file is opened along with the database |
|
** file the next time the database is opened. At this point it is only |
|
** possible to successfully call sqlite3_snapshot_open() to open the most |
|
** recent snapshot of the database (the one at the head of the wal file), |
|
** even though the wal file may contain other valid snapshots for which |
|
** clients have sqlite3_snapshot handles. |
|
** |
|
** This function attempts to scan the wal file associated with database zDb |
|
** of database handle db and make all valid snapshots available to |
|
** sqlite3_snapshot_open(). It is an error if there is already a read |
|
** transaction open on the database, or if the database is not a wal mode |
|
** database. |
|
** |
|
** SQLITE_OK is returned if successful, or an SQLite error code otherwise. |
|
*/ |
|
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb); |
|
|
|
/* |
** Undo the hack that converts floating point types to integer for |
** Undo the hack that converts floating point types to integer for |
** builds on processors without floating point support. |
** builds on processors without floating point support. |
*/ |
*/ |
Line 8533 typedef struct sqlite3_changeset_iter sqlite3_changese
|
Line 8680 typedef struct sqlite3_changeset_iter sqlite3_changese
|
** attached database. It is not an error if database zDb is not attached |
** attached database. It is not an error if database zDb is not attached |
** to the database when the session object is created. |
** to the database when the session object is created. |
*/ |
*/ |
int sqlite3session_create( | SQLITE_API int sqlite3session_create( |
sqlite3 *db, /* Database handle */ |
sqlite3 *db, /* Database handle */ |
const char *zDb, /* Name of db (e.g. "main") */ |
const char *zDb, /* Name of db (e.g. "main") */ |
sqlite3_session **ppSession /* OUT: New session object */ |
sqlite3_session **ppSession /* OUT: New session object */ |
Line 8551 int sqlite3session_create(
|
Line 8698 int sqlite3session_create(
|
** are attached is closed. Refer to the documentation for |
** are attached is closed. Refer to the documentation for |
** [sqlite3session_create()] for details. |
** [sqlite3session_create()] for details. |
*/ |
*/ |
void sqlite3session_delete(sqlite3_session *pSession); | SQLITE_API void sqlite3session_delete(sqlite3_session *pSession); |
|
|
|
|
/* |
/* |
Line 8571 void sqlite3session_delete(sqlite3_session *pSession);
|
Line 8718 void sqlite3session_delete(sqlite3_session *pSession);
|
** The return value indicates the final state of the session object: 0 if |
** The return value indicates the final state of the session object: 0 if |
** the session is disabled, or 1 if it is enabled. |
** the session is disabled, or 1 if it is enabled. |
*/ |
*/ |
int sqlite3session_enable(sqlite3_session *pSession, int bEnable); | SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable); |
|
|
/* |
/* |
** CAPI3REF: Set Or Clear the Indirect Change Flag |
** CAPI3REF: Set Or Clear the Indirect Change Flag |
Line 8600 int sqlite3session_enable(sqlite3_session *pSession, i
|
Line 8747 int sqlite3session_enable(sqlite3_session *pSession, i
|
** The return value indicates the final state of the indirect flag: 0 if |
** The return value indicates the final state of the indirect flag: 0 if |
** it is clear, or 1 if it is set. |
** it is clear, or 1 if it is set. |
*/ |
*/ |
int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect); | SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect); |
|
|
/* |
/* |
** CAPI3REF: Attach A Table To A Session Object |
** CAPI3REF: Attach A Table To A Session Object |
Line 8630 int sqlite3session_indirect(sqlite3_session *pSession,
|
Line 8777 int sqlite3session_indirect(sqlite3_session *pSession,
|
** SQLITE_OK is returned if the call completes without error. Or, if an error |
** SQLITE_OK is returned if the call completes without error. Or, if an error |
** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. |
** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. |
*/ |
*/ |
int sqlite3session_attach( | SQLITE_API int sqlite3session_attach( |
sqlite3_session *pSession, /* Session object */ |
sqlite3_session *pSession, /* Session object */ |
const char *zTab /* Table name */ |
const char *zTab /* Table name */ |
); |
); |
Line 8639 int sqlite3session_attach(
|
Line 8786 int sqlite3session_attach(
|
** CAPI3REF: Set a table filter on a Session Object. |
** CAPI3REF: Set a table filter on a Session Object. |
** |
** |
** The second argument (xFilter) is the "filter callback". For changes to rows |
** The second argument (xFilter) is the "filter callback". For changes to rows |
** in tables that are not attached to the Session oject, the filter is called | ** in tables that are not attached to the Session object, the filter is called |
** to determine whether changes to the table's rows should be tracked or not. |
** to determine whether changes to the table's rows should be tracked or not. |
** If xFilter returns 0, changes is not tracked. Note that once a table is |
** If xFilter returns 0, changes is not tracked. Note that once a table is |
** attached, xFilter will not be called again. |
** attached, xFilter will not be called again. |
*/ |
*/ |
void sqlite3session_table_filter( | SQLITE_API void sqlite3session_table_filter( |
sqlite3_session *pSession, /* Session object */ |
sqlite3_session *pSession, /* Session object */ |
int(*xFilter)( |
int(*xFilter)( |
void *pCtx, /* Copy of third arg to _filter_table() */ |
void *pCtx, /* Copy of third arg to _filter_table() */ |
Line 8757 void sqlite3session_table_filter(
|
Line 8904 void sqlite3session_table_filter(
|
** another field of the same row is updated while the session is enabled, the |
** another field of the same row is updated while the session is enabled, the |
** resulting changeset will contain an UPDATE change that updates both fields. |
** resulting changeset will contain an UPDATE change that updates both fields. |
*/ |
*/ |
int sqlite3session_changeset( | SQLITE_API int sqlite3session_changeset( |
sqlite3_session *pSession, /* Session object */ |
sqlite3_session *pSession, /* Session object */ |
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */ |
void **ppChangeset /* OUT: Buffer containing changeset */ |
void **ppChangeset /* OUT: Buffer containing changeset */ |
Line 8801 int sqlite3session_changeset(
|
Line 8948 int sqlite3session_changeset(
|
** the from-table, a DELETE record is added to the session object. |
** the from-table, a DELETE record is added to the session object. |
** |
** |
** <li> For each row (primary key) that exists in both tables, but features |
** <li> For each row (primary key) that exists in both tables, but features |
** different in each, an UPDATE record is added to the session. | ** different non-PK values in each, an UPDATE record is added to the |
| ** session. |
** </ul> |
** </ul> |
** |
** |
** To clarify, if this function is called and then a changeset constructed |
** To clarify, if this function is called and then a changeset constructed |
Line 8818 int sqlite3session_changeset(
|
Line 8966 int sqlite3session_changeset(
|
** message. It is the responsibility of the caller to free this buffer using |
** message. It is the responsibility of the caller to free this buffer using |
** sqlite3_free(). |
** sqlite3_free(). |
*/ |
*/ |
int sqlite3session_diff( | SQLITE_API int sqlite3session_diff( |
sqlite3_session *pSession, |
sqlite3_session *pSession, |
const char *zFromDb, |
const char *zFromDb, |
const char *zTbl, |
const char *zTbl, |
Line 8854 int sqlite3session_diff(
|
Line 9002 int sqlite3session_diff(
|
** a single table are grouped together, tables appear in the order in which |
** a single table are grouped together, tables appear in the order in which |
** they were attached to the session object). |
** they were attached to the session object). |
*/ |
*/ |
int sqlite3session_patchset( | SQLITE_API int sqlite3session_patchset( |
sqlite3_session *pSession, /* Session object */ |
sqlite3_session *pSession, /* Session object */ |
int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */ |
void **ppPatchset /* OUT: Buffer containing changeset */ |
void **ppPatchset /* OUT: Buffer containing changeset */ |
Line 8875 int sqlite3session_patchset(
|
Line 9023 int sqlite3session_patchset(
|
** guaranteed that a call to sqlite3session_changeset() will return a |
** guaranteed that a call to sqlite3session_changeset() will return a |
** changeset containing zero changes. |
** changeset containing zero changes. |
*/ |
*/ |
int sqlite3session_isempty(sqlite3_session *pSession); | SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession); |
|
|
/* |
/* |
** CAPI3REF: Create An Iterator To Traverse A Changeset |
** CAPI3REF: Create An Iterator To Traverse A Changeset |
Line 8905 int sqlite3session_isempty(sqlite3_session *pSession);
|
Line 9053 int sqlite3session_isempty(sqlite3_session *pSession);
|
** [sqlite3changeset_invert()] functions, all changes within the changeset |
** [sqlite3changeset_invert()] functions, all changes within the changeset |
** that apply to a single table are grouped together. This means that when |
** that apply to a single table are grouped together. This means that when |
** an application iterates through a changeset using an iterator created by |
** an application iterates through a changeset using an iterator created by |
** this function, all changes that relate to a single table are visted | ** this function, all changes that relate to a single table are visited |
** consecutively. There is no chance that the iterator will visit a change |
** consecutively. There is no chance that the iterator will visit a change |
** the applies to table X, then one for table Y, and then later on visit |
** the applies to table X, then one for table Y, and then later on visit |
** another change for table X. |
** another change for table X. |
*/ |
*/ |
int sqlite3changeset_start( | SQLITE_API int sqlite3changeset_start( |
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */ |
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */ |
int nChangeset, /* Size of changeset blob in bytes */ |
int nChangeset, /* Size of changeset blob in bytes */ |
void *pChangeset /* Pointer to blob containing changeset */ |
void *pChangeset /* Pointer to blob containing changeset */ |
Line 8939 int sqlite3changeset_start(
|
Line 9087 int sqlite3changeset_start(
|
** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or |
** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or |
** SQLITE_NOMEM. |
** SQLITE_NOMEM. |
*/ |
*/ |
int sqlite3changeset_next(sqlite3_changeset_iter *pIter); | SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter); |
|
|
/* |
/* |
** CAPI3REF: Obtain The Current Operation From A Changeset Iterator |
** CAPI3REF: Obtain The Current Operation From A Changeset Iterator |
Line 8967 int sqlite3changeset_next(sqlite3_changeset_iter *pIte
|
Line 9115 int sqlite3changeset_next(sqlite3_changeset_iter *pIte
|
** SQLite error code is returned. The values of the output variables may not |
** SQLite error code is returned. The values of the output variables may not |
** be trusted in this case. |
** be trusted in this case. |
*/ |
*/ |
int sqlite3changeset_op( | SQLITE_API int sqlite3changeset_op( |
sqlite3_changeset_iter *pIter, /* Iterator object */ |
sqlite3_changeset_iter *pIter, /* Iterator object */ |
const char **pzTab, /* OUT: Pointer to table name */ |
const char **pzTab, /* OUT: Pointer to table name */ |
int *pnCol, /* OUT: Number of columns in table */ |
int *pnCol, /* OUT: Number of columns in table */ |
Line 8992 int sqlite3changeset_op(
|
Line 9140 int sqlite3changeset_op(
|
** 0x01 if the corresponding column is part of the tables primary key, or |
** 0x01 if the corresponding column is part of the tables primary key, or |
** 0x00 if it is not. |
** 0x00 if it is not. |
** |
** |
** If argumet pnCol is not NULL, then *pnCol is set to the number of columns | ** If argument pnCol is not NULL, then *pnCol is set to the number of columns |
** in the table. |
** in the table. |
** |
** |
** If this function is called when the iterator does not point to a valid |
** If this function is called when the iterator does not point to a valid |
Line 9000 int sqlite3changeset_op(
|
Line 9148 int sqlite3changeset_op(
|
** SQLITE_OK is returned and the output variables populated as described |
** SQLITE_OK is returned and the output variables populated as described |
** above. |
** above. |
*/ |
*/ |
int sqlite3changeset_pk( | SQLITE_API int sqlite3changeset_pk( |
sqlite3_changeset_iter *pIter, /* Iterator object */ |
sqlite3_changeset_iter *pIter, /* Iterator object */ |
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */ |
int *pnCol /* OUT: Number of entries in output array */ |
int *pnCol /* OUT: Number of entries in output array */ |
Line 9030 int sqlite3changeset_pk(
|
Line 9178 int sqlite3changeset_pk(
|
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** is returned and *ppValue is set to NULL. |
** is returned and *ppValue is set to NULL. |
*/ |
*/ |
int sqlite3changeset_old( | SQLITE_API int sqlite3changeset_old( |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
int iVal, /* Column number */ |
int iVal, /* Column number */ |
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */ |
Line 9063 int sqlite3changeset_old(
|
Line 9211 int sqlite3changeset_old(
|
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** is returned and *ppValue is set to NULL. |
** is returned and *ppValue is set to NULL. |
*/ |
*/ |
int sqlite3changeset_new( | SQLITE_API int sqlite3changeset_new( |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
int iVal, /* Column number */ |
int iVal, /* Column number */ |
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */ |
Line 9090 int sqlite3changeset_new(
|
Line 9238 int sqlite3changeset_new(
|
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** If some other error occurs (e.g. an OOM condition), an SQLite error code |
** is returned and *ppValue is set to NULL. |
** is returned and *ppValue is set to NULL. |
*/ |
*/ |
int sqlite3changeset_conflict( | SQLITE_API int sqlite3changeset_conflict( |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
int iVal, /* Column number */ |
int iVal, /* Column number */ |
sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
sqlite3_value **ppValue /* OUT: Value from conflicting row */ |
Line 9106 int sqlite3changeset_conflict(
|
Line 9254 int sqlite3changeset_conflict(
|
** |
** |
** In all other cases this function returns SQLITE_MISUSE. |
** In all other cases this function returns SQLITE_MISUSE. |
*/ |
*/ |
int sqlite3changeset_fk_conflicts( | SQLITE_API int sqlite3changeset_fk_conflicts( |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
sqlite3_changeset_iter *pIter, /* Changeset iterator */ |
int *pnOut /* OUT: Number of FK violations */ |
int *pnOut /* OUT: Number of FK violations */ |
); |
); |
Line 9139 int sqlite3changeset_fk_conflicts(
|
Line 9287 int sqlite3changeset_fk_conflicts(
|
** // An error has occurred |
** // An error has occurred |
** } |
** } |
*/ |
*/ |
int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter); | SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter); |
|
|
/* |
/* |
** CAPI3REF: Invert A Changeset |
** CAPI3REF: Invert A Changeset |
Line 9169 int sqlite3changeset_finalize(sqlite3_changeset_iter *
|
Line 9317 int sqlite3changeset_finalize(sqlite3_changeset_iter *
|
** WARNING/TODO: This function currently assumes that the input is a valid |
** WARNING/TODO: This function currently assumes that the input is a valid |
** changeset. If it is not, the results are undefined. |
** changeset. If it is not, the results are undefined. |
*/ |
*/ |
int sqlite3changeset_invert( | SQLITE_API int sqlite3changeset_invert( |
int nIn, const void *pIn, /* Input changeset */ |
int nIn, const void *pIn, /* Input changeset */ |
int *pnOut, void **ppOut /* OUT: Inverse of input */ |
int *pnOut, void **ppOut /* OUT: Inverse of input */ |
); |
); |
Line 9198 int sqlite3changeset_invert(
|
Line 9346 int sqlite3changeset_invert(
|
** |
** |
** Refer to the sqlite3_changegroup documentation below for details. |
** Refer to the sqlite3_changegroup documentation below for details. |
*/ |
*/ |
int sqlite3changeset_concat( | SQLITE_API int sqlite3changeset_concat( |
int nA, /* Number of bytes in buffer pA */ |
int nA, /* Number of bytes in buffer pA */ |
void *pA, /* Pointer to buffer containing changeset A */ |
void *pA, /* Pointer to buffer containing changeset A */ |
int nB, /* Number of bytes in buffer pB */ |
int nB, /* Number of bytes in buffer pB */ |
Line 9209 int sqlite3changeset_concat(
|
Line 9357 int sqlite3changeset_concat(
|
|
|
|
|
/* |
/* |
** Changegroup handle. | ** CAPI3REF: Changegroup Handle |
*/ |
*/ |
typedef struct sqlite3_changegroup sqlite3_changegroup; |
typedef struct sqlite3_changegroup sqlite3_changegroup; |
|
|
/* |
/* |
** CAPI3REF: Combine two or more changesets into a single changeset. | ** CAPI3REF: Create A New Changegroup Object |
** |
** |
** An sqlite3_changegroup object is used to combine two or more changesets |
** An sqlite3_changegroup object is used to combine two or more changesets |
** (or patchsets) into a single changeset (or patchset). A single changegroup |
** (or patchsets) into a single changeset (or patchset). A single changegroup |
Line 9248 typedef struct sqlite3_changegroup sqlite3_changegroup
|
Line 9396 typedef struct sqlite3_changegroup sqlite3_changegroup
|
** sqlite3changegroup_output() functions, also available are the streaming |
** sqlite3changegroup_output() functions, also available are the streaming |
** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm(). |
** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm(). |
*/ |
*/ |
int sqlite3changegroup_new(sqlite3_changegroup **pp); | SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp); |
|
|
/* |
/* |
|
** CAPI3REF: Add A Changeset To A Changegroup |
|
** |
** Add all changes within the changeset (or patchset) in buffer pData (size |
** Add all changes within the changeset (or patchset) in buffer pData (size |
** nData bytes) to the changegroup. |
** nData bytes) to the changegroup. |
** |
** |
Line 9265 int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
Line 9415 int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
** apply to the same row as a change already present in the changegroup if |
** apply to the same row as a change already present in the changegroup if |
** the two rows have the same primary key. |
** the two rows have the same primary key. |
** |
** |
** Changes to rows that that do not already appear in the changegroup are | ** Changes to rows that do not already appear in the changegroup are |
** simply copied into it. Or, if both the new changeset and the changegroup |
** simply copied into it. Or, if both the new changeset and the changegroup |
** contain changes that apply to a single row, the final contents of the |
** contain changes that apply to a single row, the final contents of the |
** changegroup depends on the type of each change, as follows: |
** changegroup depends on the type of each change, as follows: |
Line 9323 int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
Line 9473 int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
** |
** |
** If no error occurs, SQLITE_OK is returned. |
** If no error occurs, SQLITE_OK is returned. |
*/ |
*/ |
int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData); | SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData); |
|
|
/* |
/* |
|
** CAPI3REF: Obtain A Composite Changeset From A Changegroup |
|
** |
** Obtain a buffer containing a changeset (or patchset) representing the |
** Obtain a buffer containing a changeset (or patchset) representing the |
** current contents of the changegroup. If the inputs to the changegroup |
** current contents of the changegroup. If the inputs to the changegroup |
** were themselves changesets, the output is a changeset. Or, if the |
** were themselves changesets, the output is a changeset. Or, if the |
Line 9347 int sqlite3changegroup_add(sqlite3_changegroup*, int n
|
Line 9499 int sqlite3changegroup_add(sqlite3_changegroup*, int n
|
** responsibility of the caller to eventually free the buffer using a |
** responsibility of the caller to eventually free the buffer using a |
** call to sqlite3_free(). |
** call to sqlite3_free(). |
*/ |
*/ |
int sqlite3changegroup_output( | SQLITE_API int sqlite3changegroup_output( |
sqlite3_changegroup*, |
sqlite3_changegroup*, |
int *pnData, /* OUT: Size of output buffer in bytes */ |
int *pnData, /* OUT: Size of output buffer in bytes */ |
void **ppData /* OUT: Pointer to output buffer */ |
void **ppData /* OUT: Pointer to output buffer */ |
); |
); |
|
|
/* |
/* |
** Delete a changegroup object. | ** CAPI3REF: Delete A Changegroup Object |
*/ |
*/ |
void sqlite3changegroup_delete(sqlite3_changegroup*); | SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); |
|
|
/* |
/* |
** CAPI3REF: Apply A Changeset To A Database |
** CAPI3REF: Apply A Changeset To A Database |
Line 9382 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
Line 9534 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
** <ul> |
** <ul> |
** <li> The table has the same name as the name recorded in the |
** <li> The table has the same name as the name recorded in the |
** changeset, and |
** changeset, and |
** <li> The table has the same number of columns as recorded in the | ** <li> The table has at least as many columns as recorded in the |
** changeset, and |
** changeset, and |
** <li> The table has primary key columns in the same position as |
** <li> The table has primary key columns in the same position as |
** recorded in the changeset. |
** recorded in the changeset. |
Line 9427 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
Line 9579 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
** If a row with matching primary key values is found, but one or more of |
** If a row with matching primary key values is found, but one or more of |
** the non-primary key fields contains a value different from the original |
** the non-primary key fields contains a value different from the original |
** row value stored in the changeset, the conflict-handler function is |
** row value stored in the changeset, the conflict-handler function is |
** invoked with [SQLITE_CHANGESET_DATA] as the second argument. | ** invoked with [SQLITE_CHANGESET_DATA] as the second argument. If the |
| ** database table has more columns than are recorded in the changeset, |
| ** only the values of those non-primary key fields are compared against |
| ** the current database contents - any trailing database table columns |
| ** are ignored. |
** |
** |
** If no row with matching primary key values is found in the database, |
** If no row with matching primary key values is found in the database, |
** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] |
** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] |
Line 9442 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
Line 9598 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
** |
** |
** <dt>INSERT Changes<dd> |
** <dt>INSERT Changes<dd> |
** For each INSERT change, an attempt is made to insert the new row into |
** For each INSERT change, an attempt is made to insert the new row into |
** the database. | ** the database. If the changeset row contains fewer fields than the |
| ** database table, the trailing fields are populated with their default |
| ** values. |
** |
** |
** If the attempt to insert the row fails because the database already |
** If the attempt to insert the row fails because the database already |
** contains a row with the same primary key values, the conflict handler |
** contains a row with the same primary key values, the conflict handler |
Line 9460 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
Line 9618 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
** For each UPDATE change, this function checks if the target database |
** For each UPDATE change, this function checks if the target database |
** contains a row with the same primary key value (or values) as the |
** contains a row with the same primary key value (or values) as the |
** original row values stored in the changeset. If it does, and the values |
** original row values stored in the changeset. If it does, and the values |
** stored in all non-primary key columns also match the values stored in | ** stored in all modified non-primary key columns also match the values |
** the changeset the row is updated within the target database. | ** stored in the changeset the row is updated within the target database. |
** |
** |
** If a row with matching primary key values is found, but one or more of |
** If a row with matching primary key values is found, but one or more of |
** the non-primary key fields contains a value different from an original | ** the modified non-primary key fields contains a value different from an |
** row value stored in the changeset, the conflict-handler function is | ** original row value stored in the changeset, the conflict-handler function |
** invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since | ** is invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since |
** UPDATE changes only contain values for non-primary key fields that are |
** UPDATE changes only contain values for non-primary key fields that are |
** to be modified, only those fields need to match the original values to |
** to be modified, only those fields need to match the original values to |
** avoid the SQLITE_CHANGESET_DATA conflict-handler callback. |
** avoid the SQLITE_CHANGESET_DATA conflict-handler callback. |
Line 9494 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
Line 9652 void sqlite3changegroup_delete(sqlite3_changegroup*);
|
** rolled back, restoring the target database to its original state, and an |
** rolled back, restoring the target database to its original state, and an |
** SQLite error code returned. |
** SQLite error code returned. |
*/ |
*/ |
int sqlite3changeset_apply( | SQLITE_API int sqlite3changeset_apply( |
sqlite3 *db, /* Apply change to "main" db of this handle */ |
sqlite3 *db, /* Apply change to "main" db of this handle */ |
int nChangeset, /* Size of changeset in bytes */ |
int nChangeset, /* Size of changeset in bytes */ |
void *pChangeset, /* Changeset blob */ |
void *pChangeset, /* Changeset blob */ |
Line 9695 int sqlite3changeset_apply(
|
Line 9853 int sqlite3changeset_apply(
|
** parameter set to a value less than or equal to zero. Other than this, |
** parameter set to a value less than or equal to zero. Other than this, |
** no guarantees are made as to the size of the chunks of data returned. |
** no guarantees are made as to the size of the chunks of data returned. |
*/ |
*/ |
int sqlite3changeset_apply_strm( | SQLITE_API int sqlite3changeset_apply_strm( |
sqlite3 *db, /* Apply change to "main" db of this handle */ |
sqlite3 *db, /* Apply change to "main" db of this handle */ |
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */ |
void *pIn, /* First arg for xInput */ |
void *pIn, /* First arg for xInput */ |
Line 9710 int sqlite3changeset_apply_strm(
|
Line 9868 int sqlite3changeset_apply_strm(
|
), |
), |
void *pCtx /* First argument passed to xConflict */ |
void *pCtx /* First argument passed to xConflict */ |
); |
); |
int sqlite3changeset_concat_strm( | SQLITE_API int sqlite3changeset_concat_strm( |
int (*xInputA)(void *pIn, void *pData, int *pnData), |
int (*xInputA)(void *pIn, void *pData, int *pnData), |
void *pInA, |
void *pInA, |
int (*xInputB)(void *pIn, void *pData, int *pnData), |
int (*xInputB)(void *pIn, void *pData, int *pnData), |
Line 9718 int sqlite3changeset_concat_strm(
|
Line 9876 int sqlite3changeset_concat_strm(
|
int (*xOutput)(void *pOut, const void *pData, int nData), |
int (*xOutput)(void *pOut, const void *pData, int nData), |
void *pOut |
void *pOut |
); |
); |
int sqlite3changeset_invert_strm( | SQLITE_API int sqlite3changeset_invert_strm( |
int (*xInput)(void *pIn, void *pData, int *pnData), |
int (*xInput)(void *pIn, void *pData, int *pnData), |
void *pIn, |
void *pIn, |
int (*xOutput)(void *pOut, const void *pData, int nData), |
int (*xOutput)(void *pOut, const void *pData, int nData), |
void *pOut |
void *pOut |
); |
); |
int sqlite3changeset_start_strm( | SQLITE_API int sqlite3changeset_start_strm( |
sqlite3_changeset_iter **pp, |
sqlite3_changeset_iter **pp, |
int (*xInput)(void *pIn, void *pData, int *pnData), |
int (*xInput)(void *pIn, void *pData, int *pnData), |
void *pIn |
void *pIn |
); |
); |
int sqlite3session_changeset_strm( | SQLITE_API int sqlite3session_changeset_strm( |
sqlite3_session *pSession, |
sqlite3_session *pSession, |
int (*xOutput)(void *pOut, const void *pData, int nData), |
int (*xOutput)(void *pOut, const void *pData, int nData), |
void *pOut |
void *pOut |
); |
); |
int sqlite3session_patchset_strm( | SQLITE_API int sqlite3session_patchset_strm( |
sqlite3_session *pSession, |
sqlite3_session *pSession, |
int (*xOutput)(void *pOut, const void *pData, int nData), |
int (*xOutput)(void *pOut, const void *pData, int nData), |
void *pOut |
void *pOut |
); |
); |
int sqlite3changegroup_add_strm(sqlite3_changegroup*, | SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*, |
int (*xInput)(void *pIn, void *pData, int *pnData), |
int (*xInput)(void *pIn, void *pData, int *pnData), |
void *pIn |
void *pIn |
); |
); |
int sqlite3changegroup_output_strm(sqlite3_changegroup*, | SQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*, |
int (*xOutput)(void *pOut, const void *pData, int nData), |
int (*xOutput)(void *pOut, const void *pData, int nData), |
void *pOut |
void *pOut |
); |
); |