better-sqlite3-multiple-ciphers 11.5.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.
- package/README.md +4 -4
- package/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +43885 -1334
- package/deps/sqlite3/sqlite3.h +62 -114
- package/index.d.ts +6 -5
- package/package.json +2 -2
- package/src/better_sqlite3.cpp +25 -4
- package/src/better_sqlite3.hpp +22 -22
package/deps/sqlite3/sqlite3.h
CHANGED
|
@@ -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-
|
|
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
|
|
33
|
-
#define SQLITE3MC_VERSION_MINOR
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
32
|
+
#define SQLITE3MC_VERSION_MAJOR 2
|
|
33
|
+
#define SQLITE3MC_VERSION_MINOR 0
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers
|
|
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.
|
|
196
|
-
#define SQLITE_VERSION_NUMBER
|
|
197
|
-
#define SQLITE_SOURCE_ID "
|
|
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
|
|
@@ -698,6 +698,13 @@ SQLITE_API int sqlite3_exec(
|
|
|
698
698
|
** filesystem supports doing multiple write operations atomically when those
|
|
699
699
|
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
|
|
700
700
|
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
|
|
701
|
+
**
|
|
702
|
+
** The SQLITE_IOCAP_SUBPAGE_READ property means that it is ok to read
|
|
703
|
+
** from the database file in amounts that are not a multiple of the
|
|
704
|
+
** page size and that do not begin at a page boundary. Without this
|
|
705
|
+
** property, SQLite is careful to only do full-page reads and write
|
|
706
|
+
** on aligned pages, with the one exception that it will do a sub-page
|
|
707
|
+
** read of the first page to access the database header.
|
|
701
708
|
*/
|
|
702
709
|
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
|
703
710
|
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
|
@@ -714,6 +721,7 @@ SQLITE_API int sqlite3_exec(
|
|
|
714
721
|
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
|
715
722
|
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
|
716
723
|
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
|
|
724
|
+
#define SQLITE_IOCAP_SUBPAGE_READ 0x00008000
|
|
717
725
|
|
|
718
726
|
/*
|
|
719
727
|
** CAPI3REF: File Locking Levels
|
|
@@ -860,6 +868,7 @@ struct sqlite3_file {
|
|
|
860
868
|
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
|
|
861
869
|
** <li> [SQLITE_IOCAP_IMMUTABLE]
|
|
862
870
|
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
|
|
871
|
+
** <li> [SQLITE_IOCAP_SUBPAGE_READ]
|
|
863
872
|
** </ul>
|
|
864
873
|
**
|
|
865
874
|
** The SQLITE_IOCAP_ATOMIC property means that all writes of
|
|
@@ -1137,6 +1146,11 @@ struct sqlite3_io_methods {
|
|
|
1137
1146
|
** pointed to by the pArg argument. This capability is used during testing
|
|
1138
1147
|
** and only needs to be supported when SQLITE_TEST is defined.
|
|
1139
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
|
+
**
|
|
1140
1154
|
** <li>[[SQLITE_FCNTL_WAL_BLOCK]]
|
|
1141
1155
|
** The [SQLITE_FCNTL_WAL_BLOCK] is a signal to the VFS layer that it might
|
|
1142
1156
|
** be advantageous to block on the next WAL lock if the lock is not immediately
|
|
@@ -1290,6 +1304,7 @@ struct sqlite3_io_methods {
|
|
|
1290
1304
|
#define SQLITE_FCNTL_EXTERNAL_READER 40
|
|
1291
1305
|
#define SQLITE_FCNTL_CKSM_FILE 41
|
|
1292
1306
|
#define SQLITE_FCNTL_RESET_CACHE 42
|
|
1307
|
+
#define SQLITE_FCNTL_NULL_IO 43
|
|
1293
1308
|
|
|
1294
1309
|
/* deprecated names */
|
|
1295
1310
|
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
|
@@ -2668,10 +2683,14 @@ SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
|
|
|
2668
2683
|
** deleted by the most recently completed INSERT, UPDATE or DELETE
|
|
2669
2684
|
** statement on the database connection specified by the only parameter.
|
|
2670
2685
|
** The two functions are identical except for the type of the return value
|
|
2671
|
-
** 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,
|
|
2672
2687
|
** or DELETE is greater than the maximum value supported by type "int", then
|
|
2673
2688
|
** the return value of sqlite3_changes() is undefined. ^Executing any other
|
|
2674
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.
|
|
2675
2694
|
**
|
|
2676
2695
|
** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
|
|
2677
2696
|
** considered - auxiliary changes caused by [CREATE TRIGGER | triggers],
|
|
@@ -4231,11 +4250,22 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|
|
4231
4250
|
** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler
|
|
4232
4251
|
** to return an error (error code SQLITE_ERROR) if the statement uses
|
|
4233
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.
|
|
4234
4263
|
** </dl>
|
|
4235
4264
|
*/
|
|
4236
4265
|
#define SQLITE_PREPARE_PERSISTENT 0x01
|
|
4237
4266
|
#define SQLITE_PREPARE_NORMALIZE 0x02
|
|
4238
4267
|
#define SQLITE_PREPARE_NO_VTAB 0x04
|
|
4268
|
+
#define SQLITE_PREPARE_DONT_LOG 0x10
|
|
4239
4269
|
|
|
4240
4270
|
/*
|
|
4241
4271
|
** CAPI3REF: Compiling An SQL Statement
|
|
@@ -10926,7 +10956,7 @@ SQLITE_API int sqlite3_deserialize(
|
|
|
10926
10956
|
#ifdef __cplusplus
|
|
10927
10957
|
} /* End of the 'extern "C"' block */
|
|
10928
10958
|
#endif
|
|
10929
|
-
#endif
|
|
10959
|
+
/* #endif for SQLITE3_H will be added by mksqlite3.tcl */
|
|
10930
10960
|
|
|
10931
10961
|
/******** Begin file sqlite3rtree.h *********/
|
|
10932
10962
|
/*
|
|
@@ -13177,14 +13207,29 @@ struct Fts5PhraseIter {
|
|
|
13177
13207
|
** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
|
|
13178
13208
|
** output variable (*ppToken) is set to point to a buffer containing the
|
|
13179
13209
|
** matching document token, and (*pnToken) to the size of that buffer in
|
|
13180
|
-
** bytes.
|
|
13181
|
-
** prefix query term. In that case both output variables are always set
|
|
13182
|
-
** to 0.
|
|
13210
|
+
** bytes.
|
|
13183
13211
|
**
|
|
13184
13212
|
** The output text is not a copy of the document text that was tokenized.
|
|
13185
13213
|
** It is the output of the tokenizer module. For tokendata=1 tables, this
|
|
13186
13214
|
** includes any embedded 0x00 and trailing data.
|
|
13187
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
|
+
**
|
|
13188
13233
|
** This API can be quite slow if used with an FTS5 table created with the
|
|
13189
13234
|
** "detail=none" or "detail=column" option.
|
|
13190
13235
|
**
|
|
@@ -13618,110 +13663,12 @@ struct fts5_api {
|
|
|
13618
13663
|
#endif /* _FTS5_H */
|
|
13619
13664
|
|
|
13620
13665
|
/******** End of fts5.h *********/
|
|
13666
|
+
#endif /* SQLITE3_H */
|
|
13621
13667
|
/*** End of #include "sqlite3.h" ***/
|
|
13622
13668
|
|
|
13623
13669
|
|
|
13624
13670
|
#ifdef SQLITE_USER_AUTHENTICATION
|
|
13625
|
-
|
|
13626
|
-
/*** Begin of #include "sqlite3userauth.h" ***/
|
|
13627
|
-
/*
|
|
13628
|
-
** 2014-09-08
|
|
13629
|
-
**
|
|
13630
|
-
** The author disclaims copyright to this source code. In place of
|
|
13631
|
-
** a legal notice, here is a blessing:
|
|
13632
|
-
**
|
|
13633
|
-
** May you do good and not evil.
|
|
13634
|
-
** May you find forgiveness for yourself and forgive others.
|
|
13635
|
-
** May you share freely, never taking more than you give.
|
|
13636
|
-
**
|
|
13637
|
-
*************************************************************************
|
|
13638
|
-
**
|
|
13639
|
-
** This file contains the application interface definitions for the
|
|
13640
|
-
** user-authentication extension feature.
|
|
13641
|
-
**
|
|
13642
|
-
** To compile with the user-authentication feature, append this file to
|
|
13643
|
-
** end of an SQLite amalgamation header file ("sqlite3.h"), then add
|
|
13644
|
-
** the SQLITE_USER_AUTHENTICATION compile-time option. See the
|
|
13645
|
-
** user-auth.txt file in the same source directory as this file for
|
|
13646
|
-
** additional information.
|
|
13647
|
-
*/
|
|
13648
|
-
#ifdef SQLITE_USER_AUTHENTICATION
|
|
13649
|
-
|
|
13650
|
-
#ifdef __cplusplus
|
|
13651
|
-
extern "C" {
|
|
13652
|
-
#endif
|
|
13653
|
-
|
|
13654
|
-
/*
|
|
13655
|
-
** If a database contains the SQLITE_USER table, then the
|
|
13656
|
-
** sqlite3_user_authenticate() interface must be invoked with an
|
|
13657
|
-
** appropriate username and password prior to enable read and write
|
|
13658
|
-
** access to the database.
|
|
13659
|
-
**
|
|
13660
|
-
** Return SQLITE_OK on success or SQLITE_ERROR if the username/password
|
|
13661
|
-
** combination is incorrect or unknown.
|
|
13662
|
-
**
|
|
13663
|
-
** If the SQLITE_USER table is not present in the database file, then
|
|
13664
|
-
** this interface is a harmless no-op returnning SQLITE_OK.
|
|
13665
|
-
*/
|
|
13666
|
-
SQLITE_API int sqlite3_user_authenticate(
|
|
13667
|
-
sqlite3 *db, /* The database connection */
|
|
13668
|
-
const char *zUsername, /* Username */
|
|
13669
|
-
const char *aPW, /* Password or credentials */
|
|
13670
|
-
int nPW /* Number of bytes in aPW[] */
|
|
13671
|
-
);
|
|
13672
|
-
|
|
13673
|
-
/*
|
|
13674
|
-
** The sqlite3_user_add() interface can be used (by an admin user only)
|
|
13675
|
-
** to create a new user. When called on a no-authentication-required
|
|
13676
|
-
** database, this routine converts the database into an authentication-
|
|
13677
|
-
** required database, automatically makes the added user an
|
|
13678
|
-
** administrator, and logs in the current connection as that user.
|
|
13679
|
-
** The sqlite3_user_add() interface only works for the "main" database, not
|
|
13680
|
-
** for any ATTACH-ed databases. Any call to sqlite3_user_add() by a
|
|
13681
|
-
** non-admin user results in an error.
|
|
13682
|
-
*/
|
|
13683
|
-
SQLITE_API int sqlite3_user_add(
|
|
13684
|
-
sqlite3 *db, /* Database connection */
|
|
13685
|
-
const char *zUsername, /* Username to be added */
|
|
13686
|
-
const char *aPW, /* Password or credentials */
|
|
13687
|
-
int nPW, /* Number of bytes in aPW[] */
|
|
13688
|
-
int isAdmin /* True to give new user admin privilege */
|
|
13689
|
-
);
|
|
13690
|
-
|
|
13691
|
-
/*
|
|
13692
|
-
** The sqlite3_user_change() interface can be used to change a users
|
|
13693
|
-
** login credentials or admin privilege. Any user can change their own
|
|
13694
|
-
** login credentials. Only an admin user can change another users login
|
|
13695
|
-
** credentials or admin privilege setting. No user may change their own
|
|
13696
|
-
** admin privilege setting.
|
|
13697
|
-
*/
|
|
13698
|
-
SQLITE_API int sqlite3_user_change(
|
|
13699
|
-
sqlite3 *db, /* Database connection */
|
|
13700
|
-
const char *zUsername, /* Username to change */
|
|
13701
|
-
const char *aPW, /* New password or credentials */
|
|
13702
|
-
int nPW, /* Number of bytes in aPW[] */
|
|
13703
|
-
int isAdmin /* Modified admin privilege for the user */
|
|
13704
|
-
);
|
|
13705
|
-
|
|
13706
|
-
/*
|
|
13707
|
-
** The sqlite3_user_delete() interface can be used (by an admin user only)
|
|
13708
|
-
** to delete a user. The currently logged-in user cannot be deleted,
|
|
13709
|
-
** which guarantees that there is always an admin user and hence that
|
|
13710
|
-
** the database cannot be converted into a no-authentication-required
|
|
13711
|
-
** database.
|
|
13712
|
-
*/
|
|
13713
|
-
SQLITE_API int sqlite3_user_delete(
|
|
13714
|
-
sqlite3 *db, /* Database connection */
|
|
13715
|
-
const char *zUsername /* Username to remove */
|
|
13716
|
-
);
|
|
13717
|
-
|
|
13718
|
-
#ifdef __cplusplus
|
|
13719
|
-
} /* end of the 'extern "C"' block */
|
|
13720
|
-
#endif
|
|
13721
|
-
|
|
13722
|
-
#endif /* SQLITE_USER_AUTHENTICATION */
|
|
13723
|
-
/*** End of #include "sqlite3userauth.h" ***/
|
|
13724
|
-
|
|
13671
|
+
#undef SQLITE_USER_AUTHENTICATION
|
|
13725
13672
|
#endif
|
|
13726
13673
|
|
|
13727
13674
|
/*
|
|
@@ -13734,7 +13681,8 @@ SQLITE_API int sqlite3_user_delete(
|
|
|
13734
13681
|
#define CODEC_TYPE_SQLCIPHER 4
|
|
13735
13682
|
#define CODEC_TYPE_RC4 5
|
|
13736
13683
|
#define CODEC_TYPE_ASCON128 6
|
|
13737
|
-
#define
|
|
13684
|
+
#define CODEC_TYPE_AEGIS 7
|
|
13685
|
+
#define CODEC_TYPE_MAX_BUILTIN 7
|
|
13738
13686
|
|
|
13739
13687
|
/*
|
|
13740
13688
|
** Definition of API functions
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for better-sqlite3-multiple-ciphers 11.
|
|
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
|
|
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 =
|
|
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.
|
|
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.
|
|
31
|
+
"prebuild": "^13.0.1",
|
|
32
32
|
"sqlite": "^5.0.1",
|
|
33
33
|
"sqlite3": "^5.1.6"
|
|
34
34
|
},
|
package/src/better_sqlite3.cpp
CHANGED
|
@@ -209,6 +209,10 @@ CS::CS (v8::Isolate * isolate)
|
|
|
209
209
|
SetCode(isolate, SQLITE_WARNING, "SQLITE_WARNING");
|
|
210
210
|
SetCode(isolate, SQLITE_ROW, "SQLITE_ROW");
|
|
211
211
|
SetCode(isolate, SQLITE_DONE, "SQLITE_DONE");
|
|
212
|
+
|
|
213
|
+
SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ");
|
|
214
|
+
SetCode(isolate, SQLITE_ERROR_RETRY, "SQLITE_ERROR_RETRY");
|
|
215
|
+
SetCode(isolate, SQLITE_ERROR_SNAPSHOT, "SQLITE_ERROR_SNAPSHOT");
|
|
212
216
|
SetCode(isolate, SQLITE_IOERR_READ, "SQLITE_IOERR_READ");
|
|
213
217
|
SetCode(isolate, SQLITE_IOERR_SHORT_READ, "SQLITE_IOERR_SHORT_READ");
|
|
214
218
|
SetCode(isolate, SQLITE_IOERR_WRITE, "SQLITE_IOERR_WRITE");
|
|
@@ -237,18 +241,31 @@ CS::CS (v8::Isolate * isolate)
|
|
|
237
241
|
SetCode(isolate, SQLITE_IOERR_CONVPATH, "SQLITE_IOERR_CONVPATH");
|
|
238
242
|
SetCode(isolate, SQLITE_IOERR_VNODE, "SQLITE_IOERR_VNODE");
|
|
239
243
|
SetCode(isolate, SQLITE_IOERR_AUTH, "SQLITE_IOERR_AUTH");
|
|
244
|
+
SetCode(isolate, SQLITE_IOERR_BEGIN_ATOMIC, "SQLITE_IOERR_BEGIN_ATOMIC");
|
|
245
|
+
SetCode(isolate, SQLITE_IOERR_COMMIT_ATOMIC, "SQLITE_IOERR_COMMIT_ATOMIC");
|
|
246
|
+
SetCode(isolate, SQLITE_IOERR_ROLLBACK_ATOMIC, "SQLITE_IOERR_ROLLBACK_ATOMIC");
|
|
247
|
+
SetCode(isolate, SQLITE_IOERR_DATA, "SQLITE_IOERR_DATA");
|
|
248
|
+
SetCode(isolate, SQLITE_IOERR_CORRUPTFS, "SQLITE_IOERR_CORRUPTFS");
|
|
249
|
+
SetCode(isolate, SQLITE_IOERR_IN_PAGE, "SQLITE_IOERR_IN_PAGE");
|
|
240
250
|
SetCode(isolate, SQLITE_LOCKED_SHAREDCACHE, "SQLITE_LOCKED_SHAREDCACHE");
|
|
251
|
+
SetCode(isolate, SQLITE_LOCKED_VTAB, "SQLITE_LOCKED_VTAB");
|
|
241
252
|
SetCode(isolate, SQLITE_BUSY_RECOVERY, "SQLITE_BUSY_RECOVERY");
|
|
242
253
|
SetCode(isolate, SQLITE_BUSY_SNAPSHOT, "SQLITE_BUSY_SNAPSHOT");
|
|
243
254
|
SetCode(isolate, SQLITE_CANTOPEN_NOTEMPDIR, "SQLITE_CANTOPEN_NOTEMPDIR");
|
|
244
255
|
SetCode(isolate, SQLITE_CANTOPEN_ISDIR, "SQLITE_CANTOPEN_ISDIR");
|
|
245
256
|
SetCode(isolate, SQLITE_CANTOPEN_FULLPATH, "SQLITE_CANTOPEN_FULLPATH");
|
|
246
257
|
SetCode(isolate, SQLITE_CANTOPEN_CONVPATH, "SQLITE_CANTOPEN_CONVPATH");
|
|
258
|
+
SetCode(isolate, SQLITE_CANTOPEN_DIRTYWAL, "SQLITE_CANTOPEN_DIRTYWAL");
|
|
259
|
+
SetCode(isolate, SQLITE_CANTOPEN_SYMLINK, "SQLITE_CANTOPEN_SYMLINK");
|
|
247
260
|
SetCode(isolate, SQLITE_CORRUPT_VTAB, "SQLITE_CORRUPT_VTAB");
|
|
261
|
+
SetCode(isolate, SQLITE_CORRUPT_SEQUENCE, "SQLITE_CORRUPT_SEQUENCE");
|
|
262
|
+
SetCode(isolate, SQLITE_CORRUPT_INDEX, "SQLITE_CORRUPT_INDEX");
|
|
248
263
|
SetCode(isolate, SQLITE_READONLY_RECOVERY, "SQLITE_READONLY_RECOVERY");
|
|
249
264
|
SetCode(isolate, SQLITE_READONLY_CANTLOCK, "SQLITE_READONLY_CANTLOCK");
|
|
250
265
|
SetCode(isolate, SQLITE_READONLY_ROLLBACK, "SQLITE_READONLY_ROLLBACK");
|
|
251
266
|
SetCode(isolate, SQLITE_READONLY_DBMOVED, "SQLITE_READONLY_DBMOVED");
|
|
267
|
+
SetCode(isolate, SQLITE_READONLY_CANTINIT, "SQLITE_READONLY_CANTINIT");
|
|
268
|
+
SetCode(isolate, SQLITE_READONLY_DIRECTORY, "SQLITE_READONLY_DIRECTORY");
|
|
252
269
|
SetCode(isolate, SQLITE_ABORT_ROLLBACK, "SQLITE_ABORT_ROLLBACK");
|
|
253
270
|
SetCode(isolate, SQLITE_CONSTRAINT_CHECK, "SQLITE_CONSTRAINT_CHECK");
|
|
254
271
|
SetCode(isolate, SQLITE_CONSTRAINT_COMMITHOOK, "SQLITE_CONSTRAINT_COMMITHOOK");
|
|
@@ -260,21 +277,25 @@ CS::CS (v8::Isolate * isolate)
|
|
|
260
277
|
SetCode(isolate, SQLITE_CONSTRAINT_UNIQUE, "SQLITE_CONSTRAINT_UNIQUE");
|
|
261
278
|
SetCode(isolate, SQLITE_CONSTRAINT_VTAB, "SQLITE_CONSTRAINT_VTAB");
|
|
262
279
|
SetCode(isolate, SQLITE_CONSTRAINT_ROWID, "SQLITE_CONSTRAINT_ROWID");
|
|
280
|
+
SetCode(isolate, SQLITE_CONSTRAINT_PINNED, "SQLITE_CONSTRAINT_PINNED");
|
|
281
|
+
SetCode(isolate, SQLITE_CONSTRAINT_DATATYPE, "SQLITE_CONSTRAINT_DATATYPE");
|
|
263
282
|
SetCode(isolate, SQLITE_NOTICE_RECOVER_WAL, "SQLITE_NOTICE_RECOVER_WAL");
|
|
264
283
|
SetCode(isolate, SQLITE_NOTICE_RECOVER_ROLLBACK, "SQLITE_NOTICE_RECOVER_ROLLBACK");
|
|
284
|
+
SetCode(isolate, SQLITE_NOTICE_RBU, "SQLITE_NOTICE_RBU");
|
|
265
285
|
SetCode(isolate, SQLITE_WARNING_AUTOINDEX, "SQLITE_WARNING_AUTOINDEX");
|
|
266
286
|
SetCode(isolate, SQLITE_AUTH_USER, "SQLITE_AUTH_USER");
|
|
267
287
|
SetCode(isolate, SQLITE_OK_LOAD_PERMANENTLY, "SQLITE_OK_LOAD_PERMANENTLY");
|
|
288
|
+
SetCode(isolate, SQLITE_OK_SYMLINK, "SQLITE_OK_SYMLINK");
|
|
268
289
|
}
|
|
269
|
-
#line
|
|
290
|
+
#line 161 "./src/util/constants.lzz"
|
|
270
291
|
void CS::SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str)
|
|
271
|
-
#line
|
|
292
|
+
#line 161 "./src/util/constants.lzz"
|
|
272
293
|
{
|
|
273
294
|
constant.Reset(isolate, InternalizedFromLatin1(isolate, str));
|
|
274
295
|
}
|
|
275
|
-
#line
|
|
296
|
+
#line 165 "./src/util/constants.lzz"
|
|
276
297
|
void CS::SetCode (v8::Isolate * isolate, int code, char const * str)
|
|
277
|
-
#line
|
|
298
|
+
#line 165 "./src/util/constants.lzz"
|
|
278
299
|
{
|
|
279
300
|
codes.emplace(std::piecewise_construct,
|
|
280
301
|
std::forward_as_tuple(code),
|
package/src/better_sqlite3.hpp
CHANGED
|
@@ -68,49 +68,49 @@ public:
|
|
|
68
68
|
v8::Local <v8::String> Code (v8::Isolate * isolate, int code);
|
|
69
69
|
#line 10 "./src/util/constants.lzz"
|
|
70
70
|
explicit CS (v8::Isolate * isolate);
|
|
71
|
-
#line
|
|
71
|
+
#line 140 "./src/util/constants.lzz"
|
|
72
72
|
v8::Global <v8::String> database;
|
|
73
|
-
#line
|
|
73
|
+
#line 141 "./src/util/constants.lzz"
|
|
74
74
|
v8::Global <v8::String> reader;
|
|
75
|
-
#line
|
|
75
|
+
#line 142 "./src/util/constants.lzz"
|
|
76
76
|
v8::Global <v8::String> source;
|
|
77
|
-
#line
|
|
77
|
+
#line 143 "./src/util/constants.lzz"
|
|
78
78
|
v8::Global <v8::String> memory;
|
|
79
|
-
#line
|
|
79
|
+
#line 144 "./src/util/constants.lzz"
|
|
80
80
|
v8::Global <v8::String> readonly;
|
|
81
|
-
#line
|
|
81
|
+
#line 145 "./src/util/constants.lzz"
|
|
82
82
|
v8::Global <v8::String> name;
|
|
83
|
-
#line
|
|
83
|
+
#line 146 "./src/util/constants.lzz"
|
|
84
84
|
v8::Global <v8::String> next;
|
|
85
|
-
#line
|
|
85
|
+
#line 147 "./src/util/constants.lzz"
|
|
86
86
|
v8::Global <v8::String> length;
|
|
87
|
-
#line
|
|
87
|
+
#line 148 "./src/util/constants.lzz"
|
|
88
88
|
v8::Global <v8::String> done;
|
|
89
|
-
#line
|
|
89
|
+
#line 149 "./src/util/constants.lzz"
|
|
90
90
|
v8::Global <v8::String> value;
|
|
91
|
-
#line
|
|
91
|
+
#line 150 "./src/util/constants.lzz"
|
|
92
92
|
v8::Global <v8::String> changes;
|
|
93
|
-
#line
|
|
93
|
+
#line 151 "./src/util/constants.lzz"
|
|
94
94
|
v8::Global <v8::String> lastInsertRowid;
|
|
95
|
-
#line
|
|
95
|
+
#line 152 "./src/util/constants.lzz"
|
|
96
96
|
v8::Global <v8::String> statement;
|
|
97
|
-
#line
|
|
97
|
+
#line 153 "./src/util/constants.lzz"
|
|
98
98
|
v8::Global <v8::String> column;
|
|
99
|
-
#line
|
|
99
|
+
#line 154 "./src/util/constants.lzz"
|
|
100
100
|
v8::Global <v8::String> table;
|
|
101
|
-
#line
|
|
101
|
+
#line 155 "./src/util/constants.lzz"
|
|
102
102
|
v8::Global <v8::String> type;
|
|
103
|
-
#line
|
|
103
|
+
#line 156 "./src/util/constants.lzz"
|
|
104
104
|
v8::Global <v8::String> totalPages;
|
|
105
|
-
#line
|
|
105
|
+
#line 157 "./src/util/constants.lzz"
|
|
106
106
|
v8::Global <v8::String> remainingPages;
|
|
107
|
-
#line
|
|
107
|
+
#line 159 "./src/util/constants.lzz"
|
|
108
108
|
private:
|
|
109
|
-
#line
|
|
109
|
+
#line 161 "./src/util/constants.lzz"
|
|
110
110
|
static void SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str);
|
|
111
|
-
#line
|
|
111
|
+
#line 165 "./src/util/constants.lzz"
|
|
112
112
|
void SetCode (v8::Isolate * isolate, int code, char const * str);
|
|
113
|
-
#line
|
|
113
|
+
#line 171 "./src/util/constants.lzz"
|
|
114
114
|
std::unordered_map <int, v8::Global<v8::String> > codes;
|
|
115
115
|
};
|
|
116
116
|
#line 1 "./src/util/bind-map.lzz"
|