@op-engineering/op-sqlite 14.1.3 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +23 -62
- package/android/build.gradle +104 -164
- package/android/gradle.properties +5 -1
- package/android/jniLibs/arm64-v8a/libsql_experimental.a +0 -0
- package/android/jniLibs/armeabi-v7a/libsql_experimental.a +0 -0
- package/android/jniLibs/x86/libsql_experimental.a +0 -0
- package/android/jniLibs/x86_64/libsql_experimental.a +0 -0
- package/android/src/main/AndroidManifest.xml +2 -1
- package/cpp/DBHostObject.cpp +21 -2
- package/cpp/DBHostObject.h +2 -1
- package/cpp/bindings.cpp +7 -1
- package/cpp/libsql/bridge.cpp +3 -1
- package/cpp/libsql/bridge.h +2 -1
- package/cpp/libsql/libsql.h +1 -0
- package/cpp/sqlcipher/sqlite3.c +3091 -1643
- package/cpp/sqlcipher/sqlite3.h +188 -128
- package/cpp/sqlite3.c +304 -176
- package/cpp/sqlite3.h +89 -87
- package/ios/libsql.xcframework/Info.plist +5 -5
- package/ios/libsql.xcframework/ios-arm64/Headers/libsql.h +1 -0
- package/ios/libsql.xcframework/ios-arm64/libsql_experimental.a +0 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/Headers/libsql.h +1 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/libsql_experimental.a +0 -0
- package/lib/module/Storage.js +9 -2
- package/lib/module/Storage.js.map +1 -1
- package/lib/module/index.js +8 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/Storage.d.ts +4 -0
- package/lib/typescript/src/Storage.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +10 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/op-sqlite.podspec +2 -11
- package/package.json +48 -19
- package/src/Storage.ts +8 -1
- package/src/index.ts +14 -2
- package/android/.project +0 -17
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/src/paper/java/com/op/sqlite/NativeOPSQLiteSpec.java +0 -77
- package/lib/commonjs/NativeOPSQLite.js +0 -9
- package/lib/commonjs/NativeOPSQLite.js.map +0 -1
- package/lib/commonjs/Storage.js +0 -60
- package/lib/commonjs/Storage.js.map +0 -1
- package/lib/commonjs/index.js +0 -387
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
package/cpp/sqlcipher/sqlite3.h
CHANGED
|
@@ -133,7 +133,7 @@ extern "C" {
|
|
|
133
133
|
**
|
|
134
134
|
** Since [version 3.6.18] ([dateof:3.6.18]),
|
|
135
135
|
** SQLite source code has been stored in the
|
|
136
|
-
** <a href="http://
|
|
136
|
+
** <a href="http://fossil-scm.org/">Fossil configuration management
|
|
137
137
|
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
|
|
138
138
|
** a string which identifies a particular check-in of SQLite
|
|
139
139
|
** within its configuration management system. ^The SQLITE_SOURCE_ID
|
|
@@ -146,9 +146,9 @@ extern "C" {
|
|
|
146
146
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
|
147
147
|
** [sqlite_version()] and [sqlite_source_id()].
|
|
148
148
|
*/
|
|
149
|
-
#define SQLITE_VERSION "3.
|
|
150
|
-
#define SQLITE_VERSION_NUMBER
|
|
151
|
-
#define SQLITE_SOURCE_ID "2025-
|
|
149
|
+
#define SQLITE_VERSION "3.50.4"
|
|
150
|
+
#define SQLITE_VERSION_NUMBER 3050004
|
|
151
|
+
#define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45ealt1"
|
|
152
152
|
|
|
153
153
|
/*
|
|
154
154
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -1163,6 +1163,12 @@ struct sqlite3_io_methods {
|
|
|
1163
1163
|
** the value that M is to be set to. Before returning, the 32-bit signed
|
|
1164
1164
|
** integer is overwritten with the previous value of M.
|
|
1165
1165
|
**
|
|
1166
|
+
** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
|
|
1167
|
+
** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
|
|
1168
|
+
** VFS to block when taking a SHARED lock to connect to a wal mode database.
|
|
1169
|
+
** This is used to implement the functionality associated with
|
|
1170
|
+
** SQLITE_SETLK_BLOCK_ON_CONNECT.
|
|
1171
|
+
**
|
|
1166
1172
|
** <li>[[SQLITE_FCNTL_DATA_VERSION]]
|
|
1167
1173
|
** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
|
|
1168
1174
|
** a database file. The argument is a pointer to a 32-bit unsigned integer.
|
|
@@ -1259,6 +1265,7 @@ struct sqlite3_io_methods {
|
|
|
1259
1265
|
#define SQLITE_FCNTL_CKSM_FILE 41
|
|
1260
1266
|
#define SQLITE_FCNTL_RESET_CACHE 42
|
|
1261
1267
|
#define SQLITE_FCNTL_NULL_IO 43
|
|
1268
|
+
#define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
|
|
1262
1269
|
|
|
1263
1270
|
/* deprecated names */
|
|
1264
1271
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
@@ -1989,13 +1996,16 @@ struct sqlite3_mem_methods {
|
|
|
1989
1996
|
**
|
|
1990
1997
|
** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
|
|
1991
1998
|
** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
|
|
1992
|
-
** the default size of lookaside memory on each [database connection].
|
|
1999
|
+
** the default size of [lookaside memory] on each [database connection].
|
|
1993
2000
|
** The first argument is the
|
|
1994
|
-
** size of each lookaside buffer slot and the second is the number of
|
|
1995
|
-
** slots allocated to each database connection.)^
|
|
1996
|
-
** sets the <i>default</i> lookaside size.
|
|
1997
|
-
** option to [sqlite3_db_config()] can
|
|
1998
|
-
** configuration on individual connections.)^
|
|
2001
|
+
** size of each lookaside buffer slot ("sz") and the second is the number of
|
|
2002
|
+
** slots allocated to each database connection ("cnt").)^
|
|
2003
|
+
** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
|
|
2004
|
+
** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
|
|
2005
|
+
** be used to change the lookaside configuration on individual connections.)^
|
|
2006
|
+
** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
|
|
2007
|
+
** default lookaside configuration at compile-time.
|
|
2008
|
+
** </dd>
|
|
1999
2009
|
**
|
|
2000
2010
|
** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
|
|
2001
2011
|
** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
|
|
@@ -2232,31 +2242,50 @@ struct sqlite3_mem_methods {
|
|
|
2232
2242
|
** [[SQLITE_DBCONFIG_LOOKASIDE]]
|
|
2233
2243
|
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
|
|
2234
2244
|
** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
|
|
2235
|
-
** configuration of the lookaside memory allocator within a database
|
|
2245
|
+
** configuration of the [lookaside memory allocator] within a database
|
|
2236
2246
|
** connection.
|
|
2237
2247
|
** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
|
|
2238
2248
|
** in the [DBCONFIG arguments|usual format].
|
|
2239
2249
|
** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
|
|
2240
2250
|
** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
|
|
2241
2251
|
** should have a total of five parameters.
|
|
2242
|
-
**
|
|
2252
|
+
** <ol>
|
|
2253
|
+
** <li><p>The first argument ("buf") is a
|
|
2243
2254
|
** pointer to a memory buffer to use for lookaside memory.
|
|
2244
|
-
**
|
|
2245
|
-
**
|
|
2246
|
-
**
|
|
2247
|
-
** size of each lookaside buffer slot.
|
|
2248
|
-
**
|
|
2249
|
-
**
|
|
2250
|
-
**
|
|
2251
|
-
**
|
|
2252
|
-
**
|
|
2255
|
+
** The first argument may be NULL in which case SQLite will allocate the
|
|
2256
|
+
** lookaside buffer itself using [sqlite3_malloc()].
|
|
2257
|
+
** <li><P>The second argument ("sz") is the
|
|
2258
|
+
** size of each lookaside buffer slot. Lookaside is disabled if "sz"
|
|
2259
|
+
** is less than 8. The "sz" argument should be a multiple of 8 less than
|
|
2260
|
+
** 65536. If "sz" does not meet this constraint, it is reduced in size until
|
|
2261
|
+
** it does.
|
|
2262
|
+
** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
|
|
2263
|
+
** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
|
|
2264
|
+
** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
|
|
2265
|
+
** parameter is usually chosen so that the product of "sz" and "cnt" is less
|
|
2266
|
+
** than 1,000,000.
|
|
2267
|
+
** </ol>
|
|
2268
|
+
** <p>If the "buf" argument is not NULL, then it must
|
|
2269
|
+
** point to a memory buffer with a size that is greater than
|
|
2270
|
+
** or equal to the product of "sz" and "cnt".
|
|
2271
|
+
** The buffer must be aligned to an 8-byte boundary.
|
|
2272
|
+
** The lookaside memory
|
|
2253
2273
|
** configuration for a database connection can only be changed when that
|
|
2254
2274
|
** connection is not currently using lookaside memory, or in other words
|
|
2255
|
-
** when the
|
|
2256
|
-
** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
|
|
2275
|
+
** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
|
|
2257
2276
|
** Any attempt to change the lookaside memory configuration when lookaside
|
|
2258
2277
|
** memory is in use leaves the configuration unchanged and returns
|
|
2259
|
-
** [SQLITE_BUSY].
|
|
2278
|
+
** [SQLITE_BUSY].
|
|
2279
|
+
** If the "buf" argument is NULL and an attempt
|
|
2280
|
+
** to allocate memory based on "sz" and "cnt" fails, then
|
|
2281
|
+
** lookaside is silently disabled.
|
|
2282
|
+
** <p>
|
|
2283
|
+
** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
|
|
2284
|
+
** default lookaside configuration at initialization. The
|
|
2285
|
+
** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
|
|
2286
|
+
** configuration at compile-time. Typical values for lookaside are 1200 for
|
|
2287
|
+
** "sz" and 40 to 100 for "cnt".
|
|
2288
|
+
** </dd>
|
|
2260
2289
|
**
|
|
2261
2290
|
** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
|
|
2262
2291
|
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
|
|
@@ -2993,6 +3022,44 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
|
|
|
2993
3022
|
*/
|
|
2994
3023
|
SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
|
|
2995
3024
|
|
|
3025
|
+
/*
|
|
3026
|
+
** CAPI3REF: Set the Setlk Timeout
|
|
3027
|
+
** METHOD: sqlite3
|
|
3028
|
+
**
|
|
3029
|
+
** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
|
|
3030
|
+
** the VFS supports blocking locks, it sets the timeout in ms used by
|
|
3031
|
+
** eligible locks taken on wal mode databases by the specified database
|
|
3032
|
+
** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
|
|
3033
|
+
** not support blocking locks, this function is a no-op.
|
|
3034
|
+
**
|
|
3035
|
+
** Passing 0 to this function disables blocking locks altogether. Passing
|
|
3036
|
+
** -1 to this function requests that the VFS blocks for a long time -
|
|
3037
|
+
** indefinitely if possible. The results of passing any other negative value
|
|
3038
|
+
** are undefined.
|
|
3039
|
+
**
|
|
3040
|
+
** Internally, each SQLite database handle store two timeout values - the
|
|
3041
|
+
** busy-timeout (used for rollback mode databases, or if the VFS does not
|
|
3042
|
+
** support blocking locks) and the setlk-timeout (used for blocking locks
|
|
3043
|
+
** on wal-mode databases). The sqlite3_busy_timeout() method sets both
|
|
3044
|
+
** values, this function sets only the setlk-timeout value. Therefore,
|
|
3045
|
+
** to configure separate busy-timeout and setlk-timeout values for a single
|
|
3046
|
+
** database handle, call sqlite3_busy_timeout() followed by this function.
|
|
3047
|
+
**
|
|
3048
|
+
** Whenever the number of connections to a wal mode database falls from
|
|
3049
|
+
** 1 to 0, the last connection takes an exclusive lock on the database,
|
|
3050
|
+
** then checkpoints and deletes the wal file. While it is doing this, any
|
|
3051
|
+
** new connection that tries to read from the database fails with an
|
|
3052
|
+
** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
|
|
3053
|
+
** passed to this API, the new connection blocks until the exclusive lock
|
|
3054
|
+
** has been released.
|
|
3055
|
+
*/
|
|
3056
|
+
SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
|
|
3057
|
+
|
|
3058
|
+
/*
|
|
3059
|
+
** CAPI3REF: Flags for sqlite3_setlk_timeout()
|
|
3060
|
+
*/
|
|
3061
|
+
#define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
|
|
3062
|
+
|
|
2996
3063
|
/*
|
|
2997
3064
|
** CAPI3REF: Convenience Routines For Running Queries
|
|
2998
3065
|
** METHOD: sqlite3
|
|
@@ -4012,7 +4079,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
|
|
|
4012
4079
|
**
|
|
4013
4080
|
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
|
|
4014
4081
|
** database filename D with corresponding journal file J and WAL file W and
|
|
4015
|
-
**
|
|
4082
|
+
** an array P of N URI Key/Value pairs. The result from
|
|
4016
4083
|
** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
|
|
4017
4084
|
** is safe to pass to routines like:
|
|
4018
4085
|
** <ul>
|
|
@@ -4693,7 +4760,7 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4693
4760
|
** METHOD: sqlite3_stmt
|
|
4694
4761
|
**
|
|
4695
4762
|
** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
|
|
4696
|
-
** literals may be replaced by a [parameter] that matches one of following
|
|
4763
|
+
** literals may be replaced by a [parameter] that matches one of the following
|
|
4697
4764
|
** templates:
|
|
4698
4765
|
**
|
|
4699
4766
|
** <ul>
|
|
@@ -4738,7 +4805,7 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4738
4805
|
**
|
|
4739
4806
|
** [[byte-order determination rules]] ^The byte-order of
|
|
4740
4807
|
** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
|
|
4741
|
-
** found in first character, which is removed, or in the absence of a BOM
|
|
4808
|
+
** found in the first character, which is removed, or in the absence of a BOM
|
|
4742
4809
|
** the byte order is the native byte order of the host
|
|
4743
4810
|
** machine for sqlite3_bind_text16() or the byte order specified in
|
|
4744
4811
|
** the 6th parameter for sqlite3_bind_text64().)^
|
|
@@ -4758,7 +4825,7 @@ typedef struct sqlite3_context sqlite3_context;
|
|
|
4758
4825
|
** or sqlite3_bind_text16() or sqlite3_bind_text64() then
|
|
4759
4826
|
** that parameter must be the byte offset
|
|
4760
4827
|
** where the NUL terminator would occur assuming the string were NUL
|
|
4761
|
-
** terminated. If any NUL characters
|
|
4828
|
+
** terminated. If any NUL characters occur at byte offsets less than
|
|
4762
4829
|
** the value of the fourth parameter then the resulting string value will
|
|
4763
4830
|
** contain embedded NULs. The result of expressions involving strings
|
|
4764
4831
|
** with embedded NULs is undefined.
|
|
@@ -4970,7 +5037,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
|
|
|
4970
5037
|
** METHOD: sqlite3_stmt
|
|
4971
5038
|
**
|
|
4972
5039
|
** ^These routines provide a means to determine the database, table, and
|
|
4973
|
-
** table column that is the origin of a particular result column in
|
|
5040
|
+
** table column that is the origin of a particular result column in a
|
|
4974
5041
|
** [SELECT] statement.
|
|
4975
5042
|
** ^The name of the database or table or column can be returned as
|
|
4976
5043
|
** either a UTF-8 or UTF-16 string. ^The _database_ routines return
|
|
@@ -5108,7 +5175,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
|
|
|
5108
5175
|
** other than [SQLITE_ROW] before any subsequent invocation of
|
|
5109
5176
|
** sqlite3_step(). Failure to reset the prepared statement using
|
|
5110
5177
|
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
|
|
5111
|
-
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
|
|
5178
|
+
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
|
|
5112
5179
|
** sqlite3_step() began
|
|
5113
5180
|
** calling [sqlite3_reset()] automatically in this circumstance rather
|
|
5114
5181
|
** than returning [SQLITE_MISUSE]. This is not considered a compatibility
|
|
@@ -5539,8 +5606,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5539
5606
|
**
|
|
5540
5607
|
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
|
|
5541
5608
|
** all application-defined SQL functions that do not need to be
|
|
5542
|
-
** used inside of triggers,
|
|
5543
|
-
** the database schema. This
|
|
5609
|
+
** used inside of triggers, views, CHECK constraints, or other elements of
|
|
5610
|
+
** the database schema. This flag is especially recommended for SQL
|
|
5544
5611
|
** functions that have side effects or reveal internal application state.
|
|
5545
5612
|
** Without this flag, an attacker might be able to modify the schema of
|
|
5546
5613
|
** a database file to include invocations of the function with parameters
|
|
@@ -5571,7 +5638,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
|
5571
5638
|
** [user-defined window functions|available here].
|
|
5572
5639
|
**
|
|
5573
5640
|
** ^(If the final parameter to sqlite3_create_function_v2() or
|
|
5574
|
-
** sqlite3_create_window_function() is not NULL, then it is destructor for
|
|
5641
|
+
** sqlite3_create_window_function() is not NULL, then it is the destructor for
|
|
5575
5642
|
** the application data pointer. The destructor is invoked when the function
|
|
5576
5643
|
** is deleted, either by being overloaded or when the database connection
|
|
5577
5644
|
** closes.)^ ^The destructor is also invoked if the call to
|
|
@@ -5971,7 +6038,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
|
|
5971
6038
|
** METHOD: sqlite3_value
|
|
5972
6039
|
**
|
|
5973
6040
|
** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
|
|
5974
|
-
** object
|
|
6041
|
+
** object V and returns a pointer to that copy. ^The [sqlite3_value] returned
|
|
5975
6042
|
** is a [protected sqlite3_value] object even if the input is not.
|
|
5976
6043
|
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
|
|
5977
6044
|
** memory allocation fails. ^If V is a [pointer value], then the result
|
|
@@ -6009,7 +6076,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
|
|
|
6009
6076
|
** allocation error occurs.
|
|
6010
6077
|
**
|
|
6011
6078
|
** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
|
|
6012
|
-
** determined by the N parameter on first successful call. Changing the
|
|
6079
|
+
** determined by the N parameter on the first successful call. Changing the
|
|
6013
6080
|
** value of N in any subsequent call to sqlite3_aggregate_context() within
|
|
6014
6081
|
** the same aggregate function instance will not resize the memory
|
|
6015
6082
|
** allocation.)^ Within the xFinal callback, it is customary to set
|
|
@@ -6171,7 +6238,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
|
|
|
6171
6238
|
**
|
|
6172
6239
|
** Security Warning: These interfaces should not be exposed in scripting
|
|
6173
6240
|
** languages or in other circumstances where it might be possible for an
|
|
6174
|
-
**
|
|
6241
|
+
** attacker to invoke them. Any agent that can invoke these interfaces
|
|
6175
6242
|
** can probably also take control of the process.
|
|
6176
6243
|
**
|
|
6177
6244
|
** Database connection client data is only available for SQLite
|
|
@@ -6285,7 +6352,7 @@ typedef void (*sqlite3_destructor_type)(void*);
|
|
|
6285
6352
|
** pointed to by the 2nd parameter are taken as the application-defined
|
|
6286
6353
|
** function result. If the 3rd parameter is non-negative, then it
|
|
6287
6354
|
** must be the byte offset into the string where the NUL terminator would
|
|
6288
|
-
** appear if the string
|
|
6355
|
+
** appear if the string were NUL terminated. If any NUL characters occur
|
|
6289
6356
|
** in the string at a byte offset that is less than the value of the 3rd
|
|
6290
6357
|
** parameter, then the resulting string will contain embedded NULs and the
|
|
6291
6358
|
** result of expressions operating on strings with embedded NULs is undefined.
|
|
@@ -6343,7 +6410,7 @@ typedef void (*sqlite3_destructor_type)(void*);
|
|
|
6343
6410
|
** string and preferably a string literal. The sqlite3_result_pointer()
|
|
6344
6411
|
** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
|
|
6345
6412
|
**
|
|
6346
|
-
** If these routines are called from within
|
|
6413
|
+
** If these routines are called from within a different thread
|
|
6347
6414
|
** than the one containing the application-defined function that received
|
|
6348
6415
|
** the [sqlite3_context] pointer, the results are undefined.
|
|
6349
6416
|
*/
|
|
@@ -6809,7 +6876,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
|
|
6809
6876
|
** METHOD: sqlite3
|
|
6810
6877
|
**
|
|
6811
6878
|
** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
|
|
6812
|
-
** for the N-th database on database connection D, or a NULL pointer
|
|
6879
|
+
** for the N-th database on database connection D, or a NULL pointer if N is
|
|
6813
6880
|
** out of range. An N value of 0 means the main database file. An N of 1 is
|
|
6814
6881
|
** the "temp" schema. Larger values of N correspond to various ATTACH-ed
|
|
6815
6882
|
** databases.
|
|
@@ -6904,7 +6971,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
|
6904
6971
|
** <dd>The SQLITE_TXN_READ state means that the database is currently
|
|
6905
6972
|
** in a read transaction. Content has been read from the database file
|
|
6906
6973
|
** but nothing in the database file has changed. The transaction state
|
|
6907
|
-
** will advanced to SQLITE_TXN_WRITE if any changes occur and there are
|
|
6974
|
+
** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are
|
|
6908
6975
|
** no other conflicting concurrent write transactions. The transaction
|
|
6909
6976
|
** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or
|
|
6910
6977
|
** [COMMIT].</dd>
|
|
@@ -6913,7 +6980,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
|
6913
6980
|
** <dd>The SQLITE_TXN_WRITE state means that the database is currently
|
|
6914
6981
|
** in a write transaction. Content has been written to the database file
|
|
6915
6982
|
** but has not yet committed. The transaction state will change to
|
|
6916
|
-
**
|
|
6983
|
+
** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
|
|
6917
6984
|
*/
|
|
6918
6985
|
#define SQLITE_TXN_NONE 0
|
|
6919
6986
|
#define SQLITE_TXN_READ 1
|
|
@@ -7064,6 +7131,8 @@ SQLITE_API int sqlite3_autovacuum_pages(
|
|
|
7064
7131
|
**
|
|
7065
7132
|
** ^The second argument is a pointer to the function to invoke when a
|
|
7066
7133
|
** row is updated, inserted or deleted in a rowid table.
|
|
7134
|
+
** ^The update hook is disabled by invoking sqlite3_update_hook()
|
|
7135
|
+
** with a NULL pointer as the second parameter.
|
|
7067
7136
|
** ^The first argument to the callback is a copy of the third argument
|
|
7068
7137
|
** to sqlite3_update_hook().
|
|
7069
7138
|
** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
|
|
@@ -7192,7 +7261,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
|
|
7192
7261
|
** CAPI3REF: Impose A Limit On Heap Size
|
|
7193
7262
|
**
|
|
7194
7263
|
** These interfaces impose limits on the amount of heap memory that will be
|
|
7195
|
-
** by all database connections within a single process.
|
|
7264
|
+
** used by all database connections within a single process.
|
|
7196
7265
|
**
|
|
7197
7266
|
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
|
|
7198
7267
|
** soft limit on the amount of heap memory that may be allocated by SQLite.
|
|
@@ -7250,7 +7319,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
|
|
|
7250
7319
|
** </ul>)^
|
|
7251
7320
|
**
|
|
7252
7321
|
** The circumstances under which SQLite will enforce the heap limits may
|
|
7253
|
-
**
|
|
7322
|
+
** change in future releases of SQLite.
|
|
7254
7323
|
*/
|
|
7255
7324
|
SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
|
|
7256
7325
|
SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
|
|
@@ -7365,8 +7434,8 @@ SQLITE_API int sqlite3_table_column_metadata(
|
|
|
7365
7434
|
** ^The entry point is zProc.
|
|
7366
7435
|
** ^(zProc may be 0, in which case SQLite will try to come up with an
|
|
7367
7436
|
** entry point name on its own. It first tries "sqlite3_extension_init".
|
|
7368
|
-
** If that does not work, it constructs a name "sqlite3_X_init" where
|
|
7369
|
-
** X
|
|
7437
|
+
** If that does not work, it constructs a name "sqlite3_X_init" where
|
|
7438
|
+
** X consists of the lower-case equivalent of all ASCII alphabetic
|
|
7370
7439
|
** characters in the filename from the last "/" to the first following
|
|
7371
7440
|
** "." and omitting any initial "lib".)^
|
|
7372
7441
|
** ^The sqlite3_load_extension() interface returns
|
|
@@ -7437,7 +7506,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
|
|
|
7437
7506
|
** ^(Even though the function prototype shows that xEntryPoint() takes
|
|
7438
7507
|
** no arguments and returns void, SQLite invokes xEntryPoint() with three
|
|
7439
7508
|
** arguments and expects an integer result as if the signature of the
|
|
7440
|
-
** entry point
|
|
7509
|
+
** entry point were as follows:
|
|
7441
7510
|
**
|
|
7442
7511
|
** <blockquote><pre>
|
|
7443
7512
|
** int xEntryPoint(
|
|
@@ -7601,7 +7670,7 @@ struct sqlite3_module {
|
|
|
7601
7670
|
** virtual table and might not be checked again by the byte code.)^ ^(The
|
|
7602
7671
|
** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
|
|
7603
7672
|
** is left in its default setting of false, the constraint will always be
|
|
7604
|
-
** checked separately in byte code. If the omit flag is
|
|
7673
|
+
** checked separately in byte code. If the omit flag is changed to true, then
|
|
7605
7674
|
** the constraint may or may not be checked in byte code. In other words,
|
|
7606
7675
|
** when the omit flag is true there is no guarantee that the constraint will
|
|
7607
7676
|
** not be checked again using byte code.)^
|
|
@@ -7627,7 +7696,7 @@ struct sqlite3_module {
|
|
|
7627
7696
|
** The xBestIndex method may optionally populate the idxFlags field with a
|
|
7628
7697
|
** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
|
|
7629
7698
|
** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
|
|
7630
|
-
** output to show the idxNum
|
|
7699
|
+
** output to show the idxNum as hex instead of as decimal. Another flag is
|
|
7631
7700
|
** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
|
|
7632
7701
|
** return at most one row.
|
|
7633
7702
|
**
|
|
@@ -7768,7 +7837,7 @@ struct sqlite3_index_info {
|
|
|
7768
7837
|
** the implementation of the [virtual table module]. ^The fourth
|
|
7769
7838
|
** parameter is an arbitrary client data pointer that is passed through
|
|
7770
7839
|
** into the [xCreate] and [xConnect] methods of the virtual table module
|
|
7771
|
-
** when a new virtual table is
|
|
7840
|
+
** when a new virtual table is being created or reinitialized.
|
|
7772
7841
|
**
|
|
7773
7842
|
** ^The sqlite3_create_module_v2() interface has a fifth parameter which
|
|
7774
7843
|
** is a pointer to a destructor for the pClientData. ^SQLite will
|
|
@@ -7933,7 +8002,7 @@ typedef struct sqlite3_blob sqlite3_blob;
|
|
|
7933
8002
|
** in *ppBlob. Otherwise an [error code] is returned and, unless the error
|
|
7934
8003
|
** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
|
|
7935
8004
|
** the API is not misused, it is always safe to call [sqlite3_blob_close()]
|
|
7936
|
-
** on *ppBlob after this function
|
|
8005
|
+
** on *ppBlob after this function returns.
|
|
7937
8006
|
**
|
|
7938
8007
|
** This function fails with SQLITE_ERROR if any of the following are true:
|
|
7939
8008
|
** <ul>
|
|
@@ -8053,7 +8122,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
|
|
|
8053
8122
|
**
|
|
8054
8123
|
** ^Returns the size in bytes of the BLOB accessible via the
|
|
8055
8124
|
** successfully opened [BLOB handle] in its only argument. ^The
|
|
8056
|
-
** incremental blob I/O routines can only read or
|
|
8125
|
+
** incremental blob I/O routines can only read or overwrite existing
|
|
8057
8126
|
** blob content; they cannot change the size of a blob.
|
|
8058
8127
|
**
|
|
8059
8128
|
** This routine only works on a [BLOB handle] which has been created
|
|
@@ -8203,7 +8272,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
|
8203
8272
|
** ^The sqlite3_mutex_alloc() routine allocates a new
|
|
8204
8273
|
** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
|
|
8205
8274
|
** routine returns NULL if it is unable to allocate the requested
|
|
8206
|
-
** mutex. The argument to sqlite3_mutex_alloc() must one of these
|
|
8275
|
+
** mutex. The argument to sqlite3_mutex_alloc() must be one of these
|
|
8207
8276
|
** integer constants:
|
|
8208
8277
|
**
|
|
8209
8278
|
** <ul>
|
|
@@ -8436,7 +8505,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
|
|
|
8436
8505
|
** CAPI3REF: Retrieve the mutex for a database connection
|
|
8437
8506
|
** METHOD: sqlite3
|
|
8438
8507
|
**
|
|
8439
|
-
** ^This interface returns a pointer the [sqlite3_mutex] object that
|
|
8508
|
+
** ^This interface returns a pointer to the [sqlite3_mutex] object that
|
|
8440
8509
|
** serializes access to the [database connection] given in the argument
|
|
8441
8510
|
** when the [threading mode] is Serialized.
|
|
8442
8511
|
** ^If the [threading mode] is Single-thread or Multi-thread then this
|
|
@@ -8559,7 +8628,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8559
8628
|
** CAPI3REF: SQL Keyword Checking
|
|
8560
8629
|
**
|
|
8561
8630
|
** These routines provide access to the set of SQL language keywords
|
|
8562
|
-
** recognized by SQLite. Applications can
|
|
8631
|
+
** recognized by SQLite. Applications can use these routines to determine
|
|
8563
8632
|
** whether or not a specific identifier needs to be escaped (for example,
|
|
8564
8633
|
** by enclosing in double-quotes) so as not to confuse the parser.
|
|
8565
8634
|
**
|
|
@@ -8727,7 +8796,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
|
|
|
8727
8796
|
** content of the dynamic string under construction in X. The value
|
|
8728
8797
|
** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
|
|
8729
8798
|
** and might be freed or altered by any subsequent method on the same
|
|
8730
|
-
** [sqlite3_str] object. Applications must not
|
|
8799
|
+
** [sqlite3_str] object. Applications must not use the pointer returned by
|
|
8731
8800
|
** [sqlite3_str_value(X)] after any subsequent method call on the same
|
|
8732
8801
|
** object. ^Applications may change the content of the string returned
|
|
8733
8802
|
** by [sqlite3_str_value(X)] as long as they do not write into any bytes
|
|
@@ -8813,7 +8882,7 @@ SQLITE_API int sqlite3_status64(
|
|
|
8813
8882
|
** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
|
|
8814
8883
|
** buffer and where forced to overflow to [sqlite3_malloc()]. The
|
|
8815
8884
|
** returned value includes allocations that overflowed because they
|
|
8816
|
-
**
|
|
8885
|
+
** were too large (they were larger than the "sz" parameter to
|
|
8817
8886
|
** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
|
|
8818
8887
|
** no space was left in the page cache.</dd>)^
|
|
8819
8888
|
**
|
|
@@ -8897,28 +8966,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8897
8966
|
** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
|
|
8898
8967
|
** <dd>This parameter returns the number of malloc attempts that were
|
|
8899
8968
|
** satisfied using lookaside memory. Only the high-water value is meaningful;
|
|
8900
|
-
** the current value is always zero
|
|
8969
|
+
** the current value is always zero.</dd>)^
|
|
8901
8970
|
**
|
|
8902
8971
|
** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]
|
|
8903
8972
|
** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
|
|
8904
|
-
** <dd>This parameter returns the number malloc attempts that might have
|
|
8973
|
+
** <dd>This parameter returns the number of malloc attempts that might have
|
|
8905
8974
|
** been satisfied using lookaside memory but failed due to the amount of
|
|
8906
8975
|
** memory requested being larger than the lookaside slot size.
|
|
8907
8976
|
** Only the high-water value is meaningful;
|
|
8908
|
-
** the current value is always zero
|
|
8977
|
+
** the current value is always zero.</dd>)^
|
|
8909
8978
|
**
|
|
8910
8979
|
** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]
|
|
8911
8980
|
** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
|
|
8912
|
-
** <dd>This parameter returns the number malloc attempts that might have
|
|
8981
|
+
** <dd>This parameter returns the number of malloc attempts that might have
|
|
8913
8982
|
** been satisfied using lookaside memory but failed due to all lookaside
|
|
8914
8983
|
** memory already being in use.
|
|
8915
8984
|
** Only the high-water value is meaningful;
|
|
8916
|
-
** the current value is always zero
|
|
8985
|
+
** the current value is always zero.</dd>)^
|
|
8917
8986
|
**
|
|
8918
8987
|
** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
|
|
8919
8988
|
** <dd>This parameter returns the approximate number of bytes of heap
|
|
8920
8989
|
** memory used by all pager caches associated with the database connection.)^
|
|
8921
8990
|
** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
|
|
8991
|
+
** </dd>
|
|
8922
8992
|
**
|
|
8923
8993
|
** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
|
|
8924
8994
|
** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
|
|
@@ -8927,10 +8997,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8927
8997
|
** memory used by that pager cache is divided evenly between the attached
|
|
8928
8998
|
** connections.)^ In other words, if none of the pager caches associated
|
|
8929
8999
|
** with the database connection are shared, this request returns the same
|
|
8930
|
-
** value as DBSTATUS_CACHE_USED. Or, if one or more
|
|
9000
|
+
** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are
|
|
8931
9001
|
** shared, the value returned by this call will be smaller than that returned
|
|
8932
9002
|
** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
|
|
8933
|
-
** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0
|
|
9003
|
+
** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>
|
|
8934
9004
|
**
|
|
8935
9005
|
** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
|
|
8936
9006
|
** <dd>This parameter returns the approximate number of bytes of heap
|
|
@@ -8940,6 +9010,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8940
9010
|
** schema memory is shared with other database connections due to
|
|
8941
9011
|
** [shared cache mode] being enabled.
|
|
8942
9012
|
** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
|
|
9013
|
+
** </dd>
|
|
8943
9014
|
**
|
|
8944
9015
|
** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
|
|
8945
9016
|
** <dd>This parameter returns the approximate number of bytes of heap
|
|
@@ -8976,7 +9047,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|
|
8976
9047
|
** been written to disk in the middle of a transaction due to the page
|
|
8977
9048
|
** cache overflowing. Transactions are more efficient if they are written
|
|
8978
9049
|
** to disk all at once. When pages spill mid-transaction, that introduces
|
|
8979
|
-
** additional overhead. This parameter can be used help identify
|
|
9050
|
+
** additional overhead. This parameter can be used to help identify
|
|
8980
9051
|
** inefficiencies that can be resolved by increasing the cache size.
|
|
8981
9052
|
** </dd>
|
|
8982
9053
|
**
|
|
@@ -9047,13 +9118,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9047
9118
|
** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
|
|
9048
9119
|
** <dd>^This is the number of sort operations that have occurred.
|
|
9049
9120
|
** A non-zero value in this counter may indicate an opportunity to
|
|
9050
|
-
**
|
|
9121
|
+
** improve performance through careful use of indices.</dd>
|
|
9051
9122
|
**
|
|
9052
9123
|
** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
|
|
9053
9124
|
** <dd>^This is the number of rows inserted into transient indices that
|
|
9054
9125
|
** were created automatically in order to help joins run faster.
|
|
9055
9126
|
** A non-zero value in this counter may indicate an opportunity to
|
|
9056
|
-
**
|
|
9127
|
+
** improve performance by adding permanent indices that do not
|
|
9057
9128
|
** need to be reinitialized each time the statement is run.</dd>
|
|
9058
9129
|
**
|
|
9059
9130
|
** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
|
|
@@ -9062,19 +9133,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9062
9133
|
** to 2147483647. The number of virtual machine operations can be
|
|
9063
9134
|
** used as a proxy for the total work done by the prepared statement.
|
|
9064
9135
|
** If the number of virtual machine operations exceeds 2147483647
|
|
9065
|
-
** then the value returned by this statement status code is undefined
|
|
9136
|
+
** then the value returned by this statement status code is undefined.</dd>
|
|
9066
9137
|
**
|
|
9067
9138
|
** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
|
|
9068
9139
|
** <dd>^This is the number of times that the prepare statement has been
|
|
9069
9140
|
** automatically regenerated due to schema changes or changes to
|
|
9070
|
-
** [bound parameters] that might affect the query plan
|
|
9141
|
+
** [bound parameters] that might affect the query plan.</dd>
|
|
9071
9142
|
**
|
|
9072
9143
|
** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
|
|
9073
9144
|
** <dd>^This is the number of times that the prepared statement has
|
|
9074
9145
|
** been run. A single "run" for the purposes of this counter is one
|
|
9075
9146
|
** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
|
|
9076
9147
|
** The counter is incremented on the first [sqlite3_step()] call of each
|
|
9077
|
-
** cycle
|
|
9148
|
+
** cycle.</dd>
|
|
9078
9149
|
**
|
|
9079
9150
|
** [[SQLITE_STMTSTATUS_FILTER_MISS]]
|
|
9080
9151
|
** [[SQLITE_STMTSTATUS_FILTER HIT]]
|
|
@@ -9084,7 +9155,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
|
|
|
9084
9155
|
** step was bypassed because a Bloom filter returned not-found. The
|
|
9085
9156
|
** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
|
|
9086
9157
|
** times that the Bloom filter returned a find, and thus the join step
|
|
9087
|
-
** had to be processed as normal
|
|
9158
|
+
** had to be processed as normal.</dd>
|
|
9088
9159
|
**
|
|
9089
9160
|
** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
|
|
9090
9161
|
** <dd>^This is the approximate number of bytes of heap memory
|
|
@@ -9189,9 +9260,9 @@ struct sqlite3_pcache_page {
|
|
|
9189
9260
|
** SQLite will typically create one cache instance for each open database file,
|
|
9190
9261
|
** though this is not guaranteed. ^The
|
|
9191
9262
|
** first parameter, szPage, is the size in bytes of the pages that must
|
|
9192
|
-
** be allocated by the cache. ^szPage will always a power of two. ^The
|
|
9263
|
+
** be allocated by the cache. ^szPage will always be a power of two. ^The
|
|
9193
9264
|
** second parameter szExtra is a number of bytes of extra storage
|
|
9194
|
-
** associated with each page cache entry. ^The szExtra parameter will
|
|
9265
|
+
** associated with each page cache entry. ^The szExtra parameter will be
|
|
9195
9266
|
** a number less than 250. SQLite will use the
|
|
9196
9267
|
** extra szExtra bytes on each page to store metadata about the underlying
|
|
9197
9268
|
** database page on disk. The value passed into szExtra depends
|
|
@@ -9199,17 +9270,17 @@ struct sqlite3_pcache_page {
|
|
|
9199
9270
|
** ^The third argument to xCreate(), bPurgeable, is true if the cache being
|
|
9200
9271
|
** created will be used to cache database pages of a file stored on disk, or
|
|
9201
9272
|
** false if it is used for an in-memory database. The cache implementation
|
|
9202
|
-
** does not have to do anything special based
|
|
9273
|
+
** does not have to do anything special based upon the value of bPurgeable;
|
|
9203
9274
|
** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
|
|
9204
9275
|
** never invoke xUnpin() except to deliberately delete a page.
|
|
9205
9276
|
** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
|
|
9206
9277
|
** false will always have the "discard" flag set to true.
|
|
9207
|
-
** ^Hence, a cache created with bPurgeable false will
|
|
9278
|
+
** ^Hence, a cache created with bPurgeable set to false will
|
|
9208
9279
|
** never contain any unpinned pages.
|
|
9209
9280
|
**
|
|
9210
9281
|
** [[the xCachesize() page cache method]]
|
|
9211
9282
|
** ^(The xCachesize() method may be called at any time by SQLite to set the
|
|
9212
|
-
** suggested maximum cache-size (number of pages stored
|
|
9283
|
+
** suggested maximum cache-size (number of pages stored) for the cache
|
|
9213
9284
|
** instance passed as the first argument. This is the value configured using
|
|
9214
9285
|
** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
|
|
9215
9286
|
** parameter, the implementation is not required to do anything with this
|
|
@@ -9236,12 +9307,12 @@ struct sqlite3_pcache_page {
|
|
|
9236
9307
|
** implementation must return a pointer to the page buffer with its content
|
|
9237
9308
|
** intact. If the requested page is not already in the cache, then the
|
|
9238
9309
|
** cache implementation should use the value of the createFlag
|
|
9239
|
-
** parameter to help it
|
|
9310
|
+
** parameter to help it determine what action to take:
|
|
9240
9311
|
**
|
|
9241
9312
|
** <table border=1 width=85% align=center>
|
|
9242
9313
|
** <tr><th> createFlag <th> Behavior when page is not already in cache
|
|
9243
9314
|
** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
|
|
9244
|
-
** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
|
|
9315
|
+
** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
|
|
9245
9316
|
** Otherwise return NULL.
|
|
9246
9317
|
** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
|
|
9247
9318
|
** NULL if allocating a new page is effectively impossible.
|
|
@@ -9258,7 +9329,7 @@ struct sqlite3_pcache_page {
|
|
|
9258
9329
|
** as its second argument. If the third parameter, discard, is non-zero,
|
|
9259
9330
|
** then the page must be evicted from the cache.
|
|
9260
9331
|
** ^If the discard parameter is
|
|
9261
|
-
** zero, then the page may be discarded or retained at the discretion of
|
|
9332
|
+
** zero, then the page may be discarded or retained at the discretion of the
|
|
9262
9333
|
** page cache implementation. ^The page cache implementation
|
|
9263
9334
|
** may choose to evict unpinned pages at any time.
|
|
9264
9335
|
**
|
|
@@ -9276,7 +9347,7 @@ struct sqlite3_pcache_page {
|
|
|
9276
9347
|
** When SQLite calls the xTruncate() method, the cache must discard all
|
|
9277
9348
|
** existing cache entries with page numbers (keys) greater than or equal
|
|
9278
9349
|
** to the value of the iLimit parameter passed to xTruncate(). If any
|
|
9279
|
-
** of these pages are pinned, they
|
|
9350
|
+
** of these pages are pinned, they become implicitly unpinned, meaning that
|
|
9280
9351
|
** they can be safely discarded.
|
|
9281
9352
|
**
|
|
9282
9353
|
** [[the xDestroy() page cache method]]
|
|
@@ -9456,7 +9527,7 @@ typedef struct sqlite3_backup sqlite3_backup;
|
|
|
9456
9527
|
** external process or via a database connection other than the one being
|
|
9457
9528
|
** used by the backup operation, then the backup will be automatically
|
|
9458
9529
|
** restarted by the next call to sqlite3_backup_step(). ^If the source
|
|
9459
|
-
** database is modified by
|
|
9530
|
+
** database is modified by using the same database connection as is used
|
|
9460
9531
|
** by the backup operation, then the backup database is automatically
|
|
9461
9532
|
** updated at the same time.
|
|
9462
9533
|
**
|
|
@@ -9473,7 +9544,7 @@ typedef struct sqlite3_backup sqlite3_backup;
|
|
|
9473
9544
|
** and may not be used following a call to sqlite3_backup_finish().
|
|
9474
9545
|
**
|
|
9475
9546
|
** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
|
|
9476
|
-
** sqlite3_backup_step() errors occurred, regardless
|
|
9547
|
+
** sqlite3_backup_step() errors occurred, regardless of whether or not
|
|
9477
9548
|
** sqlite3_backup_step() completed.
|
|
9478
9549
|
** ^If an out-of-memory condition or IO error occurred during any prior
|
|
9479
9550
|
** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
|
|
@@ -9575,7 +9646,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9575
9646
|
** application receives an SQLITE_LOCKED error, it may call the
|
|
9576
9647
|
** sqlite3_unlock_notify() method with the blocked connection handle as
|
|
9577
9648
|
** the first argument to register for a callback that will be invoked
|
|
9578
|
-
** when the blocking
|
|
9649
|
+
** when the blocking connection's current transaction is concluded. ^The
|
|
9579
9650
|
** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
|
|
9580
9651
|
** call that concludes the blocking connection's transaction.
|
|
9581
9652
|
**
|
|
@@ -9595,7 +9666,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9595
9666
|
** blocked connection already has a registered unlock-notify callback,
|
|
9596
9667
|
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
|
|
9597
9668
|
** called with a NULL pointer as its second argument, then any existing
|
|
9598
|
-
** unlock-notify callback is canceled. ^The blocked
|
|
9669
|
+
** unlock-notify callback is canceled. ^The blocked connection's
|
|
9599
9670
|
** unlock-notify callback may also be canceled by closing the blocked
|
|
9600
9671
|
** connection using [sqlite3_close()].
|
|
9601
9672
|
**
|
|
@@ -9993,7 +10064,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
9993
10064
|
** support constraints. In this configuration (which is the default) if
|
|
9994
10065
|
** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
|
|
9995
10066
|
** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
|
|
9996
|
-
** specified as part of the
|
|
10067
|
+
** specified as part of the user's SQL statement, regardless of the actual
|
|
9997
10068
|
** ON CONFLICT mode specified.
|
|
9998
10069
|
**
|
|
9999
10070
|
** If X is non-zero, then the virtual table implementation guarantees
|
|
@@ -10027,7 +10098,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|
|
10027
10098
|
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
|
|
10028
10099
|
** <dd>Calls of the form
|
|
10029
10100
|
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
|
|
10030
|
-
**
|
|
10101
|
+
** [xConnect] or [xCreate] methods of a [virtual table] implementation
|
|
10031
10102
|
** identify that virtual table as being safe to use from within triggers
|
|
10032
10103
|
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
|
|
10033
10104
|
** virtual table can do no serious harm even if it is controlled by a
|
|
@@ -10195,7 +10266,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
|
10195
10266
|
** </table>
|
|
10196
10267
|
**
|
|
10197
10268
|
** ^For the purposes of comparing virtual table output values to see if the
|
|
10198
|
-
** values are same value for sorting purposes, two NULL values are considered
|
|
10269
|
+
** values are the same value for sorting purposes, two NULL values are considered
|
|
10199
10270
|
** to be the same. In other words, the comparison operator is "IS"
|
|
10200
10271
|
** (or "IS NOT DISTINCT FROM") and not "==".
|
|
10201
10272
|
**
|
|
@@ -10205,7 +10276,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
|
|
|
10205
10276
|
**
|
|
10206
10277
|
** ^A virtual table implementation is always free to return rows in any order
|
|
10207
10278
|
** it wants, as long as the "orderByConsumed" flag is not set. ^When the
|
|
10208
|
-
**
|
|
10279
|
+
** "orderByConsumed" flag is unset, the query planner will add extra
|
|
10209
10280
|
** [bytecode] to ensure that the final results returned by the SQL query are
|
|
10210
10281
|
** ordered correctly. The use of the "orderByConsumed" flag and the
|
|
10211
10282
|
** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
|
|
@@ -10302,7 +10373,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
|
|
10302
10373
|
** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
|
|
10303
10374
|
** xFilter method which invokes these routines, and specifically
|
|
10304
10375
|
** a parameter that was previously selected for all-at-once IN constraint
|
|
10305
|
-
** processing
|
|
10376
|
+
** processing using the [sqlite3_vtab_in()] interface in the
|
|
10306
10377
|
** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
|
|
10307
10378
|
** an xFilter argument that was selected for all-at-once IN constraint
|
|
10308
10379
|
** processing, then these routines return [SQLITE_ERROR].)^
|
|
@@ -10357,7 +10428,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
|
|
|
10357
10428
|
** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
|
|
10358
10429
|
** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
|
|
10359
10430
|
** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
|
|
10360
|
-
** can return
|
|
10431
|
+
** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
|
|
10361
10432
|
** something goes wrong.
|
|
10362
10433
|
**
|
|
10363
10434
|
** The sqlite3_vtab_rhs_value() interface is usually only successful if
|
|
@@ -10385,8 +10456,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10385
10456
|
** KEYWORDS: {conflict resolution mode}
|
|
10386
10457
|
**
|
|
10387
10458
|
** These constants are returned by [sqlite3_vtab_on_conflict()] to
|
|
10388
|
-
** inform a [virtual table] implementation
|
|
10389
|
-
**
|
|
10459
|
+
** inform a [virtual table] implementation of the [ON CONFLICT] mode
|
|
10460
|
+
** for the SQL statement being evaluated.
|
|
10390
10461
|
**
|
|
10391
10462
|
** Note that the [SQLITE_IGNORE] constant is also used as a potential
|
|
10392
10463
|
** return value from the [sqlite3_set_authorizer()] callback and that
|
|
@@ -10426,39 +10497,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10426
10497
|
** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
|
|
10427
10498
|
** <dd>^The "double" variable pointed to by the V parameter will be set to the
|
|
10428
10499
|
** query planner's estimate for the average number of rows output from each
|
|
10429
|
-
** iteration of the X-th loop. If the query planner's
|
|
10500
|
+
** iteration of the X-th loop. If the query planner's estimate was accurate,
|
|
10430
10501
|
** then this value will approximate the quotient NVISIT/NLOOP and the
|
|
10431
10502
|
** product of this value for all prior loops with the same SELECTID will
|
|
10432
|
-
** be the NLOOP value for the current loop
|
|
10503
|
+
** be the NLOOP value for the current loop.</dd>
|
|
10433
10504
|
**
|
|
10434
10505
|
** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
|
|
10435
10506
|
** <dd>^The "const char *" variable pointed to by the V parameter will be set
|
|
10436
10507
|
** to a zero-terminated UTF-8 string containing the name of the index or table
|
|
10437
|
-
** used for the X-th loop
|
|
10508
|
+
** used for the X-th loop.</dd>
|
|
10438
10509
|
**
|
|
10439
10510
|
** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
|
|
10440
10511
|
** <dd>^The "const char *" variable pointed to by the V parameter will be set
|
|
10441
10512
|
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
|
|
10442
|
-
** description for the X-th loop
|
|
10513
|
+
** description for the X-th loop.</dd>
|
|
10443
10514
|
**
|
|
10444
10515
|
** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
|
|
10445
10516
|
** <dd>^The "int" variable pointed to by the V parameter will be set to the
|
|
10446
10517
|
** id for the X-th query plan element. The id value is unique within the
|
|
10447
10518
|
** statement. The select-id is the same value as is output in the first
|
|
10448
|
-
** column of an [EXPLAIN QUERY PLAN] query
|
|
10519
|
+
** column of an [EXPLAIN QUERY PLAN] query.</dd>
|
|
10449
10520
|
**
|
|
10450
10521
|
** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
|
|
10451
10522
|
** <dd>The "int" variable pointed to by the V parameter will be set to the
|
|
10452
|
-
**
|
|
10523
|
+
** id of the parent of the current query element, if applicable, or
|
|
10453
10524
|
** to zero if the query element has no parent. This is the same value as
|
|
10454
|
-
** returned in the second column of an [EXPLAIN QUERY PLAN] query
|
|
10525
|
+
** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
|
|
10455
10526
|
**
|
|
10456
10527
|
** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
|
|
10457
10528
|
** <dd>The sqlite3_int64 output value is set to the number of cycles,
|
|
10458
10529
|
** according to the processor time-stamp counter, that elapsed while the
|
|
10459
10530
|
** query element was being processed. This value is not available for
|
|
10460
10531
|
** all query elements - if it is unavailable the output variable is
|
|
10461
|
-
** set to -1
|
|
10532
|
+
** set to -1.</dd>
|
|
10462
10533
|
** </dl>
|
|
10463
10534
|
*/
|
|
10464
10535
|
#define SQLITE_SCANSTAT_NLOOP 0
|
|
@@ -10499,8 +10570,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
|
|
|
10499
10570
|
** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
|
|
10500
10571
|
**
|
|
10501
10572
|
** Parameter "idx" identifies the specific query element to retrieve statistics
|
|
10502
|
-
** for. Query elements are numbered starting from zero. A value of -1 may
|
|
10503
|
-
**
|
|
10573
|
+
** for. Query elements are numbered starting from zero. A value of -1 may
|
|
10574
|
+
** retrieve statistics for the entire query. ^If idx is out of range
|
|
10504
10575
|
** - less than -1 or greater than or equal to the total number of query
|
|
10505
10576
|
** elements used to implement the statement - a non-zero value is returned and
|
|
10506
10577
|
** the variable that pOut points to is unchanged.
|
|
@@ -10543,7 +10614,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
|
|
|
10543
10614
|
** METHOD: sqlite3
|
|
10544
10615
|
**
|
|
10545
10616
|
** ^If a write-transaction is open on [database connection] D when the
|
|
10546
|
-
** [sqlite3_db_cacheflush(D)] interface invoked, any dirty
|
|
10617
|
+
** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty
|
|
10547
10618
|
** pages in the pager-cache that are not currently in use are written out
|
|
10548
10619
|
** to disk. A dirty page may be in use if a database cursor created by an
|
|
10549
10620
|
** active SQL statement is reading from it, or if it is page 1 of a database
|
|
@@ -10657,8 +10728,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
|
|
|
10657
10728
|
** triggers; and so forth.
|
|
10658
10729
|
**
|
|
10659
10730
|
** When the [sqlite3_blob_write()] API is used to update a blob column,
|
|
10660
|
-
** the pre-update hook is invoked with SQLITE_DELETE
|
|
10661
|
-
**
|
|
10731
|
+
** the pre-update hook is invoked with SQLITE_DELETE, because
|
|
10732
|
+
** the new values are not yet available. In this case, when a
|
|
10662
10733
|
** callback made with op==SQLITE_DELETE is actually a write using the
|
|
10663
10734
|
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
|
|
10664
10735
|
** the index of the column being written. In other cases, where the
|
|
@@ -10911,7 +10982,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10911
10982
|
** For an ordinary on-disk database file, the serialization is just a
|
|
10912
10983
|
** copy of the disk file. For an in-memory database or a "TEMP" database,
|
|
10913
10984
|
** the serialization is the same sequence of bytes which would be written
|
|
10914
|
-
** to disk if that database
|
|
10985
|
+
** to disk if that database were backed up to disk.
|
|
10915
10986
|
**
|
|
10916
10987
|
** The usual case is that sqlite3_serialize() copies the serialization of
|
|
10917
10988
|
** the database into memory obtained from [sqlite3_malloc64()] and returns
|
|
@@ -10920,7 +10991,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10920
10991
|
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
|
|
10921
10992
|
** are made, and the sqlite3_serialize() function will return a pointer
|
|
10922
10993
|
** to the contiguous memory representation of the database that SQLite
|
|
10923
|
-
** is currently using for that database, or NULL if
|
|
10994
|
+
** is currently using for that database, or NULL if no such contiguous
|
|
10924
10995
|
** memory representation of the database exists. A contiguous memory
|
|
10925
10996
|
** representation of the database will usually only exist if there has
|
|
10926
10997
|
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
|
|
@@ -10991,7 +11062,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10991
11062
|
** database is currently in a read transaction or is involved in a backup
|
|
10992
11063
|
** operation.
|
|
10993
11064
|
**
|
|
10994
|
-
** It is not possible to
|
|
11065
|
+
** It is not possible to deserialize into the TEMP database. If the
|
|
10995
11066
|
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
|
10996
11067
|
** function returns SQLITE_ERROR.
|
|
10997
11068
|
**
|
|
@@ -11013,7 +11084,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
11013
11084
|
sqlite3 *db, /* The database connection */
|
|
11014
11085
|
const char *zSchema, /* Which DB to reopen with the deserialization */
|
|
11015
11086
|
unsigned char *pData, /* The serialized database content */
|
|
11016
|
-
sqlite3_int64 szDb, /* Number bytes in the deserialization */
|
|
11087
|
+
sqlite3_int64 szDb, /* Number of bytes in the deserialization */
|
|
11017
11088
|
sqlite3_int64 szBuf, /* Total size of buffer pData[] */
|
|
11018
11089
|
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
|
|
11019
11090
|
);
|
|
@@ -11021,7 +11092,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
11021
11092
|
/*
|
|
11022
11093
|
** CAPI3REF: Flags for sqlite3_deserialize()
|
|
11023
11094
|
**
|
|
11024
|
-
** The following are allowed values for 6th argument (the F argument) to
|
|
11095
|
+
** The following are allowed values for the 6th argument (the F argument) to
|
|
11025
11096
|
** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
|
|
11026
11097
|
**
|
|
11027
11098
|
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
|
|
@@ -11546,9 +11617,10 @@ SQLITE_API void sqlite3session_table_filter(
|
|
|
11546
11617
|
** is inserted while a session object is enabled, then later deleted while
|
|
11547
11618
|
** the same session object is disabled, no INSERT record will appear in the
|
|
11548
11619
|
** changeset, even though the delete took place while the session was disabled.
|
|
11549
|
-
** Or, if one field of a row is updated while a session is
|
|
11550
|
-
** another field of the same row is updated while the session is
|
|
11551
|
-
** resulting changeset will contain an UPDATE change that updates both
|
|
11620
|
+
** Or, if one field of a row is updated while a session is enabled, and
|
|
11621
|
+
** then another field of the same row is updated while the session is disabled,
|
|
11622
|
+
** the resulting changeset will contain an UPDATE change that updates both
|
|
11623
|
+
** fields.
|
|
11552
11624
|
*/
|
|
11553
11625
|
SQLITE_API int sqlite3session_changeset(
|
|
11554
11626
|
sqlite3_session *pSession, /* Session object */
|
|
@@ -11620,8 +11692,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
|
|
|
11620
11692
|
** database zFrom the contents of the two compatible tables would be
|
|
11621
11693
|
** identical.
|
|
11622
11694
|
**
|
|
11623
|
-
**
|
|
11624
|
-
**
|
|
11695
|
+
** Unless the call to this function is a no-op as described above, it is an
|
|
11696
|
+
** error if database zFrom does not exist or does not contain the required
|
|
11697
|
+
** compatible table.
|
|
11625
11698
|
**
|
|
11626
11699
|
** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
|
|
11627
11700
|
** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
|
|
@@ -11756,7 +11829,7 @@ SQLITE_API int sqlite3changeset_start_v2(
|
|
|
11756
11829
|
** The following flags may passed via the 4th parameter to
|
|
11757
11830
|
** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
|
|
11758
11831
|
**
|
|
11759
|
-
** <dt>
|
|
11832
|
+
** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
|
|
11760
11833
|
** Invert the changeset while iterating through it. This is equivalent to
|
|
11761
11834
|
** inverting a changeset using sqlite3changeset_invert() before applying it.
|
|
11762
11835
|
** It is an error to specify this flag with a patchset.
|
|
@@ -12071,19 +12144,6 @@ SQLITE_API int sqlite3changeset_concat(
|
|
|
12071
12144
|
void **ppOut /* OUT: Buffer containing output changeset */
|
|
12072
12145
|
);
|
|
12073
12146
|
|
|
12074
|
-
|
|
12075
|
-
/*
|
|
12076
|
-
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
|
|
12077
|
-
*/
|
|
12078
|
-
SQLITE_API int sqlite3changeset_upgrade(
|
|
12079
|
-
sqlite3 *db,
|
|
12080
|
-
const char *zDb,
|
|
12081
|
-
int nIn, const void *pIn, /* Input changeset */
|
|
12082
|
-
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
|
12083
|
-
);
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
12147
|
/*
|
|
12088
12148
|
** CAPI3REF: Changegroup Handle
|
|
12089
12149
|
**
|