better-sqlite3-multiple-ciphers 9.2.2 → 9.3.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 +5 -5
- package/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +5497 -2523
- package/deps/sqlite3/sqlite3.h +76 -21
- package/package.json +1 -1
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-2024 Ulrich Telle
|
|
24
24
|
** License: MIT
|
|
25
25
|
*/
|
|
26
26
|
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
33
33
|
#define SQLITE3MC_VERSION_MINOR 8
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 2
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.
|
|
36
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.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.45.0"
|
|
196
|
+
#define SQLITE_VERSION_NUMBER 3045000
|
|
197
|
+
#define SQLITE_SOURCE_ID "2024-01-15 17:01:13 1066602b2b1976fe58b5150777cced894af17c803e068f5918390d6915b46e1d"
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -4000,15 +4000,17 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
|
4000
4000
|
** </ul>
|
|
4001
4001
|
**
|
|
4002
4002
|
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
|
|
4003
|
-
** text that describes the error, as either UTF-8 or UTF-16 respectively
|
|
4003
|
+
** text that describes the error, as either UTF-8 or UTF-16 respectively,
|
|
4004
|
+
** or NULL if no error message is available.
|
|
4004
4005
|
** (See how SQLite handles [invalid UTF] for exceptions to this rule.)
|
|
4005
4006
|
** ^(Memory to hold the error message string is managed internally.
|
|
4006
4007
|
** The application does not need to worry about freeing the result.
|
|
4007
4008
|
** However, the error string might be overwritten or deallocated by
|
|
4008
4009
|
** subsequent calls to other SQLite interface functions.)^
|
|
4009
4010
|
**
|
|
4010
|
-
** ^The sqlite3_errstr() interface returns the English-language text
|
|
4011
|
-
** that describes the [result code], as UTF-8
|
|
4011
|
+
** ^The sqlite3_errstr(E) interface returns the English-language text
|
|
4012
|
+
** that describes the [result code] E, as UTF-8, or NULL if E is not an
|
|
4013
|
+
** result code for which a text error message is available.
|
|
4012
4014
|
** ^(Memory to hold the error message string is managed internally
|
|
4013
4015
|
** and must not be freed by the application)^.
|
|
4014
4016
|
**
|
|
@@ -8083,9 +8085,11 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
|
|
8083
8085
|
**
|
|
8084
8086
|
** ^(Some systems (for example, Windows 95) do not support the operation
|
|
8085
8087
|
** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try()
|
|
8086
|
-
** will always return SQLITE_BUSY.
|
|
8087
|
-
** sqlite3_mutex_try() as an optimization so this is acceptable
|
|
8088
|
-
** behavior.
|
|
8088
|
+
** will always return SQLITE_BUSY. In most cases the SQLite core only uses
|
|
8089
|
+
** sqlite3_mutex_try() as an optimization, so this is acceptable
|
|
8090
|
+
** behavior. The exceptions are unix builds that set the
|
|
8091
|
+
** SQLITE_ENABLE_SETLK_TIMEOUT build option. In that case a working
|
|
8092
|
+
** sqlite3_mutex_try() is required.)^
|
|
8089
8093
|
**
|
|
8090
8094
|
** ^The sqlite3_mutex_leave() routine exits a mutex that was
|
|
8091
8095
|
** previously entered by the same thread. The behavior
|
|
@@ -8344,6 +8348,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8344
8348
|
#define SQLITE_TESTCTRL_ASSERT 12
|
|
8345
8349
|
#define SQLITE_TESTCTRL_ALWAYS 13
|
|
8346
8350
|
#define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */
|
|
8351
|
+
#define SQLITE_TESTCTRL_JSON_SELFCHECK 14
|
|
8347
8352
|
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
|
|
8348
8353
|
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
|
|
8349
8354
|
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
|
|
@@ -12857,8 +12862,11 @@ struct Fts5PhraseIter {
|
|
|
12857
12862
|
** created with the "columnsize=0" option.
|
|
12858
12863
|
**
|
|
12859
12864
|
** xColumnText:
|
|
12860
|
-
**
|
|
12861
|
-
**
|
|
12865
|
+
** If parameter iCol is less than zero, or greater than or equal to the
|
|
12866
|
+
** number of columns in the table, SQLITE_RANGE is returned.
|
|
12867
|
+
**
|
|
12868
|
+
** Otherwise, this function attempts to retrieve the text of column iCol of
|
|
12869
|
+
** the current document. If successful, (*pz) is set to point to a buffer
|
|
12862
12870
|
** containing the text in utf-8 encoding, (*pn) is set to the size in bytes
|
|
12863
12871
|
** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
|
|
12864
12872
|
** if an error occurs, an SQLite error code is returned and the final values
|
|
@@ -12868,8 +12876,10 @@ struct Fts5PhraseIter {
|
|
|
12868
12876
|
** Returns the number of phrases in the current query expression.
|
|
12869
12877
|
**
|
|
12870
12878
|
** xPhraseSize:
|
|
12871
|
-
**
|
|
12872
|
-
**
|
|
12879
|
+
** If parameter iCol is less than zero, or greater than or equal to the
|
|
12880
|
+
** number of phrases in the current query, as returned by xPhraseCount,
|
|
12881
|
+
** 0 is returned. Otherwise, this function returns the number of tokens in
|
|
12882
|
+
** phrase iPhrase of the query. Phrases are numbered starting from zero.
|
|
12873
12883
|
**
|
|
12874
12884
|
** xInstCount:
|
|
12875
12885
|
** Set *pnInst to the total number of occurrences of all phrases within
|
|
@@ -12885,12 +12895,13 @@ struct Fts5PhraseIter {
|
|
|
12885
12895
|
** Query for the details of phrase match iIdx within the current row.
|
|
12886
12896
|
** Phrase matches are numbered starting from zero, so the iIdx argument
|
|
12887
12897
|
** should be greater than or equal to zero and smaller than the value
|
|
12888
|
-
** output by xInstCount().
|
|
12898
|
+
** output by xInstCount(). If iIdx is less than zero or greater than
|
|
12899
|
+
** or equal to the value returned by xInstCount(), SQLITE_RANGE is returned.
|
|
12889
12900
|
**
|
|
12890
|
-
**
|
|
12901
|
+
** Otherwise, output parameter *piPhrase is set to the phrase number, *piCol
|
|
12891
12902
|
** to the column in which it occurs and *piOff the token offset of the
|
|
12892
|
-
** first token of the phrase.
|
|
12893
|
-
** code (i.e. SQLITE_NOMEM) if an error occurs.
|
|
12903
|
+
** first token of the phrase. SQLITE_OK is returned if successful, or an
|
|
12904
|
+
** error code (i.e. SQLITE_NOMEM) if an error occurs.
|
|
12894
12905
|
**
|
|
12895
12906
|
** This API can be quite slow if used with an FTS5 table created with the
|
|
12896
12907
|
** "detail=none" or "detail=column" option.
|
|
@@ -12916,6 +12927,10 @@ struct Fts5PhraseIter {
|
|
|
12916
12927
|
** Invoking Api.xUserData() returns a copy of the pointer passed as
|
|
12917
12928
|
** the third argument to pUserData.
|
|
12918
12929
|
**
|
|
12930
|
+
** If parameter iPhrase is less than zero, or greater than or equal to
|
|
12931
|
+
** the number of phrases in the query, as returned by xPhraseCount(),
|
|
12932
|
+
** this function returns SQLITE_RANGE.
|
|
12933
|
+
**
|
|
12919
12934
|
** If the callback function returns any value other than SQLITE_OK, the
|
|
12920
12935
|
** query is abandoned and the xQueryPhrase function returns immediately.
|
|
12921
12936
|
** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK.
|
|
@@ -13030,9 +13045,42 @@ struct Fts5PhraseIter {
|
|
|
13030
13045
|
**
|
|
13031
13046
|
** xPhraseNextColumn()
|
|
13032
13047
|
** See xPhraseFirstColumn above.
|
|
13048
|
+
**
|
|
13049
|
+
** xQueryToken(pFts5, iPhrase, iToken, ppToken, pnToken)
|
|
13050
|
+
** This is used to access token iToken of phrase iPhrase of the current
|
|
13051
|
+
** query. Before returning, output parameter *ppToken is set to point
|
|
13052
|
+
** to a buffer containing the requested token, and *pnToken to the
|
|
13053
|
+
** size of this buffer in bytes.
|
|
13054
|
+
**
|
|
13055
|
+
** If iPhrase or iToken are less than zero, or if iPhrase is greater than
|
|
13056
|
+
** or equal to the number of phrases in the query as reported by
|
|
13057
|
+
** xPhraseCount(), or if iToken is equal to or greater than the number of
|
|
13058
|
+
** tokens in the phrase, SQLITE_RANGE is returned and *ppToken and *pnToken
|
|
13059
|
+
are both zeroed.
|
|
13060
|
+
**
|
|
13061
|
+
** The output text is not a copy of the query text that specified the
|
|
13062
|
+
** token. It is the output of the tokenizer module. For tokendata=1
|
|
13063
|
+
** tables, this includes any embedded 0x00 and trailing data.
|
|
13064
|
+
**
|
|
13065
|
+
** xInstToken(pFts5, iIdx, iToken, ppToken, pnToken)
|
|
13066
|
+
** This is used to access token iToken of phrase hit iIdx within the
|
|
13067
|
+
** current row. If iIdx is less than zero or greater than or equal to the
|
|
13068
|
+
** value returned by xInstCount(), SQLITE_RANGE is returned. Otherwise,
|
|
13069
|
+
** output variable (*ppToken) is set to point to a buffer containing the
|
|
13070
|
+
** matching document token, and (*pnToken) to the size of that buffer in
|
|
13071
|
+
** bytes. This API is not available if the specified token matches a
|
|
13072
|
+
** prefix query term. In that case both output variables are always set
|
|
13073
|
+
** to 0.
|
|
13074
|
+
**
|
|
13075
|
+
** The output text is not a copy of the document text that was tokenized.
|
|
13076
|
+
** It is the output of the tokenizer module. For tokendata=1 tables, this
|
|
13077
|
+
** includes any embedded 0x00 and trailing data.
|
|
13078
|
+
**
|
|
13079
|
+
** This API can be quite slow if used with an FTS5 table created with the
|
|
13080
|
+
** "detail=none" or "detail=column" option.
|
|
13033
13081
|
*/
|
|
13034
13082
|
struct Fts5ExtensionApi {
|
|
13035
|
-
int iVersion; /* Currently always set to
|
|
13083
|
+
int iVersion; /* Currently always set to 3 */
|
|
13036
13084
|
|
|
13037
13085
|
void *(*xUserData)(Fts5Context*);
|
|
13038
13086
|
|
|
@@ -13067,6 +13115,13 @@ struct Fts5ExtensionApi {
|
|
|
13067
13115
|
|
|
13068
13116
|
int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
|
|
13069
13117
|
void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
|
|
13118
|
+
|
|
13119
|
+
/* Below this point are iVersion>=3 only */
|
|
13120
|
+
int (*xQueryToken)(Fts5Context*,
|
|
13121
|
+
int iPhrase, int iToken,
|
|
13122
|
+
const char **ppToken, int *pnToken
|
|
13123
|
+
);
|
|
13124
|
+
int (*xInstToken)(Fts5Context*, int iIdx, int iToken, const char**, int*);
|
|
13070
13125
|
};
|
|
13071
13126
|
|
|
13072
13127
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3-multiple-ciphers",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.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>",
|