better-sqlite3-multiple-ciphers 8.5.1-beta.1 → 8.5.3-beta.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.
@@ -31,9 +31,9 @@
31
31
 
32
32
  #define SQLITE3MC_VERSION_MAJOR 1
33
33
  #define SQLITE3MC_VERSION_MINOR 6
34
- #define SQLITE3MC_VERSION_RELEASE 3
34
+ #define SQLITE3MC_VERSION_RELEASE 4
35
35
  #define SQLITE3MC_VERSION_SUBRELEASE 0
36
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.6.3"
36
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.6.4"
37
37
 
38
38
  #endif /* SQLITE3MC_VERSION_H_ */
39
39
  /*** End of #include "sqlite3mc_version.h" ***/
@@ -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.42.0"
196
- #define SQLITE_VERSION_NUMBER 3042000
197
- #define SQLITE_SOURCE_ID "2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0"
195
+ #define SQLITE_VERSION "3.43.0"
196
+ #define SQLITE_VERSION_NUMBER 3043000
197
+ #define SQLITE_SOURCE_ID "2023-08-24 12:36:59 0f80b798b3f4b81a7bb4233c58294edd0f1156f36b6ecf5ab8e83631d468778c"
198
198
 
199
199
  /*
200
200
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -574,6 +574,7 @@ SQLITE_API int sqlite3_exec(
574
574
  #define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
575
575
  #define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
576
576
  #define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
577
+ #define SQLITE_IOERR_IN_PAGE (SQLITE_IOERR | (34<<8))
577
578
  #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
578
579
  #define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
579
580
  #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
@@ -1236,7 +1237,7 @@ struct sqlite3_io_methods {
1236
1237
  ** by clients within the current process, only within other processes.
1237
1238
  **
1238
1239
  ** <li>[[SQLITE_FCNTL_CKSM_FILE]]
1239
- ** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use interally by the
1240
+ ** The [SQLITE_FCNTL_CKSM_FILE] opcode is for use internally by the
1240
1241
  ** [checksum VFS shim] only.
1241
1242
  **
1242
1243
  ** <li>[[SQLITE_FCNTL_RESET_CACHE]]
@@ -2500,7 +2501,7 @@ struct sqlite3_mem_methods {
2500
2501
  ** the [VACUUM] command will fail with an obscure error when attempting to
2501
2502
  ** process a table with generated columns and a descending index. This is
2502
2503
  ** not considered a bug since SQLite versions 3.3.0 and earlier do not support
2503
- ** either generated columns or decending indexes.
2504
+ ** either generated columns or descending indexes.
2504
2505
  ** </dd>
2505
2506
  **
2506
2507
  ** [[SQLITE_DBCONFIG_STMT_SCANSTATUS]]
@@ -2781,6 +2782,7 @@ SQLITE_API sqlite3_int64 sqlite3_total_changes64(sqlite3*);
2781
2782
  **
2782
2783
  ** ^The [sqlite3_is_interrupted(D)] interface can be used to determine whether
2783
2784
  ** or not an interrupt is currently in effect for [database connection] D.
2785
+ ** It returns 1 if an interrupt is currently in effect, or 0 otherwise.
2784
2786
  */
2785
2787
  SQLITE_API void sqlite3_interrupt(sqlite3*);
2786
2788
  SQLITE_API int sqlite3_is_interrupted(sqlite3*);
@@ -3434,8 +3436,10 @@ SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
3434
3436
  ** M argument should be the bitwise OR-ed combination of
3435
3437
  ** zero or more [SQLITE_TRACE] constants.
3436
3438
  **
3437
- ** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides
3438
- ** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2().
3439
+ ** ^Each call to either sqlite3_trace(D,X,P) or sqlite3_trace_v2(D,M,X,P)
3440
+ ** overrides (cancels) all prior calls to sqlite3_trace(D,X,P) or
3441
+ ** sqlite3_trace_v2(D,M,X,P) for the [database connection] D. Each
3442
+ ** database connection may have at most one trace callback.
3439
3443
  **
3440
3444
  ** ^The X callback is invoked whenever any of the events identified by
3441
3445
  ** mask M occur. ^The integer return value from the callback is currently
@@ -3804,7 +3808,7 @@ SQLITE_API int sqlite3_open_v2(
3804
3808
  ** as F) must be one of:
3805
3809
  ** <ul>
3806
3810
  ** <li> A database filename pointer created by the SQLite core and
3807
- ** passed into the xOpen() method of a VFS implemention, or
3811
+ ** passed into the xOpen() method of a VFS implementation, or
3808
3812
  ** <li> A filename obtained from [sqlite3_db_filename()], or
3809
3813
  ** <li> A new filename constructed using [sqlite3_create_filename()].
3810
3814
  ** </ul>
@@ -3917,7 +3921,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
3917
3921
  /*
3918
3922
  ** CAPI3REF: Create and Destroy VFS Filenames
3919
3923
  **
3920
- ** These interfces are provided for use by [VFS shim] implementations and
3924
+ ** These interfaces are provided for use by [VFS shim] implementations and
3921
3925
  ** are not useful outside of that context.
3922
3926
  **
3923
3927
  ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
@@ -4464,6 +4468,41 @@ SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
4464
4468
  */
4465
4469
  SQLITE_API int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
4466
4470
 
4471
+ /*
4472
+ ** CAPI3REF: Change The EXPLAIN Setting For A Prepared Statement
4473
+ ** METHOD: sqlite3_stmt
4474
+ **
4475
+ ** The sqlite3_stmt_explain(S,E) interface changes the EXPLAIN
4476
+ ** setting for [prepared statement] S. If E is zero, then S becomes
4477
+ ** a normal prepared statement. If E is 1, then S behaves as if
4478
+ ** its SQL text began with "[EXPLAIN]". If E is 2, then S behaves as if
4479
+ ** its SQL text began with "[EXPLAIN QUERY PLAN]".
4480
+ **
4481
+ ** Calling sqlite3_stmt_explain(S,E) might cause S to be reprepared.
4482
+ ** SQLite tries to avoid a reprepare, but a reprepare might be necessary
4483
+ ** on the first transition into EXPLAIN or EXPLAIN QUERY PLAN mode.
4484
+ **
4485
+ ** Because of the potential need to reprepare, a call to
4486
+ ** sqlite3_stmt_explain(S,E) will fail with SQLITE_ERROR if S cannot be
4487
+ ** reprepared because it was created using [sqlite3_prepare()] instead of
4488
+ ** the newer [sqlite3_prepare_v2()] or [sqlite3_prepare_v3()] interfaces and
4489
+ ** hence has no saved SQL text with which to reprepare.
4490
+ **
4491
+ ** Changing the explain setting for a prepared statement does not change
4492
+ ** the original SQL text for the statement. Hence, if the SQL text originally
4493
+ ** began with EXPLAIN or EXPLAIN QUERY PLAN, but sqlite3_stmt_explain(S,0)
4494
+ ** is called to convert the statement into an ordinary statement, the EXPLAIN
4495
+ ** or EXPLAIN QUERY PLAN keywords will still appear in the sqlite3_sql(S)
4496
+ ** output, even though the statement now acts like a normal SQL statement.
4497
+ **
4498
+ ** This routine returns SQLITE_OK if the explain mode is successfully
4499
+ ** changed, or an error code if the explain mode could not be changed.
4500
+ ** The explain mode cannot be changed while a statement is active.
4501
+ ** Hence, it is good practice to call [sqlite3_reset(S)]
4502
+ ** immediately prior to calling sqlite3_stmt_explain(S,E).
4503
+ */
4504
+ SQLITE_API int sqlite3_stmt_explain(sqlite3_stmt *pStmt, int eMode);
4505
+
4467
4506
  /*
4468
4507
  ** CAPI3REF: Determine If A Prepared Statement Has Been Reset
4469
4508
  ** METHOD: sqlite3_stmt
@@ -4627,7 +4666,7 @@ typedef struct sqlite3_context sqlite3_context;
4627
4666
  ** with it may be passed. ^It is called to dispose of the BLOB or string even
4628
4667
  ** if the call to the bind API fails, except the destructor is not called if
4629
4668
  ** the third parameter is a NULL pointer or the fourth parameter is negative.
4630
- ** ^ (2) The special constant, [SQLITE_STATIC], may be passsed to indicate that
4669
+ ** ^ (2) The special constant, [SQLITE_STATIC], may be passed to indicate that
4631
4670
  ** the application remains responsible for disposing of the object. ^In this
4632
4671
  ** case, the object and the provided pointer to it must remain valid until
4633
4672
  ** either the prepared statement is finalized or the same SQL parameter is
@@ -5306,14 +5345,26 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
5306
5345
  ** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
5307
5346
  ** back to the beginning of its program.
5308
5347
  **
5309
- ** ^If the most recent call to [sqlite3_step(S)] for the
5310
- ** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
5311
- ** or if [sqlite3_step(S)] has never before been called on S,
5312
- ** then [sqlite3_reset(S)] returns [SQLITE_OK].
5348
+ ** ^The return code from [sqlite3_reset(S)] indicates whether or not
5349
+ ** the previous evaluation of prepared statement S completed successfully.
5350
+ ** ^If [sqlite3_step(S)] has never before been called on S or if
5351
+ ** [sqlite3_step(S)] has not been called since the previous call
5352
+ ** to [sqlite3_reset(S)], then [sqlite3_reset(S)] will return
5353
+ ** [SQLITE_OK].
5313
5354
  **
5314
5355
  ** ^If the most recent call to [sqlite3_step(S)] for the
5315
5356
  ** [prepared statement] S indicated an error, then
5316
5357
  ** [sqlite3_reset(S)] returns an appropriate [error code].
5358
+ ** ^The [sqlite3_reset(S)] interface might also return an [error code]
5359
+ ** if there were no prior errors but the process of resetting
5360
+ ** the prepared statement caused a new error. ^For example, if an
5361
+ ** [INSERT] statement with a [RETURNING] clause is only stepped one time,
5362
+ ** that one call to [sqlite3_step(S)] might return SQLITE_ROW but
5363
+ ** the overall statement might still fail and the [sqlite3_reset(S)] call
5364
+ ** might return SQLITE_BUSY if locking constraints prevent the
5365
+ ** database change from committing. Therefore, it is important that
5366
+ ** applications check the return code from [sqlite3_reset(S)] even if
5367
+ ** no prior call to [sqlite3_step(S)] indicated a problem.
5317
5368
  **
5318
5369
  ** ^The [sqlite3_reset(S)] interface does not change the values
5319
5370
  ** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
@@ -5530,7 +5581,7 @@ SQLITE_API int sqlite3_create_window_function(
5530
5581
  ** [application-defined SQL function]
5531
5582
  ** that has side-effects or that could potentially leak sensitive information.
5532
5583
  ** This will prevent attacks in which an application is tricked
5533
- ** into using a database file that has had its schema surreptiously
5584
+ ** into using a database file that has had its schema surreptitiously
5534
5585
  ** modified to invoke the application-defined function in ways that are
5535
5586
  ** harmful.
5536
5587
  ** <p>
@@ -8207,7 +8258,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8207
8258
  #define SQLITE_TESTCTRL_TRACEFLAGS 31
8208
8259
  #define SQLITE_TESTCTRL_TUNE 32
8209
8260
  #define SQLITE_TESTCTRL_LOGEST 33
8210
- #define SQLITE_TESTCTRL_LAST 33 /* Largest TESTCTRL */
8261
+ #define SQLITE_TESTCTRL_USELONGDOUBLE 34
8262
+ #define SQLITE_TESTCTRL_LAST 34 /* Largest TESTCTRL */
8211
8263
 
8212
8264
  /*
8213
8265
  ** CAPI3REF: SQL Keyword Checking
@@ -9239,8 +9291,8 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9239
9291
  ** blocked connection already has a registered unlock-notify callback,
9240
9292
  ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
9241
9293
  ** called with a NULL pointer as its second argument, then any existing
9242
- ** unlock-notify callback is canceled. ^The blocked connections
9243
- ** unlock-notify callback may also be canceled by closing the blocked
9294
+ ** unlock-notify callback is cancelled. ^The blocked connections
9295
+ ** unlock-notify callback may also be cancelled by closing the blocked
9244
9296
  ** connection using [sqlite3_close()].
9245
9297
  **
9246
9298
  ** The unlock-notify callback is not reentrant. If an application invokes
@@ -9663,7 +9715,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9663
9715
  ** [[SQLITE_VTAB_DIRECTONLY]]<dt>SQLITE_VTAB_DIRECTONLY</dt>
9664
9716
  ** <dd>Calls of the form
9665
9717
  ** [sqlite3_vtab_config](db,SQLITE_VTAB_DIRECTONLY) from within the
9666
- ** the [xConnect] or [xCreate] methods of a [virtual table] implmentation
9718
+ ** the [xConnect] or [xCreate] methods of a [virtual table] implementation
9667
9719
  ** prohibits that virtual table from being used from within triggers and
9668
9720
  ** views.
9669
9721
  ** </dd>
@@ -9853,7 +9905,7 @@ SQLITE_API int sqlite3_vtab_distinct(sqlite3_index_info*);
9853
9905
  ** communicated to the xBestIndex method as a
9854
9906
  ** [SQLITE_INDEX_CONSTRAINT_EQ] constraint.)^ If xBestIndex wants to use
9855
9907
  ** this constraint, it must set the corresponding
9856
- ** aConstraintUsage[].argvIndex to a postive integer. ^(Then, under
9908
+ ** aConstraintUsage[].argvIndex to a positive integer. ^(Then, under
9857
9909
  ** the usual mode of handling IN operators, SQLite generates [bytecode]
9858
9910
  ** that invokes the [xFilter|xFilter() method] once for each value
9859
9911
  ** on the right-hand side of the IN operator.)^ Thus the virtual table
@@ -10282,7 +10334,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
10282
10334
  ** When the [sqlite3_blob_write()] API is used to update a blob column,
10283
10335
  ** the pre-update hook is invoked with SQLITE_DELETE. This is because the
10284
10336
  ** in this case the new values are not available. In this case, when a
10285
- ** callback made with op==SQLITE_DELETE is actuall a write using the
10337
+ ** callback made with op==SQLITE_DELETE is actually a write using the
10286
10338
  ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
10287
10339
  ** the index of the column being written. In other cases, where the
10288
10340
  ** pre-update hook is being invoked for some other reason, including a
@@ -12800,7 +12852,7 @@ struct Fts5PhraseIter {
12800
12852
  ** See xPhraseFirstColumn above.
12801
12853
  */
12802
12854
  struct Fts5ExtensionApi {
12803
- int iVersion; /* Currently always set to 3 */
12855
+ int iVersion; /* Currently always set to 2 */
12804
12856
 
12805
12857
  void *(*xUserData)(Fts5Context*);
12806
12858
 
@@ -13029,8 +13081,8 @@ struct Fts5ExtensionApi {
13029
13081
  ** as separate queries of the FTS index are required for each synonym.
13030
13082
  **
13031
13083
  ** When using methods (2) or (3), it is important that the tokenizer only
13032
- ** provide synonyms when tokenizing document text (method (2)) or query
13033
- ** text (method (3)), not both. Doing so will not cause any errors, but is
13084
+ ** provide synonyms when tokenizing document text (method (3)) or query
13085
+ ** text (method (2)), not both. Doing so will not cause any errors, but is
13034
13086
  ** inefficient.
13035
13087
  */
13036
13088
  typedef struct Fts5Tokenizer Fts5Tokenizer;
@@ -13078,7 +13130,7 @@ struct fts5_api {
13078
13130
  int (*xCreateTokenizer)(
13079
13131
  fts5_api *pApi,
13080
13132
  const char *zName,
13081
- void *pContext,
13133
+ void *pUserData,
13082
13134
  fts5_tokenizer *pTokenizer,
13083
13135
  void (*xDestroy)(void*)
13084
13136
  );
@@ -13087,7 +13139,7 @@ struct fts5_api {
13087
13139
  int (*xFindTokenizer)(
13088
13140
  fts5_api *pApi,
13089
13141
  const char *zName,
13090
- void **ppContext,
13142
+ void **ppUserData,
13091
13143
  fts5_tokenizer *pTokenizer
13092
13144
  );
13093
13145
 
@@ -13095,7 +13147,7 @@ struct fts5_api {
13095
13147
  int (*xCreateFunction)(
13096
13148
  fts5_api *pApi,
13097
13149
  const char *zName,
13098
- void *pContext,
13150
+ void *pUserData,
13099
13151
  fts5_extension_function xFunction,
13100
13152
  void (*xDestroy)(void*)
13101
13153
  );
@@ -361,6 +361,8 @@ struct sqlite3_api_routines {
361
361
  int (*value_encoding)(sqlite3_value*);
362
362
  /* Version 3.41.0 and later */
363
363
  int (*is_interrupted)(sqlite3*);
364
+ /* Version 3.43.0 and later */
365
+ int (*stmt_explain)(sqlite3_stmt*,int);
364
366
  };
365
367
 
366
368
  /*
@@ -689,6 +691,8 @@ typedef int (*sqlite3_loadext_entry)(
689
691
  #define sqlite3_value_encoding sqlite3_api->value_encoding
690
692
  /* Version 3.41.0 and later */
691
693
  #define sqlite3_is_interrupted sqlite3_api->is_interrupted
694
+ /* Version 3.43.0 and later */
695
+ #define sqlite3_stmt_explain sqlite3_api->stmt_explain
692
696
  #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
693
697
 
694
698
  #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "8.5.1-beta.1",
3
+ "version": "8.5.3-beta.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>",