@sqliteai/sqlite-wasm 3.50.4-wasm.1.0.0-sync.1.0.20-vector.1.0.0-memory.1.3.4 → 3.50.4-wasm.1.0.0-sync.1.1.0-vector.1.0.0-memory.1.3.5
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/index.d.ts +13 -27
- package/package.json +1 -1
- package/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs +9 -4
- package/sqlite-wasm/jswasm/sqlite3-node.mjs +8 -4
- package/sqlite-wasm/jswasm/sqlite3.js +13 -7
- package/sqlite-wasm/jswasm/sqlite3.mjs +9 -4
- package/sqlite-wasm/jswasm/sqlite3.wasm +0 -0
package/index.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/** Types of values that can be passed to/retrieved from SQLite. */
|
|
2
2
|
declare type SqlValue =
|
|
3
|
-
|
|
|
4
|
-
| number
|
|
5
|
-
| null
|
|
6
|
-
| bigint
|
|
7
|
-
| Uint8Array
|
|
8
|
-
| Int8Array
|
|
9
|
-
| ArrayBuffer;
|
|
3
|
+
string | number | null | bigint | Uint8Array | Int8Array | ArrayBuffer;
|
|
10
4
|
|
|
11
5
|
/** Types of values that can be passed to SQLite. */
|
|
12
6
|
declare type BindableValue =
|
|
@@ -989,15 +983,11 @@ declare class Database {
|
|
|
989
983
|
createFunction(
|
|
990
984
|
name: string,
|
|
991
985
|
options:
|
|
992
|
-
|
|
|
993
|
-
| AggregateFunctionOptions
|
|
994
|
-
| WindowFunctionOptions,
|
|
986
|
+
ScalarFunctionOptions | AggregateFunctionOptions | WindowFunctionOptions,
|
|
995
987
|
): this;
|
|
996
988
|
createFunction(
|
|
997
989
|
options: (
|
|
998
|
-
|
|
|
999
|
-
| AggregateFunctionOptions
|
|
1000
|
-
| WindowFunctionOptions
|
|
990
|
+
ScalarFunctionOptions | AggregateFunctionOptions | WindowFunctionOptions
|
|
1001
991
|
) & { name: string },
|
|
1002
992
|
): this;
|
|
1003
993
|
|
|
@@ -1563,8 +1553,7 @@ declare class SQLiteStruct {
|
|
|
1563
1553
|
* warning in the console.
|
|
1564
1554
|
*/
|
|
1565
1555
|
ondispose?:
|
|
1566
|
-
| (() => void)
|
|
1567
|
-
| ((() => void) | SQLiteStruct | WasmPointer | string)[];
|
|
1556
|
+
(() => void) | ((() => void) | SQLiteStruct | WasmPointer | string)[];
|
|
1568
1557
|
|
|
1569
1558
|
/**
|
|
1570
1559
|
* Client code may call `aStructInstance.addOnDispose()` to push one or more
|
|
@@ -2077,18 +2066,18 @@ declare type Sqlite3Static = {
|
|
|
2077
2066
|
io?: {
|
|
2078
2067
|
struct: sqlite3_io_methods;
|
|
2079
2068
|
methods: {
|
|
2080
|
-
[
|
|
2081
|
-
? K
|
|
2082
|
-
|
|
2069
|
+
[
|
|
2070
|
+
K in keyof sqlite3_io_methods as K extends `x${string}` ? K : never
|
|
2071
|
+
]?: sqlite3_io_methods[K];
|
|
2083
2072
|
};
|
|
2084
2073
|
applyArgcCheck?: boolean;
|
|
2085
2074
|
};
|
|
2086
2075
|
vfs?: {
|
|
2087
2076
|
struct: sqlite3_vfs;
|
|
2088
2077
|
methods: {
|
|
2089
|
-
[
|
|
2090
|
-
? K
|
|
2091
|
-
|
|
2078
|
+
[
|
|
2079
|
+
K in keyof sqlite3_vfs as K extends `x${string}` ? K : never
|
|
2080
|
+
]?: sqlite3_vfs[K];
|
|
2092
2081
|
};
|
|
2093
2082
|
applyArgcCheck?: boolean;
|
|
2094
2083
|
name?: string;
|
|
@@ -4725,8 +4714,7 @@ declare type CAPI = {
|
|
|
4725
4714
|
eTextRep: CAPI['SQLITE_UTF8'],
|
|
4726
4715
|
pApp: WasmPointer,
|
|
4727
4716
|
xFunc:
|
|
4728
|
-
|
|
4729
|
-
| WasmPointer,
|
|
4717
|
+
((ctx: WasmPointer, ...values: SqlValue[]) => SqlValue) | WasmPointer,
|
|
4730
4718
|
xStep: ((ctx: WasmPointer, ...values: SqlValue[]) => void) | WasmPointer,
|
|
4731
4719
|
xFinal: ((ctx: WasmPointer) => SqlValue) | WasmPointer,
|
|
4732
4720
|
) => number;
|
|
@@ -4758,8 +4746,7 @@ declare type CAPI = {
|
|
|
4758
4746
|
eTextRep: CAPI['SQLITE_UTF8'],
|
|
4759
4747
|
pApp: WasmPointer,
|
|
4760
4748
|
xFunc:
|
|
4761
|
-
|
|
4762
|
-
| WasmPointer,
|
|
4749
|
+
((ctx: WasmPointer, ...values: SqlValue[]) => SqlValue) | WasmPointer,
|
|
4763
4750
|
xStep: ((ctx: WasmPointer, ...values: SqlValue[]) => void) | WasmPointer,
|
|
4764
4751
|
xFinal: ((ctx: WasmPointer) => SqlValue) | WasmPointer,
|
|
4765
4752
|
xDestroy: (() => void) | WasmPointer,
|
|
@@ -4793,8 +4780,7 @@ declare type CAPI = {
|
|
|
4793
4780
|
eTextRep: CAPI['SQLITE_UTF8'],
|
|
4794
4781
|
pApp: WasmPointer,
|
|
4795
4782
|
xStep:
|
|
4796
|
-
|
|
4797
|
-
| WasmPointer,
|
|
4783
|
+
((ctx: WasmPointer, ...values: SqlValue[]) => SqlValue) | WasmPointer,
|
|
4798
4784
|
xFinal: ((ctx: WasmPointer) => SqlValue) | WasmPointer,
|
|
4799
4785
|
xValue: ((ctx: WasmPointer) => void) | WasmPointer,
|
|
4800
4786
|
xInverse: ((ctx: WasmPointer, ...values: SqlValue[]) => void) | WasmPointer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqliteai/sqlite-wasm",
|
|
3
|
-
"version": "3.50.4-wasm.1.0.0-sync.1.0
|
|
3
|
+
"version": "3.50.4-wasm.1.0.0-sync.1.1.0-vector.1.0.0-memory.1.3.5",
|
|
4
4
|
"description": "SQLite Wasm compiled with automatically initialized sqlite-sync, sqlite-vector, and sqlite-memory extensions. Conveniently packaged as an ES Module for effortless integration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sqlite",
|
|
@@ -2691,9 +2691,10 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
|
|
2693
2693
|
xhr.send(null);
|
|
2694
|
-
if (
|
|
2695
|
-
|
|
2696
|
-
|
|
2694
|
+
if (!(
|
|
2695
|
+
(xhr.status >= 200 && xhr.status < 300) ||
|
|
2696
|
+
xhr.status === 304
|
|
2697
|
+
))
|
|
2697
2698
|
throw new Error(
|
|
2698
2699
|
"Couldn't load " + url + '. Status: ' + xhr.status,
|
|
2699
2700
|
);
|
|
@@ -6847,7 +6848,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
6847
6848
|
if (n < 0) toss('Invalid state object for scopedAllocPop().');
|
|
6848
6849
|
if (0 === arguments.length) state = cache.scopedAlloc[n];
|
|
6849
6850
|
cache.scopedAlloc.splice(n, 1);
|
|
6850
|
-
for (let p; (p = state.pop());
|
|
6851
|
+
for (let p; (p = state.pop());) {
|
|
6851
6852
|
if (target.functionEntry(p)) {
|
|
6852
6853
|
target.uninstallFunction(p);
|
|
6853
6854
|
} else target.dealloc(p);
|
|
@@ -7393,6 +7394,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
7393
7394
|
BigInt64Array = globalThis['BigInt64Array'],
|
|
7394
7395
|
ptrSizeof = config.ptrSizeof || 4,
|
|
7395
7396
|
ptrIR = config.ptrIR || 'i32';
|
|
7397
|
+
|
|
7396
7398
|
if (!SBF.debugFlags) {
|
|
7397
7399
|
SBF.__makeDebugFlags = function (deriveFrom = null) {
|
|
7398
7400
|
if (deriveFrom && deriveFrom.__flags) deriveFrom = deriveFrom.__flags;
|
|
@@ -9962,6 +9964,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
9962
9964
|
wasm.xWrap.FuncPtrAdapter.warnOnUse = true;
|
|
9963
9965
|
|
|
9964
9966
|
const StructBinder = sqlite3.StructBinder;
|
|
9967
|
+
|
|
9965
9968
|
const installMethod = function callee(
|
|
9966
9969
|
tgt,
|
|
9967
9970
|
name,
|
|
@@ -10546,6 +10549,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
10546
10549
|
const saveSql = Array.isArray(opt.saveSql) ? opt.saveSql : undefined;
|
|
10547
10550
|
try {
|
|
10548
10551
|
const isTA = util.isSQLableTypedArray(arg.sql);
|
|
10552
|
+
|
|
10549
10553
|
let sqlByteLen = isTA ? arg.sql.byteLength : wasm.jstrlen(arg.sql);
|
|
10550
10554
|
const ppStmt = wasm.scopedAlloc(
|
|
10551
10555
|
2 * wasm.ptrSizeof + (sqlByteLen + 1),
|
|
@@ -12892,6 +12896,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
12892
12896
|
capi.SQLITE_OPEN_SUPER_JOURNAL |
|
|
12893
12897
|
capi.SQLITE_OPEN_WAL;
|
|
12894
12898
|
const FLAG_COMPUTE_DIGEST_V2 = capi.SQLITE_OPEN_MEMORY;
|
|
12899
|
+
|
|
12895
12900
|
const OPAQUE_DIR_NAME = '.opaque';
|
|
12896
12901
|
|
|
12897
12902
|
const getRandomName = () => Math.random().toString(36).slice(2);
|
|
@@ -2716,9 +2716,10 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
2718
|
xhr.send(null);
|
|
2719
|
-
if (
|
|
2720
|
-
|
|
2721
|
-
|
|
2719
|
+
if (!(
|
|
2720
|
+
(xhr.status >= 200 && xhr.status < 300) ||
|
|
2721
|
+
xhr.status === 304
|
|
2722
|
+
))
|
|
2722
2723
|
throw new Error(
|
|
2723
2724
|
"Couldn't load " + url + '. Status: ' + xhr.status,
|
|
2724
2725
|
);
|
|
@@ -6872,7 +6873,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
6872
6873
|
if (n < 0) toss('Invalid state object for scopedAllocPop().');
|
|
6873
6874
|
if (0 === arguments.length) state = cache.scopedAlloc[n];
|
|
6874
6875
|
cache.scopedAlloc.splice(n, 1);
|
|
6875
|
-
for (let p; (p = state.pop());
|
|
6876
|
+
for (let p; (p = state.pop());) {
|
|
6876
6877
|
if (target.functionEntry(p)) {
|
|
6877
6878
|
target.uninstallFunction(p);
|
|
6878
6879
|
} else target.dealloc(p);
|
|
@@ -7418,6 +7419,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
7418
7419
|
BigInt64Array = globalThis['BigInt64Array'],
|
|
7419
7420
|
ptrSizeof = config.ptrSizeof || 4,
|
|
7420
7421
|
ptrIR = config.ptrIR || 'i32';
|
|
7422
|
+
|
|
7421
7423
|
if (!SBF.debugFlags) {
|
|
7422
7424
|
SBF.__makeDebugFlags = function (deriveFrom = null) {
|
|
7423
7425
|
if (deriveFrom && deriveFrom.__flags) deriveFrom = deriveFrom.__flags;
|
|
@@ -9987,6 +9989,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
9987
9989
|
wasm.xWrap.FuncPtrAdapter.warnOnUse = true;
|
|
9988
9990
|
|
|
9989
9991
|
const StructBinder = sqlite3.StructBinder;
|
|
9992
|
+
|
|
9990
9993
|
const installMethod = function callee(
|
|
9991
9994
|
tgt,
|
|
9992
9995
|
name,
|
|
@@ -10571,6 +10574,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
10571
10574
|
const saveSql = Array.isArray(opt.saveSql) ? opt.saveSql : undefined;
|
|
10572
10575
|
try {
|
|
10573
10576
|
const isTA = util.isSQLableTypedArray(arg.sql);
|
|
10577
|
+
|
|
10574
10578
|
let sqlByteLen = isTA ? arg.sql.byteLength : wasm.jstrlen(arg.sql);
|
|
10575
10579
|
const ppStmt = wasm.scopedAlloc(
|
|
10576
10580
|
2 * wasm.ptrSizeof + (sqlByteLen + 1),
|
|
@@ -2699,9 +2699,10 @@ var sqlite3InitModule = (() => {
|
|
|
2699
2699
|
var xhr = new XMLHttpRequest();
|
|
2700
2700
|
xhr.open('HEAD', url, false);
|
|
2701
2701
|
xhr.send(null);
|
|
2702
|
-
if (
|
|
2703
|
-
|
|
2704
|
-
|
|
2702
|
+
if (!(
|
|
2703
|
+
(xhr.status >= 200 && xhr.status < 300) ||
|
|
2704
|
+
xhr.status === 304
|
|
2705
|
+
))
|
|
2705
2706
|
throw new Error(
|
|
2706
2707
|
"Couldn't load " + url + '. Status: ' + xhr.status,
|
|
2707
2708
|
);
|
|
@@ -2743,9 +2744,10 @@ var sqlite3InitModule = (() => {
|
|
|
2743
2744
|
}
|
|
2744
2745
|
|
|
2745
2746
|
xhr.send(null);
|
|
2746
|
-
if (
|
|
2747
|
-
|
|
2748
|
-
|
|
2747
|
+
if (!(
|
|
2748
|
+
(xhr.status >= 200 && xhr.status < 300) ||
|
|
2749
|
+
xhr.status === 304
|
|
2750
|
+
))
|
|
2749
2751
|
throw new Error(
|
|
2750
2752
|
"Couldn't load " + url + '. Status: ' + xhr.status,
|
|
2751
2753
|
);
|
|
@@ -6949,7 +6951,7 @@ var sqlite3InitModule = (() => {
|
|
|
6949
6951
|
if (n < 0) toss('Invalid state object for scopedAllocPop().');
|
|
6950
6952
|
if (0 === arguments.length) state = cache.scopedAlloc[n];
|
|
6951
6953
|
cache.scopedAlloc.splice(n, 1);
|
|
6952
|
-
for (let p; (p = state.pop());
|
|
6954
|
+
for (let p; (p = state.pop());) {
|
|
6953
6955
|
if (target.functionEntry(p)) {
|
|
6954
6956
|
target.uninstallFunction(p);
|
|
6955
6957
|
} else target.dealloc(p);
|
|
@@ -7499,6 +7501,7 @@ var sqlite3InitModule = (() => {
|
|
|
7499
7501
|
BigInt64Array = globalThis['BigInt64Array'],
|
|
7500
7502
|
ptrSizeof = config.ptrSizeof || 4,
|
|
7501
7503
|
ptrIR = config.ptrIR || 'i32';
|
|
7504
|
+
|
|
7502
7505
|
if (!SBF.debugFlags) {
|
|
7503
7506
|
SBF.__makeDebugFlags = function (deriveFrom = null) {
|
|
7504
7507
|
if (deriveFrom && deriveFrom.__flags)
|
|
@@ -10129,6 +10132,7 @@ var sqlite3InitModule = (() => {
|
|
|
10129
10132
|
wasm.xWrap.FuncPtrAdapter.warnOnUse = true;
|
|
10130
10133
|
|
|
10131
10134
|
const StructBinder = sqlite3.StructBinder;
|
|
10135
|
+
|
|
10132
10136
|
const installMethod = function callee(
|
|
10133
10137
|
tgt,
|
|
10134
10138
|
name,
|
|
@@ -10724,6 +10728,7 @@ var sqlite3InitModule = (() => {
|
|
|
10724
10728
|
: undefined;
|
|
10725
10729
|
try {
|
|
10726
10730
|
const isTA = util.isSQLableTypedArray(arg.sql);
|
|
10731
|
+
|
|
10727
10732
|
let sqlByteLen = isTA
|
|
10728
10733
|
? arg.sql.byteLength
|
|
10729
10734
|
: wasm.jstrlen(arg.sql);
|
|
@@ -13099,6 +13104,7 @@ var sqlite3InitModule = (() => {
|
|
|
13099
13104
|
capi.SQLITE_OPEN_SUPER_JOURNAL |
|
|
13100
13105
|
capi.SQLITE_OPEN_WAL;
|
|
13101
13106
|
const FLAG_COMPUTE_DIGEST_V2 = capi.SQLITE_OPEN_MEMORY;
|
|
13107
|
+
|
|
13102
13108
|
const OPAQUE_DIR_NAME = '.opaque';
|
|
13103
13109
|
|
|
13104
13110
|
const getRandomName = () => Math.random().toString(36).slice(2);
|
|
@@ -2695,9 +2695,10 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
2695
2695
|
}
|
|
2696
2696
|
|
|
2697
2697
|
xhr.send(null);
|
|
2698
|
-
if (
|
|
2699
|
-
|
|
2700
|
-
|
|
2698
|
+
if (!(
|
|
2699
|
+
(xhr.status >= 200 && xhr.status < 300) ||
|
|
2700
|
+
xhr.status === 304
|
|
2701
|
+
))
|
|
2701
2702
|
throw new Error(
|
|
2702
2703
|
"Couldn't load " + url + '. Status: ' + xhr.status,
|
|
2703
2704
|
);
|
|
@@ -6851,7 +6852,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
6851
6852
|
if (n < 0) toss('Invalid state object for scopedAllocPop().');
|
|
6852
6853
|
if (0 === arguments.length) state = cache.scopedAlloc[n];
|
|
6853
6854
|
cache.scopedAlloc.splice(n, 1);
|
|
6854
|
-
for (let p; (p = state.pop());
|
|
6855
|
+
for (let p; (p = state.pop());) {
|
|
6855
6856
|
if (target.functionEntry(p)) {
|
|
6856
6857
|
target.uninstallFunction(p);
|
|
6857
6858
|
} else target.dealloc(p);
|
|
@@ -7397,6 +7398,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
7397
7398
|
BigInt64Array = globalThis['BigInt64Array'],
|
|
7398
7399
|
ptrSizeof = config.ptrSizeof || 4,
|
|
7399
7400
|
ptrIR = config.ptrIR || 'i32';
|
|
7401
|
+
|
|
7400
7402
|
if (!SBF.debugFlags) {
|
|
7401
7403
|
SBF.__makeDebugFlags = function (deriveFrom = null) {
|
|
7402
7404
|
if (deriveFrom && deriveFrom.__flags) deriveFrom = deriveFrom.__flags;
|
|
@@ -9966,6 +9968,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
9966
9968
|
wasm.xWrap.FuncPtrAdapter.warnOnUse = true;
|
|
9967
9969
|
|
|
9968
9970
|
const StructBinder = sqlite3.StructBinder;
|
|
9971
|
+
|
|
9969
9972
|
const installMethod = function callee(
|
|
9970
9973
|
tgt,
|
|
9971
9974
|
name,
|
|
@@ -10550,6 +10553,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
10550
10553
|
const saveSql = Array.isArray(opt.saveSql) ? opt.saveSql : undefined;
|
|
10551
10554
|
try {
|
|
10552
10555
|
const isTA = util.isSQLableTypedArray(arg.sql);
|
|
10556
|
+
|
|
10553
10557
|
let sqlByteLen = isTA ? arg.sql.byteLength : wasm.jstrlen(arg.sql);
|
|
10554
10558
|
const ppStmt = wasm.scopedAlloc(
|
|
10555
10559
|
2 * wasm.ptrSizeof + (sqlByteLen + 1),
|
|
@@ -12894,6 +12898,7 @@ async function sqlite3InitModule(moduleArg = {}) {
|
|
|
12894
12898
|
capi.SQLITE_OPEN_SUPER_JOURNAL |
|
|
12895
12899
|
capi.SQLITE_OPEN_WAL;
|
|
12896
12900
|
const FLAG_COMPUTE_DIGEST_V2 = capi.SQLITE_OPEN_MEMORY;
|
|
12901
|
+
|
|
12897
12902
|
const OPAQUE_DIR_NAME = '.opaque';
|
|
12898
12903
|
|
|
12899
12904
|
const getRandomName = () => Math.random().toString(36).slice(2);
|
|
Binary file
|