better-sqlite3-multiple-ciphers 11.7.0 → 11.8.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.
@@ -20,7 +20,7 @@
20
20
  ** Purpose: SQLite3 Multiple Ciphers version numbers
21
21
  ** Author: Ulrich Telle
22
22
  ** Created: 2020-08-05
23
- ** Copyright: (c) 2020-2024 Ulrich Telle
23
+ ** Copyright: (c) 2020-2025 Ulrich Telle
24
24
  ** License: MIT
25
25
  */
26
26
 
@@ -29,11 +29,11 @@
29
29
  #ifndef SQLITE3MC_VERSION_H_
30
30
  #define SQLITE3MC_VERSION_H_
31
31
 
32
- #define SQLITE3MC_VERSION_MAJOR 1
33
- #define SQLITE3MC_VERSION_MINOR 9
32
+ #define SQLITE3MC_VERSION_MAJOR 2
33
+ #define SQLITE3MC_VERSION_MINOR 0
34
34
  #define SQLITE3MC_VERSION_RELEASE 2
35
35
  #define SQLITE3MC_VERSION_SUBRELEASE 0
36
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.9.2"
36
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.0.2"
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.47.2"
196
- #define SQLITE_VERSION_NUMBER 3047002
197
- #define SQLITE_SOURCE_ID "2024-12-07 20:39:59 2aabe05e2e8cae4847a802ee2daddc1d7413d8fc560254d93ee3e72c14685b6c"
195
+ #define SQLITE_VERSION "3.48.0"
196
+ #define SQLITE_VERSION_NUMBER 3048000
197
+ #define SQLITE_SOURCE_ID "2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010"
198
198
 
199
199
  /*
200
200
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -1146,6 +1146,11 @@ struct sqlite3_io_methods {
1146
1146
  ** pointed to by the pArg argument. This capability is used during testing
1147
1147
  ** and only needs to be supported when SQLITE_TEST is defined.
1148
1148
  **
1149
+ ** <li>[[SQLITE_FCNTL_NULL_IO]]
1150
+ ** The [SQLITE_FCNTL_NULL_IO] opcode sets the low-level file descriptor
1151
+ ** or file handle for the [sqlite3_file] object such that it will no longer
1152
+ ** read or write to the database file.
1153
+ **
1149
1154
  ** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
1150
1155
  ** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
1151
1156
  ** be advantageous to block on the next WAL lock if the lock is not immediately
@@ -1299,6 +1304,7 @@ struct sqlite3_io_methods {
1299
1304
  #define SQLITE_FCNTL_EXTERNAL_READER 40
1300
1305
  #define SQLITE_FCNTL_CKSM_FILE 41
1301
1306
  #define SQLITE_FCNTL_RESET_CACHE 42
1307
+ #define SQLITE_FCNTL_NULL_IO 43
1302
1308
 
1303
1309
  /* deprecated names */
1304
1310
  #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -2677,10 +2683,14 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
2677
2683
  ** deleted by the most recently completed INSERT, UPDATE or DELETE
2678
2684
  ** statement on the database connection specified by the only parameter.
2679
2685
  ** The two functions are identical except for the type of the return value
2680
- ** and that if the number of rows modified by the most recent INSERT, UPDATE
2686
+ ** and that if the number of rows modified by the most recent INSERT, UPDATE,
2681
2687
  ** or DELETE is greater than the maximum value supported by type "int", then
2682
2688
  ** the return value of sqlite3_changes() is undefined. ^Executing any other
2683
2689
  ** type of SQL statement does not modify the value returned by these functions.
2690
+ ** For the purposes of this interface, a CREATE TABLE AS SELECT statement
2691
+ ** does not count as an INSERT, UPDATE or DELETE statement and hence the rows
2692
+ ** added to the new table by the CREATE TABLE AS SELECT statement are not
2693
+ ** counted.
2684
2694
  **
2685
2695
  ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2686
2696
  ** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
@@ -4240,11 +4250,22 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
4240
4250
  ** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler
4241
4251
  ** to return an error (error code SQLITE_ERROR) if the statement uses
4242
4252
  ** any virtual tables.
4253
+ **
4254
+ ** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>
4255
+ ** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler
4256
+ ** errors from being sent to the error log defined by
4257
+ ** [SQLITE_CONFIG_LOG]. This can be used, for example, to do test
4258
+ ** compiles to see if some SQL syntax is well-formed, without generating
4259
+ ** messages on the global error log when it is not. If the test compile
4260
+ ** fails, the sqlite3_prepare_v3() call returns the same error indications
4261
+ ** with or without this flag; it just omits the call to [sqlite3_log()] that
4262
+ ** logs the error.
4243
4263
  ** </dl>
4244
4264
  */
4245
4265
  #define SQLITE_PREPARE_PERSISTENT 0x01
4246
4266
  #define SQLITE_PREPARE_NORMALIZE 0x02
4247
4267
  #define SQLITE_PREPARE_NO_VTAB 0x04
4268
+ #define SQLITE_PREPARE_DONT_LOG 0x10
4248
4269
 
4249
4270
  /*
4250
4271
  ** CAPI3REF: Compiling An SQL Statement
@@ -10935,7 +10956,7 @@ SQLITE_API int sqlite3_deserialize(
10935
10956
  #ifdef __cplusplus
10936
10957
  } /* End of the 'extern "C"' block */
10937
10958
  #endif
10938
- #endif /* SQLITE3_H */
10959
+ /* #endif for SQLITE3_H will be added by mksqlite3.tcl */
10939
10960
 
10940
10961
  /******** Begin file sqlite3rtree.h *********/
10941
10962
  /*
@@ -13186,14 +13207,29 @@ struct Fts5PhraseIter {
13186
13207
  ** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
13187
13208
  ** output variable (*ppToken) is set to point to a buffer containing the
13188
13209
  ** matching document token, and (*pnToken) to the size of that buffer in
13189
- ** bytes. This API is not available if the specified token matches a
13190
- ** prefix query term. In that case both output variables are always set
13191
- ** to 0.
13210
+ ** bytes.
13192
13211
  **
13193
13212
  ** The output text is not a copy of the document text that was tokenized.
13194
13213
  ** It is the output of the tokenizer module. For tokendata=1 tables, this
13195
13214
  ** includes any embedded 0x00 and trailing data.
13196
13215
  **
13216
+ ** This API may be slow in some cases if the token identified by parameters
13217
+ ** iIdx and iToken matched a prefix token in the query. In most cases, the
13218
+ ** first call to this API for each prefix token in the query is forced
13219
+ ** to scan the portion of the full-text index that matches the prefix
13220
+ ** token to collect the extra data required by this API. If the prefix
13221
+ ** token matches a large number of token instances in the document set,
13222
+ ** this may be a performance problem.
13223
+ **
13224
+ ** If the user knows in advance that a query may use this API for a
13225
+ ** prefix token, FTS5 may be configured to collect all required data as part
13226
+ ** of the initial querying of the full-text index, avoiding the second scan
13227
+ ** entirely. This also causes prefix queries that do not use this API to
13228
+ ** run more slowly and use more memory. FTS5 may be configured in this way
13229
+ ** either on a per-table basis using the [FTS5 insttoken | 'insttoken']
13230
+ ** option, or on a per-query basis using the
13231
+ ** [fts5_insttoken | fts5_insttoken()] user function.
13232
+ **
13197
13233
  ** This API can be quite slow if used with an FTS5 table created with the
13198
13234
  ** "detail=none" or "detail=column" option.
13199
13235
  **
@@ -13627,110 +13663,12 @@ struct fts5_api {
13627
13663
  #endif /* _FTS5_H */
13628
13664
 
13629
13665
  /******** End of fts5.h *********/
13666
+ #endif /* SQLITE3_H */
13630
13667
  /*** End of #include "sqlite3.h" ***/
13631
13668
 
13632
13669
 
13633
13670
  #ifdef SQLITE_USER_AUTHENTICATION
13634
- /* #include "sqlite3userauth.h" */
13635
- /*** Begin of #include "sqlite3userauth.h" ***/
13636
- /*
13637
- ** 2014-09-08
13638
- **
13639
- ** The author disclaims copyright to this source code. In place of
13640
- ** a legal notice, here is a blessing:
13641
- **
13642
- ** May you do good and not evil.
13643
- ** May you find forgiveness for yourself and forgive others.
13644
- ** May you share freely, never taking more than you give.
13645
- **
13646
- *************************************************************************
13647
- **
13648
- ** This file contains the application interface definitions for the
13649
- ** user-authentication extension feature.
13650
- **
13651
- ** To compile with the user-authentication feature, append this file to
13652
- ** end of an SQLite amalgamation header file ("sqlite3.h"), then add
13653
- ** the SQLITE_USER_AUTHENTICATION compile-time option. See the
13654
- ** user-auth.txt file in the same source directory as this file for
13655
- ** additional information.
13656
- */
13657
- #ifdef SQLITE_USER_AUTHENTICATION
13658
-
13659
- #ifdef __cplusplus
13660
- extern "C" {
13661
- #endif
13662
-
13663
- /*
13664
- ** If a database contains the SQLITE_USER table, then the
13665
- ** sqlite3_user_authenticate() interface must be invoked with an
13666
- ** appropriate username and password prior to enable read and write
13667
- ** access to the database.
13668
- **
13669
- ** Return SQLITE_OK on success or SQLITE_ERROR if the username/password
13670
- ** combination is incorrect or unknown.
13671
- **
13672
- ** If the SQLITE_USER table is not present in the database file, then
13673
- ** this interface is a harmless no-op returnning SQLITE_OK.
13674
- */
13675
- SQLITE_API int sqlite3_user_authenticate(
13676
- sqlite3 *db, /* The database connection */
13677
- const char *zUsername, /* Username */
13678
- const char *aPW, /* Password or credentials */
13679
- int nPW /* Number of bytes in aPW[] */
13680
- );
13681
-
13682
- /*
13683
- ** The sqlite3_user_add() interface can be used (by an admin user only)
13684
- ** to create a new user. When called on a no-authentication-required
13685
- ** database, this routine converts the database into an authentication-
13686
- ** required database, automatically makes the added user an
13687
- ** administrator, and logs in the current connection as that user.
13688
- ** The sqlite3_user_add() interface only works for the "main" database, not
13689
- ** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
13690
- ** non-admin user results in an error.
13691
- */
13692
- SQLITE_API int sqlite3_user_add(
13693
- sqlite3 *db, /* Database connection */
13694
- const char *zUsername, /* Username to be added */
13695
- const char *aPW, /* Password or credentials */
13696
- int nPW, /* Number of bytes in aPW[] */
13697
- int isAdmin /* True to give new user admin privilege */
13698
- );
13699
-
13700
- /*
13701
- ** The sqlite3_user_change() interface can be used to change a users
13702
- ** login credentials or admin privilege. Any user can change their own
13703
- ** login credentials. Only an admin user can change another users login
13704
- ** credentials or admin privilege setting. No user may change their own
13705
- ** admin privilege setting.
13706
- */
13707
- SQLITE_API int sqlite3_user_change(
13708
- sqlite3 *db, /* Database connection */
13709
- const char *zUsername, /* Username to change */
13710
- const char *aPW, /* New password or credentials */
13711
- int nPW, /* Number of bytes in aPW[] */
13712
- int isAdmin /* Modified admin privilege for the user */
13713
- );
13714
-
13715
- /*
13716
- ** The sqlite3_user_delete() interface can be used (by an admin user only)
13717
- ** to delete a user. The currently logged-in user cannot be deleted,
13718
- ** which guarantees that there is always an admin user and hence that
13719
- ** the database cannot be converted into a no-authentication-required
13720
- ** database.
13721
- */
13722
- SQLITE_API int sqlite3_user_delete(
13723
- sqlite3 *db, /* Database connection */
13724
- const char *zUsername /* Username to remove */
13725
- );
13726
-
13727
- #ifdef __cplusplus
13728
- } /* end of the 'extern "C"' block */
13729
- #endif
13730
-
13731
- #endif /* SQLITE_USER_AUTHENTICATION */
13732
- /*** End of #include "sqlite3userauth.h" ***/
13733
-
13671
+ #undef SQLITE_USER_AUTHENTICATION
13734
13672
  #endif
13735
13673
 
13736
13674
  /*
@@ -13743,7 +13681,8 @@ SQLITE_API int sqlite3_user_delete(
13743
13681
  #define CODEC_TYPE_SQLCIPHER 4
13744
13682
  #define CODEC_TYPE_RC4 5
13745
13683
  #define CODEC_TYPE_ASCON128 6
13746
- #define CODEC_TYPE_MAX_BUILTIN 6
13684
+ #define CODEC_TYPE_AEGIS 7
13685
+ #define CODEC_TYPE_MAX_BUILTIN 7
13747
13686
 
13748
13687
  /*
13749
13688
  ** Definition of API functions
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for better-sqlite3-multiple-ciphers 11.2.1
1
+ // Type definitions for better-sqlite3-multiple-ciphers 11.8.0
2
2
  // Project: https://github.com/m4heshd/better-sqlite3-multiple-ciphers
3
3
  // Definitions by: Ben Davies <https://github.com/Morfent>
4
4
  // Mathew Rumsey <https://github.com/matrumz>
@@ -102,18 +102,19 @@ declare namespace BetterSqlite3MultipleCiphers {
102
102
  new(filename?: string | Buffer, options?: Database.Options): Database;
103
103
  (filename?: string, options?: Database.Options): Database;
104
104
  prototype: Database;
105
-
106
- SqliteError: typeof SqliteError;
105
+ SqliteError: SqliteErrorType;
107
106
  }
108
107
  }
109
108
 
110
- declare class SqliteError extends Error {
109
+ declare class SqliteErrorClass extends Error {
111
110
  name: string;
112
111
  message: string;
113
112
  code: string;
114
113
  constructor(message: string, code: string);
115
114
  }
116
115
 
116
+ type SqliteErrorType = typeof SqliteErrorClass;
117
+
117
118
  declare namespace Database {
118
119
  interface RunResult {
119
120
  changes: number;
@@ -153,7 +154,7 @@ declare namespace Database {
153
154
  progress: (info: BackupMetadata) => number;
154
155
  }
155
156
 
156
- type SqliteError = typeof SqliteError;
157
+ type SqliteError = SqliteErrorType;
157
158
  type Statement<BindParameters extends unknown[] | {} = unknown[], Result = unknown> = BindParameters extends unknown[] ?
158
159
  BetterSqlite3MultipleCiphers.Statement<BindParameters, Result> :
159
160
  BetterSqlite3MultipleCiphers.Statement<[BindParameters], Result>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "11.7.0",
3
+ "version": "11.8.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>",
@@ -28,7 +28,7 @@
28
28
  "fs-extra": "^11.1.1",
29
29
  "mocha": "^10.2.0",
30
30
  "nodemark": "^0.3.0",
31
- "prebuild": "^13.0.0",
31
+ "prebuild": "^13.0.1",
32
32
  "sqlite": "^5.0.1",
33
33
  "sqlite3": "^5.1.6"
34
34
  },