better-sqlite3-multiple-ciphers 12.1.1 → 12.2.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.
@@ -30,10 +30,10 @@
30
30
  #define SQLITE3MC_VERSION_H_
31
31
 
32
32
  #define SQLITE3MC_VERSION_MAJOR 2
33
- #define SQLITE3MC_VERSION_MINOR 1
34
- #define SQLITE3MC_VERSION_RELEASE 1
33
+ #define SQLITE3MC_VERSION_MINOR 2
34
+ #define SQLITE3MC_VERSION_RELEASE 0
35
35
  #define SQLITE3MC_VERSION_SUBRELEASE 0
36
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.1.1"
36
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.2.0"
37
37
 
38
38
  #endif /* SQLITE3MC_VERSION_H_ */
39
39
  /*** End of #include "sqlite3mc_version.h" ***/
@@ -179,7 +179,7 @@ extern "C" {
179
179
  **
180
180
  ** Since [version 3.6.18] ([dateof:3.6.18]),
181
181
  ** SQLite source code has been stored in the
182
- ** <a href="http://www.fossil-scm.org/">Fossil configuration management
182
+ ** <a href="http://fossil-scm.org/">Fossil configuration management
183
183
  ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
184
184
  ** a string which identifies a particular check-in of SQLite
185
185
  ** within its configuration management system. ^The SQLITE_SOURCE_ID
@@ -192,9 +192,9 @@ extern "C" {
192
192
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
193
193
  ** [sqlite_version()] and [sqlite_source_id()].
194
194
  */
195
- #define SQLITE_VERSION "3.49.2"
196
- #define SQLITE_VERSION_NUMBER 3049002
197
- #define SQLITE_SOURCE_ID "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
195
+ #define SQLITE_VERSION "3.50.2"
196
+ #define SQLITE_VERSION_NUMBER 3050002
197
+ #define SQLITE_SOURCE_ID "2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079"
198
198
 
199
199
  /*
200
200
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -1209,6 +1209,12 @@ struct sqlite3_io_methods {
1209
1209
  ** the value that M is to be set to. Before returning, the 32-bit signed
1210
1210
  ** integer is overwritten with the previous value of M.
1211
1211
  **
1212
+ ** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
1213
+ ** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
1214
+ ** VFS to block when taking a SHARED lock to connect to a wal mode database.
1215
+ ** This is used to implement the functionality associated with
1216
+ ** SQLITE_SETLK_BLOCK_ON_CONNECT.
1217
+ **
1212
1218
  ** <li>[[SQLITE_FCNTL_DATA_VERSION]]
1213
1219
  ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
1214
1220
  ** a database file. The argument is a pointer to a 32-bit unsigned integer.
@@ -1305,6 +1311,7 @@ struct sqlite3_io_methods {
1305
1311
  #define SQLITE_FCNTL_CKSM_FILE 41
1306
1312
  #define SQLITE_FCNTL_RESET_CACHE 42
1307
1313
  #define SQLITE_FCNTL_NULL_IO 43
1314
+ #define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
1308
1315
 
1309
1316
  /* deprecated names */
1310
1317
  #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -2035,13 +2042,16 @@ struct sqlite3_mem_methods {
2035
2042
  **
2036
2043
  ** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
2037
2044
  ** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
2038
- ** the default size of lookaside memory on each [database connection].
2045
+ ** the default size of [lookaside memory] on each [database connection].
2039
2046
  ** The first argument is the
2040
- ** size of each lookaside buffer slot and the second is the number of
2041
- ** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE
2042
- ** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
2043
- ** option to [sqlite3_db_config()] can be used to change the lookaside
2044
- ** configuration on individual connections.)^ </dd>
2047
+ ** size of each lookaside buffer slot ("sz") and the second is the number of
2048
+ ** slots allocated to each database connection ("cnt").)^
2049
+ ** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
2050
+ ** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
2051
+ ** be used to change the lookaside configuration on individual connections.)^
2052
+ ** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
2053
+ ** default lookaside configuration at compile-time.
2054
+ ** </dd>
2045
2055
  **
2046
2056
  ** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
2047
2057
  ** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
@@ -2278,31 +2288,50 @@ struct sqlite3_mem_methods {
2278
2288
  ** [[SQLITE_DBCONFIG_LOOKASIDE]]
2279
2289
  ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
2280
2290
  ** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
2281
- ** configuration of the lookaside memory allocator within a database
2291
+ ** configuration of the [lookaside memory allocator] within a database
2282
2292
  ** connection.
2283
2293
  ** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
2284
2294
  ** in the [DBCONFIG arguments|usual format].
2285
2295
  ** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
2286
2296
  ** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
2287
2297
  ** should have a total of five parameters.
2288
- ** ^The first argument (the third parameter to [sqlite3_db_config()] is a
2298
+ ** <ol>
2299
+ ** <li><p>The first argument ("buf") is a
2289
2300
  ** pointer to a memory buffer to use for lookaside memory.
2290
- ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
2291
- ** may be NULL in which case SQLite will allocate the
2292
- ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
2293
- ** size of each lookaside buffer slot. ^The third argument is the number of
2294
- ** slots. The size of the buffer in the first argument must be greater than
2295
- ** or equal to the product of the second and third arguments. The buffer
2296
- ** must be aligned to an 8-byte boundary. ^If the second argument to
2297
- ** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
2298
- ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
2301
+ ** The first argument may be NULL in which case SQLite will allocate the
2302
+ ** lookaside buffer itself using [sqlite3_malloc()].
2303
+ ** <li><P>The second argument ("sz") is the
2304
+ ** size of each lookaside buffer slot. Lookaside is disabled if "sz"
2305
+ ** is less than 8. The "sz" argument should be a multiple of 8 less than
2306
+ ** 65536. If "sz" does not meet this constraint, it is reduced in size until
2307
+ ** it does.
2308
+ ** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
2309
+ ** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
2310
+ ** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
2311
+ ** parameter is usually chosen so that the product of "sz" and "cnt" is less
2312
+ ** than 1,000,000.
2313
+ ** </ol>
2314
+ ** <p>If the "buf" argument is not NULL, then it must
2315
+ ** point to a memory buffer with a size that is greater than
2316
+ ** or equal to the product of "sz" and "cnt".
2317
+ ** The buffer must be aligned to an 8-byte boundary.
2318
+ ** The lookaside memory
2299
2319
  ** configuration for a database connection can only be changed when that
2300
2320
  ** connection is not currently using lookaside memory, or in other words
2301
- ** when the "current value" returned by
2302
- ** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
2321
+ ** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
2303
2322
  ** Any attempt to change the lookaside memory configuration when lookaside
2304
2323
  ** memory is in use leaves the configuration unchanged and returns
2305
- ** [SQLITE_BUSY].)^</dd>
2324
+ ** [SQLITE_BUSY].
2325
+ ** If the "buf" argument is NULL and an attempt
2326
+ ** to allocate memory based on "sz" and "cnt" fails, then
2327
+ ** lookaside is silently disabled.
2328
+ ** <p>
2329
+ ** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
2330
+ ** default lookaside configuration at initialization. The
2331
+ ** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
2332
+ ** configuration at compile-time. Typical values for lookaside are 1200 for
2333
+ ** "sz" and 40 to 100 for "cnt".
2334
+ ** </dd>
2306
2335
  **
2307
2336
  ** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
2308
2337
  ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
@@ -3039,6 +3068,44 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
3039
3068
  */
3040
3069
  SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
3041
3070
 
3071
+ /*
3072
+ ** CAPI3REF: Set the Setlk Timeout
3073
+ ** METHOD: sqlite3
3074
+ **
3075
+ ** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
3076
+ ** the VFS supports blocking locks, it sets the timeout in ms used by
3077
+ ** eligible locks taken on wal mode databases by the specified database
3078
+ ** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
3079
+ ** not support blocking locks, this function is a no-op.
3080
+ **
3081
+ ** Passing 0 to this function disables blocking locks altogether. Passing
3082
+ ** -1 to this function requests that the VFS blocks for a long time -
3083
+ ** indefinitely if possible. The results of passing any other negative value
3084
+ ** are undefined.
3085
+ **
3086
+ ** Internally, each SQLite database handle store two timeout values - the
3087
+ ** busy-timeout (used for rollback mode databases, or if the VFS does not
3088
+ ** support blocking locks) and the setlk-timeout (used for blocking locks
3089
+ ** on wal-mode databases). The sqlite3_busy_timeout() method sets both
3090
+ ** values, this function sets only the setlk-timeout value. Therefore,
3091
+ ** to configure separate busy-timeout and setlk-timeout values for a single
3092
+ ** database handle, call sqlite3_busy_timeout() followed by this function.
3093
+ **
3094
+ ** Whenever the number of connections to a wal mode database falls from
3095
+ ** 1 to 0, the last connection takes an exclusive lock on the database,
3096
+ ** then checkpoints and deletes the wal file. While it is doing this, any
3097
+ ** new connection that tries to read from the database fails with an
3098
+ ** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
3099
+ ** passed to this API, the new connection blocks until the exclusive lock
3100
+ ** has been released.
3101
+ */
3102
+ SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
3103
+
3104
+ /*
3105
+ ** CAPI3REF: Flags for sqlite3_setlk_timeout()
3106
+ */
3107
+ #define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
3108
+
3042
3109
  /*
3043
3110
  ** CAPI3REF: Convenience Routines For Running Queries
3044
3111
  ** METHOD: sqlite3
@@ -4058,7 +4125,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
4058
4125
  **
4059
4126
  ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
4060
4127
  ** database filename D with corresponding journal file J and WAL file W and
4061
- ** with N URI parameters key/values pairs in the array P. The result from
4128
+ ** an array P of N URI Key/Value pairs. The result from
4062
4129
  ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
4063
4130
  ** is safe to pass to routines like:
4064
4131
  ** <ul>
@@ -4739,7 +4806,7 @@ typedef struct sqlite3_context sqlite3_context;
4739
4806
  ** METHOD: sqlite3_stmt
4740
4807
  **
4741
4808
  ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
4742
- ** literals may be replaced by a [parameter] that matches one of following
4809
+ ** literals may be replaced by a [parameter] that matches one of the following
4743
4810
  ** templates:
4744
4811
  **
4745
4812
  ** <ul>
@@ -4784,7 +4851,7 @@ typedef struct sqlite3_context sqlite3_context;
4784
4851
  **
4785
4852
  ** [[byte-order determination rules]] ^The byte-order of
4786
4853
  ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
4787
- ** found in first character, which is removed, or in the absence of a BOM
4854
+ ** found in the first character, which is removed, or in the absence of a BOM
4788
4855
  ** the byte order is the native byte order of the host
4789
4856
  ** machine for sqlite3_bind_text16() or the byte order specified in
4790
4857
  ** the 6th parameter for sqlite3_bind_text64().)^
@@ -4804,7 +4871,7 @@ typedef struct sqlite3_context sqlite3_context;
4804
4871
  ** or sqlite3_bind_text16() or sqlite3_bind_text64() then
4805
4872
  ** that parameter must be the byte offset
4806
4873
  ** where the NUL terminator would occur assuming the string were NUL
4807
- ** terminated. If any NUL characters occurs at byte offsets less than
4874
+ ** terminated. If any NUL characters occur at byte offsets less than
4808
4875
  ** the value of the fourth parameter then the resulting string value will
4809
4876
  ** contain embedded NULs. The result of expressions involving strings
4810
4877
  ** with embedded NULs is undefined.
@@ -5016,7 +5083,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
5016
5083
  ** METHOD: sqlite3_stmt
5017
5084
  **
5018
5085
  ** ^These routines provide a means to determine the database, table, and
5019
- ** table column that is the origin of a particular result column in
5086
+ ** table column that is the origin of a particular result column in a
5020
5087
  ** [SELECT] statement.
5021
5088
  ** ^The name of the database or table or column can be returned as
5022
5089
  ** either a UTF-8 or UTF-16 string. ^The _database_ routines return
@@ -5154,7 +5221,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
5154
5221
  ** other than [SQLITE_ROW] before any subsequent invocation of
5155
5222
  ** sqlite3_step(). Failure to reset the prepared statement using
5156
5223
  ** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
5157
- ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
5224
+ ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
5158
5225
  ** sqlite3_step() began
5159
5226
  ** calling [sqlite3_reset()] automatically in this circumstance rather
5160
5227
  ** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@@ -5585,8 +5652,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5585
5652
  **
5586
5653
  ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
5587
5654
  ** all application-defined SQL functions that do not need to be
5588
- ** used inside of triggers, view, CHECK constraints, or other elements of
5589
- ** the database schema. This flags is especially recommended for SQL
5655
+ ** used inside of triggers, views, CHECK constraints, or other elements of
5656
+ ** the database schema. This flag is especially recommended for SQL
5590
5657
  ** functions that have side effects or reveal internal application state.
5591
5658
  ** Without this flag, an attacker might be able to modify the schema of
5592
5659
  ** a database file to include invocations of the function with parameters
@@ -5617,7 +5684,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5617
5684
  ** [user-defined window functions|available here].
5618
5685
  **
5619
5686
  ** ^(If the final parameter to sqlite3_create_function_v2() or
5620
- ** sqlite3_create_window_function() is not NULL, then it is destructor for
5687
+ ** sqlite3_create_window_function() is not NULL, then it is the destructor for
5621
5688
  ** the application data pointer. The destructor is invoked when the function
5622
5689
  ** is deleted, either by being overloaded or when the database connection
5623
5690
  ** closes.)^ ^The destructor is also invoked if the call to
@@ -6017,7 +6084,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
6017
6084
  ** METHOD: sqlite3_value
6018
6085
  **
6019
6086
  ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
6020
- ** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
6087
+ ** object V and returns a pointer to that copy. ^The [sqlite3_value] returned
6021
6088
  ** is a [protected sqlite3_value] object even if the input is not.
6022
6089
  ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
6023
6090
  ** memory allocation fails. ^If V is a [pointer value], then the result
@@ -6055,7 +6122,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
6055
6122
  ** allocation error occurs.
6056
6123
  **
6057
6124
  ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
6058
- ** determined by the N parameter on first successful call. Changing the
6125
+ ** determined by the N parameter on the first successful call. Changing the
6059
6126
  ** value of N in any subsequent call to sqlite3_aggregate_context() within
6060
6127
  ** the same aggregate function instance will not resize the memory
6061
6128
  ** allocation.)^ Within the xFinal callback, it is customary to set
@@ -6217,7 +6284,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
6217
6284
  **
6218
6285
  ** Security Warning: These interfaces should not be exposed in scripting
6219
6286
  ** languages or in other circumstances where it might be possible for an
6220
- ** an attacker to invoke them. Any agent that can invoke these interfaces
6287
+ ** attacker to invoke them. Any agent that can invoke these interfaces
6221
6288
  ** can probably also take control of the process.
6222
6289
  **
6223
6290
  ** Database connection client data is only available for SQLite
@@ -6331,7 +6398,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6331
6398
  ** pointed to by the 2nd parameter are taken as the application-defined
6332
6399
  ** function result. If the 3rd parameter is non-negative, then it
6333
6400
  ** must be the byte offset into the string where the NUL terminator would
6334
- ** appear if the string where NUL terminated. If any NUL characters occur
6401
+ ** appear if the string were NUL terminated. If any NUL characters occur
6335
6402
  ** in the string at a byte offset that is less than the value of the 3rd
6336
6403
  ** parameter, then the resulting string will contain embedded NULs and the
6337
6404
  ** result of expressions operating on strings with embedded NULs is undefined.
@@ -6389,7 +6456,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6389
6456
  ** string and preferably a string literal. The sqlite3_result_pointer()
6390
6457
  ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
6391
6458
  **
6392
- ** If these routines are called from within the different thread
6459
+ ** If these routines are called from within a different thread
6393
6460
  ** than the one containing the application-defined function that received
6394
6461
  ** the [sqlite3_context] pointer, the results are undefined.
6395
6462
  */
@@ -6795,7 +6862,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
6795
6862
  ** METHOD: sqlite3
6796
6863
  **
6797
6864
  ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
6798
- ** for the N-th database on database connection D, or a NULL pointer of N is
6865
+ ** for the N-th database on database connection D, or a NULL pointer if N is
6799
6866
  ** out of range. An N value of 0 means the main database file. An N of 1 is
6800
6867
  ** the "temp" schema. Larger values of N correspond to various ATTACH-ed
6801
6868
  ** databases.
@@ -6890,7 +6957,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6890
6957
  ** <dd>The SQLITE_TXN_READ state means that the database is currently
6891
6958
  ** in a read transaction. Content has been read from the database file
6892
6959
  ** but nothing in the database file has changed. The transaction state
6893
- ** will advanced to SQLITE_TXN_WRITE if any changes occur and there are
6960
+ ** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are
6894
6961
  ** no other conflicting concurrent write transactions. The transaction
6895
6962
  ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or
6896
6963
  ** [COMMIT].</dd>
@@ -6899,7 +6966,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6899
6966
  ** <dd>The SQLITE_TXN_WRITE state means that the database is currently
6900
6967
  ** in a write transaction. Content has been written to the database file
6901
6968
  ** but has not yet committed. The transaction state will change to
6902
- ** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6969
+ ** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6903
6970
  */
6904
6971
  #define SQLITE_TXN_NONE 0
6905
6972
  #define SQLITE_TXN_READ 1
@@ -7050,6 +7117,8 @@ SQLITE_API int sqlite3_autovacuum_pages(
7050
7117
  **
7051
7118
  ** ^The second argument is a pointer to the function to invoke when a
7052
7119
  ** row is updated, inserted or deleted in a rowid table.
7120
+ ** ^The update hook is disabled by invoking sqlite3_update_hook()
7121
+ ** with a NULL pointer as the second parameter.
7053
7122
  ** ^The first argument to the callback is a copy of the third argument
7054
7123
  ** to sqlite3_update_hook().
7055
7124
  ** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
@@ -7178,7 +7247,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
7178
7247
  ** CAPI3REF: Impose A Limit On Heap Size
7179
7248
  **
7180
7249
  ** These interfaces impose limits on the amount of heap memory that will be
7181
- ** by all database connections within a single process.
7250
+ ** used by all database connections within a single process.
7182
7251
  **
7183
7252
  ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
7184
7253
  ** soft limit on the amount of heap memory that may be allocated by SQLite.
@@ -7236,7 +7305,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
7236
7305
  ** </ul>)^
7237
7306
  **
7238
7307
  ** The circumstances under which SQLite will enforce the heap limits may
7239
- ** changes in future releases of SQLite.
7308
+ ** change in future releases of SQLite.
7240
7309
  */
7241
7310
  SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
7242
7311
  SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
@@ -7351,8 +7420,8 @@ SQLITE_API int sqlite3_table_column_metadata(
7351
7420
  ** ^The entry point is zProc.
7352
7421
  ** ^(zProc may be 0, in which case SQLite will try to come up with an
7353
7422
  ** entry point name on its own. It first tries "sqlite3_extension_init".
7354
- ** If that does not work, it constructs a name "sqlite3_X_init" where the
7355
- ** X is consists of the lower-case equivalent of all ASCII alphabetic
7423
+ ** If that does not work, it constructs a name "sqlite3_X_init" where
7424
+ ** X consists of the lower-case equivalent of all ASCII alphabetic
7356
7425
  ** characters in the filename from the last "/" to the first following
7357
7426
  ** "." and omitting any initial "lib".)^
7358
7427
  ** ^The sqlite3_load_extension() interface returns
@@ -7423,7 +7492,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
7423
7492
  ** ^(Even though the function prototype shows that xEntryPoint() takes
7424
7493
  ** no arguments and returns void, SQLite invokes xEntryPoint() with three
7425
7494
  ** arguments and expects an integer result as if the signature of the
7426
- ** entry point where as follows:
7495
+ ** entry point were as follows:
7427
7496
  **
7428
7497
  ** <blockquote><pre>
7429
7498
  ** &nbsp; int xEntryPoint(
@@ -7587,7 +7656,7 @@ struct sqlite3_module {
7587
7656
  ** virtual table and might not be checked again by the byte code.)^ ^(The
7588
7657
  ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
7589
7658
  ** is left in its default setting of false, the constraint will always be
7590
- ** checked separately in byte code. If the omit flag is change to true, then
7659
+ ** checked separately in byte code. If the omit flag is changed to true, then
7591
7660
  ** the constraint may or may not be checked in byte code. In other words,
7592
7661
  ** when the omit flag is true there is no guarantee that the constraint will
7593
7662
  ** not be checked again using byte code.)^
@@ -7613,7 +7682,7 @@ struct sqlite3_module {
7613
7682
  ** The xBestIndex method may optionally populate the idxFlags field with a
7614
7683
  ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
7615
7684
  ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
7616
- ** output to show the idxNum has hex instead of as decimal. Another flag is
7685
+ ** output to show the idxNum as hex instead of as decimal. Another flag is
7617
7686
  ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
7618
7687
  ** return at most one row.
7619
7688
  **
@@ -7754,7 +7823,7 @@ struct sqlite3_index_info {
7754
7823
  ** the implementation of the [virtual table module]. ^The fourth
7755
7824
  ** parameter is an arbitrary client data pointer that is passed through
7756
7825
  ** into the [xCreate] and [xConnect] methods of the virtual table module
7757
- ** when a new virtual table is be being created or reinitialized.
7826
+ ** when a new virtual table is being created or reinitialized.
7758
7827
  **
7759
7828
  ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
7760
7829
  ** is a pointer to a destructor for the pClientData. ^SQLite will
@@ -7919,7 +7988,7 @@ typedef struct sqlite3_blob sqlite3_blob;
7919
7988
  ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
7920
7989
  ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
7921
7990
  ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
7922
- ** on *ppBlob after this function it returns.
7991
+ ** on *ppBlob after this function returns.
7923
7992
  **
7924
7993
  ** This function fails with SQLITE_ERROR if any of the following are true:
7925
7994
  ** <ul>
@@ -8039,7 +8108,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
8039
8108
  **
8040
8109
  ** ^Returns the size in bytes of the BLOB accessible via the
8041
8110
  ** successfully opened [BLOB handle] in its only argument. ^The
8042
- ** incremental blob I/O routines can only read or overwriting existing
8111
+ ** incremental blob I/O routines can only read or overwrite existing
8043
8112
  ** blob content; they cannot change the size of a blob.
8044
8113
  **
8045
8114
  ** This routine only works on a [BLOB handle] which has been created
@@ -8189,7 +8258,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
8189
8258
  ** ^The sqlite3_mutex_alloc() routine allocates a new
8190
8259
  ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
8191
8260
  ** routine returns NULL if it is unable to allocate the requested
8192
- ** mutex. The argument to sqlite3_mutex_alloc() must one of these
8261
+ ** mutex. The argument to sqlite3_mutex_alloc() must be one of these
8193
8262
  ** integer constants:
8194
8263
  **
8195
8264
  ** <ul>
@@ -8422,7 +8491,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
8422
8491
  ** CAPI3REF: Retrieve the mutex for a database connection
8423
8492
  ** METHOD: sqlite3
8424
8493
  **
8425
- ** ^This interface returns a pointer the [sqlite3_mutex] object that
8494
+ ** ^This interface returns a pointer to the [sqlite3_mutex] object that
8426
8495
  ** serializes access to the [database connection] given in the argument
8427
8496
  ** when the [threading mode] is Serialized.
8428
8497
  ** ^If the [threading mode] is Single-thread or Multi-thread then this
@@ -8545,7 +8614,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8545
8614
  ** CAPI3REF: SQL Keyword Checking
8546
8615
  **
8547
8616
  ** These routines provide access to the set of SQL language keywords
8548
- ** recognized by SQLite. Applications can uses these routines to determine
8617
+ ** recognized by SQLite. Applications can use these routines to determine
8549
8618
  ** whether or not a specific identifier needs to be escaped (for example,
8550
8619
  ** by enclosing in double-quotes) so as not to confuse the parser.
8551
8620
  **
@@ -8713,7 +8782,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
8713
8782
  ** content of the dynamic string under construction in X. The value
8714
8783
  ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
8715
8784
  ** and might be freed or altered by any subsequent method on the same
8716
- ** [sqlite3_str] object. Applications must not used the pointer returned
8785
+ ** [sqlite3_str] object. Applications must not use the pointer returned by
8717
8786
  ** [sqlite3_str_value(X)] after any subsequent method call on the same
8718
8787
  ** object. ^Applications may change the content of the string returned
8719
8788
  ** by [sqlite3_str_value(X)] as long as they do not write into any bytes
@@ -8799,7 +8868,7 @@ SQLITE_API int sqlite3_status64(
8799
8868
  ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
8800
8869
  ** buffer and where forced to overflow to [sqlite3_malloc()]. The
8801
8870
  ** returned value includes allocations that overflowed because they
8802
- ** where too large (they were larger than the "sz" parameter to
8871
+ ** were too large (they were larger than the "sz" parameter to
8803
8872
  ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
8804
8873
  ** no space was left in the page cache.</dd>)^
8805
8874
  **
@@ -8883,28 +8952,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8883
8952
  ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
8884
8953
  ** <dd>This parameter returns the number of malloc attempts that were
8885
8954
  ** satisfied using lookaside memory. Only the high-water value is meaningful;
8886
- ** the current value is always zero.)^
8955
+ ** the current value is always zero.</dd>)^
8887
8956
  **
8888
8957
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]
8889
8958
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
8890
- ** <dd>This parameter returns the number malloc attempts that might have
8959
+ ** <dd>This parameter returns the number of malloc attempts that might have
8891
8960
  ** been satisfied using lookaside memory but failed due to the amount of
8892
8961
  ** memory requested being larger than the lookaside slot size.
8893
8962
  ** Only the high-water value is meaningful;
8894
- ** the current value is always zero.)^
8963
+ ** the current value is always zero.</dd>)^
8895
8964
  **
8896
8965
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]
8897
8966
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
8898
- ** <dd>This parameter returns the number malloc attempts that might have
8967
+ ** <dd>This parameter returns the number of malloc attempts that might have
8899
8968
  ** been satisfied using lookaside memory but failed due to all lookaside
8900
8969
  ** memory already being in use.
8901
8970
  ** Only the high-water value is meaningful;
8902
- ** the current value is always zero.)^
8971
+ ** the current value is always zero.</dd>)^
8903
8972
  **
8904
8973
  ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
8905
8974
  ** <dd>This parameter returns the approximate number of bytes of heap
8906
8975
  ** memory used by all pager caches associated with the database connection.)^
8907
8976
  ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
8977
+ ** </dd>
8908
8978
  **
8909
8979
  ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
8910
8980
  ** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
@@ -8913,10 +8983,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8913
8983
  ** memory used by that pager cache is divided evenly between the attached
8914
8984
  ** connections.)^ In other words, if none of the pager caches associated
8915
8985
  ** with the database connection are shared, this request returns the same
8916
- ** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are
8986
+ ** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are
8917
8987
  ** shared, the value returned by this call will be smaller than that returned
8918
8988
  ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
8919
- ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.
8989
+ ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>
8920
8990
  **
8921
8991
  ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
8922
8992
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8926,6 +8996,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8926
8996
  ** schema memory is shared with other database connections due to
8927
8997
  ** [shared cache mode] being enabled.
8928
8998
  ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
8999
+ ** </dd>
8929
9000
  **
8930
9001
  ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
8931
9002
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8962,7 +9033,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8962
9033
  ** been written to disk in the middle of a transaction due to the page
8963
9034
  ** cache overflowing. Transactions are more efficient if they are written
8964
9035
  ** to disk all at once. When pages spill mid-transaction, that introduces
8965
- ** additional overhead. This parameter can be used help identify
9036
+ ** additional overhead. This parameter can be used to help identify
8966
9037
  ** inefficiencies that can be resolved by increasing the cache size.
8967
9038
  ** </dd>
8968
9039
  **
@@ -9442,7 +9513,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9442
9513
  ** external process or via a database connection other than the one being
9443
9514
  ** used by the backup operation, then the backup will be automatically
9444
9515
  ** restarted by the next call to sqlite3_backup_step(). ^If the source
9445
- ** database is modified by the using the same database connection as is used
9516
+ ** database is modified by using the same database connection as is used
9446
9517
  ** by the backup operation, then the backup database is automatically
9447
9518
  ** updated at the same time.
9448
9519
  **
@@ -9459,7 +9530,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9459
9530
  ** and may not be used following a call to sqlite3_backup_finish().
9460
9531
  **
9461
9532
  ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
9462
- ** sqlite3_backup_step() errors occurred, regardless or whether or not
9533
+ ** sqlite3_backup_step() errors occurred, regardless of whether or not
9463
9534
  ** sqlite3_backup_step() completed.
9464
9535
  ** ^If an out-of-memory condition or IO error occurred during any prior
9465
9536
  ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
@@ -10529,7 +10600,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
10529
10600
  ** METHOD: sqlite3
10530
10601
  **
10531
10602
  ** ^If a write-transaction is open on [database connection] D when the
10532
- ** [sqlite3_db_cacheflush(D)] interface invoked, any dirty
10603
+ ** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty
10533
10604
  ** pages in the pager-cache that are not currently in use are written out
10534
10605
  ** to disk. A dirty page may be in use if a database cursor created by an
10535
10606
  ** active SQL statement is reading from it, or if it is page 1 of a database
@@ -11532,9 +11603,10 @@ SQLITE_API void sqlite3session_table_filter(
11532
11603
  ** is inserted while a session object is enabled, then later deleted while
11533
11604
  ** the same session object is disabled, no INSERT record will appear in the
11534
11605
  ** changeset, even though the delete took place while the session was disabled.
11535
- ** Or, if one field of a row is updated while a session is disabled, and
11536
- ** another field of the same row is updated while the session is enabled, the
11537
- ** resulting changeset will contain an UPDATE change that updates both fields.
11606
+ ** Or, if one field of a row is updated while a session is enabled, and
11607
+ ** then another field of the same row is updated while the session is disabled,
11608
+ ** the resulting changeset will contain an UPDATE change that updates both
11609
+ ** fields.
11538
11610
  */
11539
11611
  SQLITE_API int sqlite3session_changeset(
11540
11612
  sqlite3_session *pSession, /* Session object */
@@ -11606,8 +11678,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
11606
11678
  ** database zFrom the contents of the two compatible tables would be
11607
11679
  ** identical.
11608
11680
  **
11609
- ** It an error if database zFrom does not exist or does not contain the
11610
- ** required compatible table.
11681
+ ** Unless the call to this function is a no-op as described above, it is an
11682
+ ** error if database zFrom does not exist or does not contain the required
11683
+ ** compatible table.
11611
11684
  **
11612
11685
  ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
11613
11686
  ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
@@ -11742,7 +11815,7 @@ SQLITE_API int sqlite3changeset_start_v2(
11742
11815
  ** The following flags may passed via the 4th parameter to
11743
11816
  ** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
11744
11817
  **
11745
- ** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
11818
+ ** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
11746
11819
  ** Invert the changeset while iterating through it. This is equivalent to
11747
11820
  ** inverting a changeset using sqlite3changeset_invert() before applying it.
11748
11821
  ** It is an error to specify this flag with a patchset.
@@ -12057,19 +12130,6 @@ SQLITE_API int sqlite3changeset_concat(
12057
12130
  void **ppOut /* OUT: Buffer containing output changeset */
12058
12131
  );
12059
12132
 
12060
-
12061
- /*
12062
- ** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
12063
- */
12064
- SQLITE_API int sqlite3changeset_upgrade(
12065
- sqlite3 *db,
12066
- const char *zDb,
12067
- int nIn, const void *pIn, /* Input changeset */
12068
- int *pnOut, void **ppOut /* OUT: Inverse of input */
12069
- );
12070
-
12071
-
12072
-
12073
12133
  /*
12074
12134
  ** CAPI3REF: Changegroup Handle
12075
12135
  **
@@ -366,6 +366,8 @@ struct sqlite3_api_routines {
366
366
  /* Version 3.44.0 and later */
367
367
  void *(*get_clientdata)(sqlite3*,const char*);
368
368
  int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
369
+ /* Version 3.50.0 and later */
370
+ int (*setlk_timeout)(sqlite3*,int,int);
369
371
  };
370
372
 
371
373
  /*
@@ -699,6 +701,8 @@ typedef int (*sqlite3_loadext_entry)(
699
701
  /* Version 3.44.0 and later */
700
702
  #define sqlite3_get_clientdata sqlite3_api->get_clientdata
701
703
  #define sqlite3_set_clientdata sqlite3_api->set_clientdata
704
+ /* Version 3.50.0 and later */
705
+ #define sqlite3_setlk_timeout sqlite3_api->setlk_timeout
702
706
  #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
703
707
 
704
708
  #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
@@ -21,8 +21,8 @@
21
21
  # ===
22
22
 
23
23
  YEAR="2025"
24
- VERSION="3490200"
25
- SQLITE3MC_VERSION="v2.1.1"
24
+ VERSION="3500200"
25
+ SQLITE3MC_VERSION="v2.2.0"
26
26
 
27
27
  # Defines below are sorted alphabetically
28
28
  DEFINES="
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "12.1.1",
3
+ "version": "12.2.0",
4
4
  "description": "better-sqlite3 with multiple-cipher encryption support",
5
5
  "homepage": "https://github.com/m4heshd/better-sqlite3-multiple-ciphers",
6
6
  "author": "Mahesh Bandara Wijerathna (m4heshd) <m4heshd@gmail.com>",