better-sqlite3-multiple-ciphers 9.0.0 → 9.1.2-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.
- package/README.md +24 -13
- package/deps/setup.ps1 +1 -1
- package/deps/sqlite3/sqlite3.c +6227 -2464
- package/deps/sqlite3/sqlite3.h +227 -46
- package/deps/sqlite3/sqlite3ext.h +6 -0
- package/package.json +1 -1
package/deps/sqlite3/sqlite3.h
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
** Purpose: Header file for SQLite3 Multiple Ciphers support
|
|
4
4
|
** Author: Ulrich Telle
|
|
5
5
|
** Created: 2020-03-01
|
|
6
|
-
** Copyright: (c) 2019-
|
|
6
|
+
** Copyright: (c) 2019-2023 Ulrich Telle
|
|
7
7
|
** License: MIT
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
#define SQLITE3MC_VERSION_H_
|
|
31
31
|
|
|
32
32
|
#define SQLITE3MC_VERSION_MAJOR 1
|
|
33
|
-
#define SQLITE3MC_VERSION_MINOR
|
|
34
|
-
#define SQLITE3MC_VERSION_RELEASE
|
|
33
|
+
#define SQLITE3MC_VERSION_MINOR 8
|
|
34
|
+
#define SQLITE3MC_VERSION_RELEASE 0
|
|
35
35
|
#define SQLITE3MC_VERSION_SUBRELEASE 0
|
|
36
|
-
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.
|
|
36
|
+
#define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 1.8.0"
|
|
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 "2023-
|
|
195
|
+
#define SQLITE_VERSION "3.44.1"
|
|
196
|
+
#define SQLITE_VERSION_NUMBER 3044001
|
|
197
|
+
#define SQLITE_SOURCE_ID "2023-11-22 14:18:12 d295f48e8f367b066b881780c98bdf980a1d550397d5ba0b0e49842c95b3e8b4"
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
200
|
** CAPI3REF: Run-Time Library Version Numbers
|
|
@@ -2173,7 +2173,7 @@ struct sqlite3_mem_methods {
|
|
|
2173
2173
|
** is stored in each sorted record and the required column values loaded
|
|
2174
2174
|
** from the database as records are returned in sorted order. The default
|
|
2175
2175
|
** value for this option is to never use this optimization. Specifying a
|
|
2176
|
-
** negative value for this option restores the default
|
|
2176
|
+
** negative value for this option restores the default behavior.
|
|
2177
2177
|
** This option is only available if SQLite is compiled with the
|
|
2178
2178
|
** [SQLITE_ENABLE_SORTER_REFERENCES] compile-time option.
|
|
2179
2179
|
**
|
|
@@ -2348,7 +2348,7 @@ struct sqlite3_mem_methods {
|
|
|
2348
2348
|
** database handle, SQLite checks if this will mean that there are now no
|
|
2349
2349
|
** connections at all to the database. If so, it performs a checkpoint
|
|
2350
2350
|
** operation before closing the connection. This option may be used to
|
|
2351
|
-
** override this
|
|
2351
|
+
** override this behavior. The first parameter passed to this operation
|
|
2352
2352
|
** is an integer - positive to disable checkpoints-on-close, or zero (the
|
|
2353
2353
|
** default) to enable them, and negative to leave the setting unchanged.
|
|
2354
2354
|
** The second parameter is a pointer to an integer
|
|
@@ -4001,6 +4001,7 @@ SQLITE_API void sqlite3_free_filename(sqlite3_filename);
|
|
|
4001
4001
|
**
|
|
4002
4002
|
** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
|
|
4003
4003
|
** text that describes the error, as either UTF-8 or UTF-16 respectively.
|
|
4004
|
+
** (See how SQLite handles [invalid UTF] for exceptions to this rule.)
|
|
4004
4005
|
** ^(Memory to hold the error message string is managed internally.
|
|
4005
4006
|
** The application does not need to worry about freeing the result.
|
|
4006
4007
|
** However, the error string might be overwritten or deallocated by
|
|
@@ -5371,6 +5372,7 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
|
|
|
5371
5372
|
*/
|
|
5372
5373
|
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
|
|
5373
5374
|
|
|
5375
|
+
|
|
5374
5376
|
/*
|
|
5375
5377
|
** CAPI3REF: Create Or Redefine SQL Functions
|
|
5376
5378
|
** KEYWORDS: {function creation routines}
|
|
@@ -5617,13 +5619,27 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5617
5619
|
** </dd>
|
|
5618
5620
|
**
|
|
5619
5621
|
** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd>
|
|
5620
|
-
** The SQLITE_SUBTYPE flag indicates to SQLite that a function
|
|
5622
|
+
** The SQLITE_SUBTYPE flag indicates to SQLite that a function might call
|
|
5621
5623
|
** [sqlite3_value_subtype()] to inspect the sub-types of its arguments.
|
|
5622
|
-
**
|
|
5623
|
-
**
|
|
5624
|
-
**
|
|
5625
|
-
**
|
|
5626
|
-
**
|
|
5624
|
+
** This flag instructs SQLite to omit some corner-case optimizations that
|
|
5625
|
+
** might disrupt the operation of the [sqlite3_value_subtype()] function,
|
|
5626
|
+
** causing it to return zero rather than the correct subtype().
|
|
5627
|
+
** SQL functions that invokes [sqlite3_value_subtype()] should have this
|
|
5628
|
+
** property. If the SQLITE_SUBTYPE property is omitted, then the return
|
|
5629
|
+
** value from [sqlite3_value_subtype()] might sometimes be zero even though
|
|
5630
|
+
** a non-zero subtype was specified by the function argument expression.
|
|
5631
|
+
**
|
|
5632
|
+
** [[SQLITE_RESULT_SUBTYPE]] <dt>SQLITE_RESULT_SUBTYPE</dt><dd>
|
|
5633
|
+
** The SQLITE_RESULT_SUBTYPE flag indicates to SQLite that a function might call
|
|
5634
|
+
** [sqlite3_result_subtype()] to cause a sub-type to be associated with its
|
|
5635
|
+
** result.
|
|
5636
|
+
** Every function that invokes [sqlite3_result_subtype()] should have this
|
|
5637
|
+
** property. If it does not, then the call to [sqlite3_result_subtype()]
|
|
5638
|
+
** might become a no-op if the function is used as term in an
|
|
5639
|
+
** [expression index]. On the other hand, SQL functions that never invoke
|
|
5640
|
+
** [sqlite3_result_subtype()] should avoid setting this property, as the
|
|
5641
|
+
** purpose of this property is to disable certain optimizations that are
|
|
5642
|
+
** incompatible with subtypes.
|
|
5627
5643
|
** </dd>
|
|
5628
5644
|
** </dl>
|
|
5629
5645
|
*/
|
|
@@ -5631,6 +5647,7 @@ SQLITE_API int sqlite3_create_window_function(
|
|
|
5631
5647
|
#define SQLITE_DIRECTONLY 0x000080000
|
|
5632
5648
|
#define SQLITE_SUBTYPE 0x000100000
|
|
5633
5649
|
#define SQLITE_INNOCUOUS 0x000200000
|
|
5650
|
+
#define SQLITE_RESULT_SUBTYPE 0x001000000
|
|
5634
5651
|
|
|
5635
5652
|
/*
|
|
5636
5653
|
** CAPI3REF: Deprecated Functions
|
|
@@ -5827,6 +5844,12 @@ SQLITE_API int sqlite3_value_encoding(sqlite3_value*);
|
|
|
5827
5844
|
** information can be used to pass a limited amount of context from
|
|
5828
5845
|
** one SQL function to another. Use the [sqlite3_result_subtype()]
|
|
5829
5846
|
** routine to set the subtype for the return value of an SQL function.
|
|
5847
|
+
**
|
|
5848
|
+
** Every [application-defined SQL function] that invoke this interface
|
|
5849
|
+
** should include the [SQLITE_SUBTYPE] property in the text
|
|
5850
|
+
** encoding argument when the function is [sqlite3_create_function|registered].
|
|
5851
|
+
** If the [SQLITE_SUBTYPE] property is omitted, then sqlite3_value_subtype()
|
|
5852
|
+
** might return zero instead of the upstream subtype in some corner cases.
|
|
5830
5853
|
*/
|
|
5831
5854
|
SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
|
|
5832
5855
|
|
|
@@ -5925,48 +5948,56 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
|
5925
5948
|
** METHOD: sqlite3_context
|
|
5926
5949
|
**
|
|
5927
5950
|
** These functions may be used by (non-aggregate) SQL functions to
|
|
5928
|
-
** associate
|
|
5929
|
-
** multiple invocations of the same SQL function during
|
|
5930
|
-
** some circumstances the associated
|
|
5931
|
-
** of where this might be useful is in a
|
|
5932
|
-
** function. The compiled version of the regular
|
|
5933
|
-
**
|
|
5951
|
+
** associate auxiliary data with argument values. If the same argument
|
|
5952
|
+
** value is passed to multiple invocations of the same SQL function during
|
|
5953
|
+
** query execution, under some circumstances the associated auxiliary data
|
|
5954
|
+
** might be preserved. An example of where this might be useful is in a
|
|
5955
|
+
** regular-expression matching function. The compiled version of the regular
|
|
5956
|
+
** expression can be stored as auxiliary data associated with the pattern string.
|
|
5934
5957
|
** Then as long as the pattern string remains the same,
|
|
5935
5958
|
** the compiled regular expression can be reused on multiple
|
|
5936
5959
|
** invocations of the same function.
|
|
5937
5960
|
**
|
|
5938
|
-
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the
|
|
5961
|
+
** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the auxiliary data
|
|
5939
5962
|
** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
|
|
5940
5963
|
** value to the application-defined function. ^N is zero for the left-most
|
|
5941
|
-
** function argument. ^If there is no
|
|
5964
|
+
** function argument. ^If there is no auxiliary data
|
|
5942
5965
|
** associated with the function argument, the sqlite3_get_auxdata(C,N) interface
|
|
5943
5966
|
** returns a NULL pointer.
|
|
5944
5967
|
**
|
|
5945
|
-
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as
|
|
5946
|
-
** argument of the application-defined function. ^Subsequent
|
|
5968
|
+
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as auxiliary data for the
|
|
5969
|
+
** N-th argument of the application-defined function. ^Subsequent
|
|
5947
5970
|
** calls to sqlite3_get_auxdata(C,N) return P from the most recent
|
|
5948
|
-
** sqlite3_set_auxdata(C,N,P,X) call if the
|
|
5949
|
-
** NULL if the
|
|
5971
|
+
** sqlite3_set_auxdata(C,N,P,X) call if the auxiliary data is still valid or
|
|
5972
|
+
** NULL if the auxiliary data has been discarded.
|
|
5950
5973
|
** ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL,
|
|
5951
5974
|
** SQLite will invoke the destructor function X with parameter P exactly
|
|
5952
|
-
** once, when the
|
|
5953
|
-
** SQLite is free to discard the
|
|
5975
|
+
** once, when the auxiliary data is discarded.
|
|
5976
|
+
** SQLite is free to discard the auxiliary data at any time, including: <ul>
|
|
5954
5977
|
** <li> ^(when the corresponding function parameter changes)^, or
|
|
5955
5978
|
** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
|
|
5956
5979
|
** SQL statement)^, or
|
|
5957
5980
|
** <li> ^(when sqlite3_set_auxdata() is invoked again on the same
|
|
5958
5981
|
** parameter)^, or
|
|
5959
5982
|
** <li> ^(during the original sqlite3_set_auxdata() call when a memory
|
|
5960
|
-
** allocation error occurs.)^
|
|
5983
|
+
** allocation error occurs.)^
|
|
5984
|
+
** <li> ^(during the original sqlite3_set_auxdata() call if the function
|
|
5985
|
+
** is evaluated during query planning instead of during query execution,
|
|
5986
|
+
** as sometimes happens with [SQLITE_ENABLE_STAT4].)^ </ul>
|
|
5961
5987
|
**
|
|
5962
|
-
** Note the last
|
|
5988
|
+
** Note the last two bullets in particular. The destructor X in
|
|
5963
5989
|
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
|
|
5964
5990
|
** sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata()
|
|
5965
5991
|
** should be called near the end of the function implementation and the
|
|
5966
5992
|
** function implementation should not make any use of P after
|
|
5967
|
-
** sqlite3_set_auxdata() has been called.
|
|
5968
|
-
**
|
|
5969
|
-
**
|
|
5993
|
+
** sqlite3_set_auxdata() has been called. Furthermore, a call to
|
|
5994
|
+
** sqlite3_get_auxdata() that occurs immediately after a corresponding call
|
|
5995
|
+
** to sqlite3_set_auxdata() might still return NULL if an out-of-memory
|
|
5996
|
+
** condition occurred during the sqlite3_set_auxdata() call or if the
|
|
5997
|
+
** function is being evaluated during query planning rather than during
|
|
5998
|
+
** query execution.
|
|
5999
|
+
**
|
|
6000
|
+
** ^(In practice, auxiliary data is preserved between function calls for
|
|
5970
6001
|
** function parameters that are compile-time constants, including literal
|
|
5971
6002
|
** values and [parameters] and expressions composed from the same.)^
|
|
5972
6003
|
**
|
|
@@ -5976,10 +6007,67 @@ SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
|
|
|
5976
6007
|
**
|
|
5977
6008
|
** These routines must be called from the same thread in which
|
|
5978
6009
|
** the SQL function is running.
|
|
6010
|
+
**
|
|
6011
|
+
** See also: [sqlite3_get_clientdata()] and [sqlite3_set_clientdata()].
|
|
5979
6012
|
*/
|
|
5980
6013
|
SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
|
|
5981
6014
|
SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
|
|
5982
6015
|
|
|
6016
|
+
/*
|
|
6017
|
+
** CAPI3REF: Database Connection Client Data
|
|
6018
|
+
** METHOD: sqlite3
|
|
6019
|
+
**
|
|
6020
|
+
** These functions are used to associate one or more named pointers
|
|
6021
|
+
** with a [database connection].
|
|
6022
|
+
** A call to sqlite3_set_clientdata(D,N,P,X) causes the pointer P
|
|
6023
|
+
** to be attached to [database connection] D using name N. Subsequent
|
|
6024
|
+
** calls to sqlite3_get_clientdata(D,N) will return a copy of pointer P
|
|
6025
|
+
** or a NULL pointer if there were no prior calls to
|
|
6026
|
+
** sqlite3_set_clientdata() with the same values of D and N.
|
|
6027
|
+
** Names are compared using strcmp() and are thus case sensitive.
|
|
6028
|
+
**
|
|
6029
|
+
** If P and X are both non-NULL, then the destructor X is invoked with
|
|
6030
|
+
** argument P on the first of the following occurrences:
|
|
6031
|
+
** <ul>
|
|
6032
|
+
** <li> An out-of-memory error occurs during the call to
|
|
6033
|
+
** sqlite3_set_clientdata() which attempts to register pointer P.
|
|
6034
|
+
** <li> A subsequent call to sqlite3_set_clientdata(D,N,P,X) is made
|
|
6035
|
+
** with the same D and N parameters.
|
|
6036
|
+
** <li> The database connection closes. SQLite does not make any guarantees
|
|
6037
|
+
** about the order in which destructors are called, only that all
|
|
6038
|
+
** destructors will be called exactly once at some point during the
|
|
6039
|
+
** database connection closing process.
|
|
6040
|
+
** </ul>
|
|
6041
|
+
**
|
|
6042
|
+
** SQLite does not do anything with client data other than invoke
|
|
6043
|
+
** destructors on the client data at the appropriate time. The intended
|
|
6044
|
+
** use for client data is to provide a mechanism for wrapper libraries
|
|
6045
|
+
** to store additional information about an SQLite database connection.
|
|
6046
|
+
**
|
|
6047
|
+
** There is no limit (other than available memory) on the number of different
|
|
6048
|
+
** client data pointers (with different names) that can be attached to a
|
|
6049
|
+
** single database connection. However, the implementation is optimized
|
|
6050
|
+
** for the case of having only one or two different client data names.
|
|
6051
|
+
** Applications and wrapper libraries are discouraged from using more than
|
|
6052
|
+
** one client data name each.
|
|
6053
|
+
**
|
|
6054
|
+
** There is no way to enumerate the client data pointers
|
|
6055
|
+
** associated with a database connection. The N parameter can be thought
|
|
6056
|
+
** of as a secret key such that only code that knows the secret key is able
|
|
6057
|
+
** to access the associated data.
|
|
6058
|
+
**
|
|
6059
|
+
** Security Warning: These interfaces should not be exposed in scripting
|
|
6060
|
+
** languages or in other circumstances where it might be possible for an
|
|
6061
|
+
** an attacker to invoke them. Any agent that can invoke these interfaces
|
|
6062
|
+
** can probably also take control of the process.
|
|
6063
|
+
**
|
|
6064
|
+
** Database connection client data is only available for SQLite
|
|
6065
|
+
** version 3.44.0 ([dateof:3.44.0]) and later.
|
|
6066
|
+
**
|
|
6067
|
+
** See also: [sqlite3_set_auxdata()] and [sqlite3_get_auxdata()].
|
|
6068
|
+
*/
|
|
6069
|
+
SQLITE_API void *sqlite3_get_clientdata(sqlite3*,const char*);
|
|
6070
|
+
SQLITE_API int sqlite3_set_clientdata(sqlite3*, const char*, void*, void(*)(void*));
|
|
5983
6071
|
|
|
5984
6072
|
/*
|
|
5985
6073
|
** CAPI3REF: Constants Defining Special Destructor Behavior
|
|
@@ -6181,6 +6269,20 @@ SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
|
|
|
6181
6269
|
** higher order bits are discarded.
|
|
6182
6270
|
** The number of subtype bytes preserved by SQLite might increase
|
|
6183
6271
|
** in future releases of SQLite.
|
|
6272
|
+
**
|
|
6273
|
+
** Every [application-defined SQL function] that invokes this interface
|
|
6274
|
+
** should include the [SQLITE_RESULT_SUBTYPE] property in its
|
|
6275
|
+
** text encoding argument when the SQL function is
|
|
6276
|
+
** [sqlite3_create_function|registered]. If the [SQLITE_RESULT_SUBTYPE]
|
|
6277
|
+
** property is omitted from the function that invokes sqlite3_result_subtype(),
|
|
6278
|
+
** then in some cases the sqlite3_result_subtype() might fail to set
|
|
6279
|
+
** the result subtype.
|
|
6280
|
+
**
|
|
6281
|
+
** If SQLite is compiled with -DSQLITE_STRICT_SUBTYPE=1, then any
|
|
6282
|
+
** SQL function that invokes the sqlite3_result_subtype() interface
|
|
6283
|
+
** and that does not have the SQLITE_RESULT_SUBTYPE property will raise
|
|
6284
|
+
** an error. Future versions of SQLite might enable -DSQLITE_STRICT_SUBTYPE=1
|
|
6285
|
+
** by default.
|
|
6184
6286
|
*/
|
|
6185
6287
|
SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
|
|
6186
6288
|
|
|
@@ -6612,7 +6714,7 @@ SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
|
|
|
6612
6714
|
SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
|
|
6613
6715
|
|
|
6614
6716
|
/*
|
|
6615
|
-
** CAPI3REF: Allowed return values from
|
|
6717
|
+
** CAPI3REF: Allowed return values from sqlite3_txn_state()
|
|
6616
6718
|
** KEYWORDS: {transaction state}
|
|
6617
6719
|
**
|
|
6618
6720
|
** These constants define the current transaction state of a database file.
|
|
@@ -6744,7 +6846,7 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
|
|
|
6744
6846
|
** ^Each call to the sqlite3_autovacuum_pages() interface overrides all
|
|
6745
6847
|
** previous invocations for that database connection. ^If the callback
|
|
6746
6848
|
** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer,
|
|
6747
|
-
** then the autovacuum steps callback is
|
|
6849
|
+
** then the autovacuum steps callback is canceled. The return value
|
|
6748
6850
|
** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might
|
|
6749
6851
|
** be some other error code if something goes wrong. The current
|
|
6750
6852
|
** implementation will only return SQLITE_OK or SQLITE_MISUSE, but other
|
|
@@ -7263,6 +7365,10 @@ struct sqlite3_module {
|
|
|
7263
7365
|
/* The methods above are in versions 1 and 2 of the sqlite_module object.
|
|
7264
7366
|
** Those below are for version 3 and greater. */
|
|
7265
7367
|
int (*xShadowName)(const char*);
|
|
7368
|
+
/* The methods above are in versions 1 through 3 of the sqlite_module object.
|
|
7369
|
+
** Those below are for version 4 and greater. */
|
|
7370
|
+
int (*xIntegrity)(sqlite3_vtab *pVTab, const char *zSchema,
|
|
7371
|
+
const char *zTabName, int mFlags, char **pzErr);
|
|
7266
7372
|
};
|
|
7267
7373
|
|
|
7268
7374
|
/*
|
|
@@ -7750,7 +7856,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
|
|
|
7750
7856
|
** code is returned and the transaction rolled back.
|
|
7751
7857
|
**
|
|
7752
7858
|
** Calling this function with an argument that is not a NULL pointer or an
|
|
7753
|
-
** open blob handle results in undefined
|
|
7859
|
+
** open blob handle results in undefined behavior. ^Calling this routine
|
|
7754
7860
|
** with a null pointer (such as would be returned by a failed call to
|
|
7755
7861
|
** [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function
|
|
7756
7862
|
** is passed a valid open blob handle, the values returned by the
|
|
@@ -8230,6 +8336,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|
|
8230
8336
|
#define SQLITE_TESTCTRL_PRNG_SAVE 5
|
|
8231
8337
|
#define SQLITE_TESTCTRL_PRNG_RESTORE 6
|
|
8232
8338
|
#define SQLITE_TESTCTRL_PRNG_RESET 7 /* NOT USED */
|
|
8339
|
+
#define SQLITE_TESTCTRL_FK_NO_ACTION 7
|
|
8233
8340
|
#define SQLITE_TESTCTRL_BITVEC_TEST 8
|
|
8234
8341
|
#define SQLITE_TESTCTRL_FAULT_INSTALL 9
|
|
8235
8342
|
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10
|
|
@@ -9291,8 +9398,8 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
|
9291
9398
|
** blocked connection already has a registered unlock-notify callback,
|
|
9292
9399
|
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
|
|
9293
9400
|
** called with a NULL pointer as its second argument, then any existing
|
|
9294
|
-
** unlock-notify callback is
|
|
9295
|
-
** unlock-notify callback may also be
|
|
9401
|
+
** unlock-notify callback is canceled. ^The blocked connections
|
|
9402
|
+
** unlock-notify callback may also be canceled by closing the blocked
|
|
9296
9403
|
** connection using [sqlite3_close()].
|
|
9297
9404
|
**
|
|
9298
9405
|
** The unlock-notify callback is not reentrant. If an application invokes
|
|
@@ -10595,6 +10702,13 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
|
|
|
10595
10702
|
** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy
|
|
10596
10703
|
** of the database exists.
|
|
10597
10704
|
**
|
|
10705
|
+
** After the call, if the SQLITE_SERIALIZE_NOCOPY bit had been set,
|
|
10706
|
+
** the returned buffer content will remain accessible and unchanged
|
|
10707
|
+
** until either the next write operation on the connection or when
|
|
10708
|
+
** the connection is closed, and applications must not modify the
|
|
10709
|
+
** buffer. If the bit had been clear, the returned buffer will not
|
|
10710
|
+
** be accessed by SQLite after the call.
|
|
10711
|
+
**
|
|
10598
10712
|
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
|
|
10599
10713
|
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
|
|
10600
10714
|
** allocation error occurs.
|
|
@@ -10643,6 +10757,9 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10643
10757
|
** SQLite will try to increase the buffer size using sqlite3_realloc64()
|
|
10644
10758
|
** if writes on the database cause it to grow larger than M bytes.
|
|
10645
10759
|
**
|
|
10760
|
+
** Applications must not modify the buffer P or invalidate it before
|
|
10761
|
+
** the database connection D is closed.
|
|
10762
|
+
**
|
|
10646
10763
|
** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
|
|
10647
10764
|
** database is currently in a read transaction or is involved in a backup
|
|
10648
10765
|
** operation.
|
|
@@ -10651,6 +10768,13 @@ SQLITE_API unsigned char *sqlite3_serialize(
|
|
|
10651
10768
|
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
|
|
10652
10769
|
** function returns SQLITE_ERROR.
|
|
10653
10770
|
**
|
|
10771
|
+
** The deserialized database should not be in [WAL mode]. If the database
|
|
10772
|
+
** is in WAL mode, then any attempt to use the database file will result
|
|
10773
|
+
** in an [SQLITE_CANTOPEN] error. The application can set the
|
|
10774
|
+
** [file format version numbers] (bytes 18 and 19) of the input database P
|
|
10775
|
+
** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
|
|
10776
|
+
** database file into rollback mode and work around this limitation.
|
|
10777
|
+
**
|
|
10654
10778
|
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
|
|
10655
10779
|
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
|
|
10656
10780
|
** [sqlite3_free()] is invoked on argument P prior to returning.
|
|
@@ -11723,6 +11847,18 @@ SQLITE_API int sqlite3changeset_concat(
|
|
|
11723
11847
|
);
|
|
11724
11848
|
|
|
11725
11849
|
|
|
11850
|
+
/*
|
|
11851
|
+
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
|
|
11852
|
+
*/
|
|
11853
|
+
SQLITE_API int sqlite3changeset_upgrade(
|
|
11854
|
+
sqlite3 *db,
|
|
11855
|
+
const char *zDb,
|
|
11856
|
+
int nIn, const void *pIn, /* Input changeset */
|
|
11857
|
+
int *pnOut, void **ppOut /* OUT: Inverse of input */
|
|
11858
|
+
);
|
|
11859
|
+
|
|
11860
|
+
|
|
11861
|
+
|
|
11726
11862
|
/*
|
|
11727
11863
|
** CAPI3REF: Changegroup Handle
|
|
11728
11864
|
**
|
|
@@ -11769,6 +11905,38 @@ typedef struct sqlite3_changegroup sqlite3_changegroup;
|
|
|
11769
11905
|
*/
|
|
11770
11906
|
SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|
11771
11907
|
|
|
11908
|
+
/*
|
|
11909
|
+
** CAPI3REF: Add a Schema to a Changegroup
|
|
11910
|
+
** METHOD: sqlite3_changegroup_schema
|
|
11911
|
+
**
|
|
11912
|
+
** This method may be used to optionally enforce the rule that the changesets
|
|
11913
|
+
** added to the changegroup handle must match the schema of database zDb
|
|
11914
|
+
** ("main", "temp", or the name of an attached database). If
|
|
11915
|
+
** sqlite3changegroup_add() is called to add a changeset that is not compatible
|
|
11916
|
+
** with the configured schema, SQLITE_SCHEMA is returned and the changegroup
|
|
11917
|
+
** object is left in an undefined state.
|
|
11918
|
+
**
|
|
11919
|
+
** A changeset schema is considered compatible with the database schema in
|
|
11920
|
+
** the same way as for sqlite3changeset_apply(). Specifically, for each
|
|
11921
|
+
** table in the changeset, there exists a database table with:
|
|
11922
|
+
**
|
|
11923
|
+
** <ul>
|
|
11924
|
+
** <li> The name identified by the changeset, and
|
|
11925
|
+
** <li> at least as many columns as recorded in the changeset, and
|
|
11926
|
+
** <li> the primary key columns in the same position as recorded in
|
|
11927
|
+
** the changeset.
|
|
11928
|
+
** </ul>
|
|
11929
|
+
**
|
|
11930
|
+
** The output of the changegroup object always has the same schema as the
|
|
11931
|
+
** database nominated using this function. In cases where changesets passed
|
|
11932
|
+
** to sqlite3changegroup_add() have fewer columns than the corresponding table
|
|
11933
|
+
** in the database schema, these are filled in using the default column
|
|
11934
|
+
** values from the database schema. This makes it possible to combined
|
|
11935
|
+
** changesets that have different numbers of columns for a single table
|
|
11936
|
+
** within a changegroup, provided that they are otherwise compatible.
|
|
11937
|
+
*/
|
|
11938
|
+
SQLITE_API int sqlite3changegroup_schema(sqlite3_changegroup*, sqlite3*, const char *zDb);
|
|
11939
|
+
|
|
11772
11940
|
/*
|
|
11773
11941
|
** CAPI3REF: Add A Changeset To A Changegroup
|
|
11774
11942
|
** METHOD: sqlite3_changegroup
|
|
@@ -11837,13 +12005,18 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|
|
11837
12005
|
** If the new changeset contains changes to a table that is already present
|
|
11838
12006
|
** in the changegroup, then the number of columns and the position of the
|
|
11839
12007
|
** primary key columns for the table must be consistent. If this is not the
|
|
11840
|
-
** case, this function fails with SQLITE_SCHEMA.
|
|
11841
|
-
**
|
|
11842
|
-
**
|
|
11843
|
-
**
|
|
11844
|
-
**
|
|
12008
|
+
** case, this function fails with SQLITE_SCHEMA. Except, if the changegroup
|
|
12009
|
+
** object has been configured with a database schema using the
|
|
12010
|
+
** sqlite3changegroup_schema() API, then it is possible to combine changesets
|
|
12011
|
+
** with different numbers of columns for a single table, provided that
|
|
12012
|
+
** they are otherwise compatible.
|
|
11845
12013
|
**
|
|
11846
|
-
** If
|
|
12014
|
+
** If the input changeset appears to be corrupt and the corruption is
|
|
12015
|
+
** detected, SQLITE_CORRUPT is returned. Or, if an out-of-memory condition
|
|
12016
|
+
** occurs during processing, this function returns SQLITE_NOMEM.
|
|
12017
|
+
**
|
|
12018
|
+
** In all cases, if an error occurs the state of the final contents of the
|
|
12019
|
+
** changegroup is undefined. If no error occurs, SQLITE_OK is returned.
|
|
11847
12020
|
*/
|
|
11848
12021
|
SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
|
|
11849
12022
|
|
|
@@ -12108,10 +12281,17 @@ SQLITE_API int sqlite3changeset_apply_v2(
|
|
|
12108
12281
|
** <li>an insert change if all fields of the conflicting row match
|
|
12109
12282
|
** the row being inserted.
|
|
12110
12283
|
** </ul>
|
|
12284
|
+
**
|
|
12285
|
+
** <dt>SQLITE_CHANGESETAPPLY_FKNOACTION <dd>
|
|
12286
|
+
** If this flag it set, then all foreign key constraints in the target
|
|
12287
|
+
** database behave as if they were declared with "ON UPDATE NO ACTION ON
|
|
12288
|
+
** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
|
|
12289
|
+
** or SET DEFAULT.
|
|
12111
12290
|
*/
|
|
12112
12291
|
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
|
|
12113
12292
|
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
|
|
12114
12293
|
#define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
|
|
12294
|
+
#define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
|
|
12115
12295
|
|
|
12116
12296
|
/*
|
|
12117
12297
|
** CAPI3REF: Constants Passed To The Conflict Handler
|
|
@@ -13279,7 +13459,8 @@ int sqlite3_user_delete(
|
|
|
13279
13459
|
#define CODEC_TYPE_CHACHA20 3
|
|
13280
13460
|
#define CODEC_TYPE_SQLCIPHER 4
|
|
13281
13461
|
#define CODEC_TYPE_RC4 5
|
|
13282
|
-
#define
|
|
13462
|
+
#define CODEC_TYPE_ASCON128 6
|
|
13463
|
+
#define CODEC_TYPE_MAX_BUILTIN 6
|
|
13283
13464
|
|
|
13284
13465
|
/*
|
|
13285
13466
|
** Definition of API functions
|
|
@@ -363,6 +363,9 @@ struct sqlite3_api_routines {
|
|
|
363
363
|
int (*is_interrupted)(sqlite3*);
|
|
364
364
|
/* Version 3.43.0 and later */
|
|
365
365
|
int (*stmt_explain)(sqlite3_stmt*,int);
|
|
366
|
+
/* Version 3.44.0 and later */
|
|
367
|
+
void *(*get_clientdata)(sqlite3*,const char*);
|
|
368
|
+
int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
|
|
366
369
|
};
|
|
367
370
|
|
|
368
371
|
/*
|
|
@@ -693,6 +696,9 @@ typedef int (*sqlite3_loadext_entry)(
|
|
|
693
696
|
#define sqlite3_is_interrupted sqlite3_api->is_interrupted
|
|
694
697
|
/* Version 3.43.0 and later */
|
|
695
698
|
#define sqlite3_stmt_explain sqlite3_api->stmt_explain
|
|
699
|
+
/* Version 3.44.0 and later */
|
|
700
|
+
#define sqlite3_get_clientdata sqlite3_api->get_clientdata
|
|
701
|
+
#define sqlite3_set_clientdata sqlite3_api->set_clientdata
|
|
696
702
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
|
697
703
|
|
|
698
704
|
#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": "9.
|
|
3
|
+
"version": "9.1.2-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>",
|