@livestore/wa-sqlite 0.4.0-dev.21 → 0.4.0-dev.23
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 +46 -36
- package/dist/README.md +13 -13
- package/dist/fts5/wa-sqlite.mjs +1 -1
- package/dist/fts5/wa-sqlite.node.mjs +1 -1
- package/dist/fts5/wa-sqlite.node.wasm +0 -0
- package/dist/fts5/wa-sqlite.wasm +0 -0
- package/dist/wa-sqlite-async.mjs +1 -1
- package/dist/wa-sqlite-async.wasm +0 -0
- package/dist/wa-sqlite-jspi.mjs +1 -1
- package/dist/wa-sqlite-jspi.wasm +0 -0
- package/dist/wa-sqlite.mjs +1 -1
- package/dist/wa-sqlite.node.mjs +1 -1
- package/dist/wa-sqlite.node.wasm +0 -0
- package/dist/wa-sqlite.wasm +0 -0
- package/package.json +40 -29
- package/src/FacadeVFS.js +252 -261
- package/src/VFS.js +84 -85
- package/src/WebLocksMixin.js +357 -351
- package/src/examples/AccessHandlePoolVFS.js +185 -194
- package/src/examples/IDBBatchAtomicVFS.js +429 -409
- package/src/examples/IDBMirrorVFS.js +402 -409
- package/src/examples/MemoryAsyncVFS.js +32 -37
- package/src/examples/MemoryVFS.js +71 -75
- package/src/examples/OPFSAdaptiveVFS.js +206 -206
- package/src/examples/OPFSAnyContextVFS.js +141 -140
- package/src/examples/OPFSCoopSyncVFS.js +297 -299
- package/src/examples/OPFSPermutedVFS.js +529 -540
- package/src/examples/README.md +27 -15
- package/src/examples/tag.js +27 -27
- package/src/sqlite-api.js +910 -941
- package/src/sqlite-constants.js +246 -232
- package/src/types/globals.d.ts +52 -52
- package/src/types/index.d.ts +586 -576
- package/test/AccessHandlePoolVFS.test.js +21 -21
- package/test/IDBBatchAtomicVFS.test.js +69 -69
- package/test/IDBMirrorVFS.test.js +21 -21
- package/test/MemoryAsyncVFS.test.js +21 -21
- package/test/MemoryVFS.test.js +21 -21
- package/test/OPFSAdaptiveVFS.test.js +21 -21
- package/test/OPFSAnyContextVFS.test.js +21 -21
- package/test/OPFSCoopSyncVFS.test.js +21 -21
- package/test/OPFSPermutedVFS.test.js +21 -21
- package/test/TestContext.js +44 -41
- package/test/WebLocksMixin.test.js +369 -360
- package/test/api.test.js +23 -23
- package/test/api_exec.js +72 -61
- package/test/api_misc.js +53 -54
- package/test/api_statements.js +271 -279
- package/test/callbacks.test.js +492 -478
- package/test/data/idbv5.json +1135 -1
- package/test/sql.test.js +30 -30
- package/test/sql_0001.js +49 -33
- package/test/sql_0002.js +55 -34
- package/test/sql_0003.js +85 -49
- package/test/sql_0004.js +76 -47
- package/test/sql_0005.js +60 -44
- package/test/test-worker.js +171 -163
- package/test/vfs_xAccess.js +1 -2
- package/test/vfs_xClose.js +50 -49
- package/test/vfs_xOpen.js +73 -72
- package/test/vfs_xRead.js +31 -31
- package/test/vfs_xWrite.js +30 -29
package/src/types/index.d.ts
CHANGED
|
@@ -9,113 +9,94 @@
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Javascript types that SQLite can use
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* C integer and floating-point types both map to/from Javascript `number`.
|
|
14
14
|
* Blob data can be provided to SQLite as `Uint8Array<ArrayBuffer>` or `number[]` (with
|
|
15
15
|
* each element converted to a byte); SQLite always returns blob data as
|
|
16
16
|
* `Uint8Array<ArrayBuffer>`
|
|
17
17
|
*/
|
|
18
|
-
type SQLiteCompatibleType = number|string|Uint8Array<ArrayBuffer
|
|
18
|
+
type SQLiteCompatibleType = number | string | Uint8Array<ArrayBuffer> | Array<number> | bigint | null
|
|
19
|
+
|
|
20
|
+
/** https://sqlite.org/session/c_changeset_conflict.html */
|
|
21
|
+
type SQLiteChangesetConflictType =
|
|
22
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_DATA
|
|
23
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_NOTFOUND
|
|
24
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_CONFLICT
|
|
25
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_CONSTRAINT
|
|
26
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_FOREIGN_KEY
|
|
27
|
+
|
|
28
|
+
/** https://sqlite.org/session/c_changeset_abort.html */
|
|
29
|
+
type SQLiteChangesetAction =
|
|
30
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_OMIT
|
|
31
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_REPLACE
|
|
32
|
+
| typeof import('@livestore/wa-sqlite/src/sqlite-constants.js').SQLITE_CHANGESET_ABORT
|
|
19
33
|
|
|
20
34
|
/**
|
|
21
35
|
* SQLite Virtual File System object
|
|
22
|
-
*
|
|
36
|
+
*
|
|
23
37
|
* Objects with this interface can be passed to {@link SQLiteAPI.vfs_register}
|
|
24
38
|
* to define a new filesystem.
|
|
25
|
-
*
|
|
39
|
+
*
|
|
26
40
|
* There are examples of a synchronous
|
|
27
41
|
* [MemoryVFS.js](https://github.com/rhashimoto/wa-sqlite/blob/master/src/examples/MemoryVFS.js),
|
|
28
42
|
* and asynchronous
|
|
29
43
|
* [MemoryAsyncVFS.js](https://github.com/rhashimoto/wa-sqlite/blob/master/src/examples/MemoryAsyncVFS.js)
|
|
30
44
|
* and
|
|
31
45
|
* [IndexedDbVFS.js](https://github.com/rhashimoto/wa-sqlite/blob/master/src/examples/IndexedDbVFS.js).
|
|
32
|
-
*
|
|
46
|
+
*
|
|
33
47
|
* @see https://sqlite.org/vfs.html
|
|
34
48
|
* @see https://sqlite.org/c3ref/io_methods.html
|
|
35
49
|
*/
|
|
36
50
|
interface SQLiteVFS {
|
|
37
51
|
/** Maximum length of a file path in UTF-8 bytes (default 64) */
|
|
38
|
-
mxPathName?: number
|
|
52
|
+
mxPathName?: number
|
|
39
53
|
|
|
40
|
-
name: string
|
|
54
|
+
name: string
|
|
41
55
|
|
|
42
|
-
close(): void|Promise<void
|
|
43
|
-
isReady(): boolean|Promise<boolean
|
|
56
|
+
close(): void | Promise<void>
|
|
57
|
+
isReady(): boolean | Promise<boolean>
|
|
44
58
|
|
|
45
59
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
46
|
-
xClose(fileId: number): number|Promise<number
|
|
60
|
+
xClose(fileId: number): number | Promise<number>
|
|
47
61
|
|
|
48
62
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
49
|
-
xRead(
|
|
50
|
-
fileId: number,
|
|
51
|
-
pData: number,
|
|
52
|
-
iAmt: number,
|
|
53
|
-
iOffsetLo: number,
|
|
54
|
-
iOffsetHi: number
|
|
55
|
-
): number|Promise<number>;
|
|
63
|
+
xRead(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise<number>
|
|
56
64
|
|
|
57
65
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
58
|
-
xWrite(
|
|
59
|
-
fileId: number,
|
|
60
|
-
pData: number,
|
|
61
|
-
iAmt: number,
|
|
62
|
-
iOffsetLo: number,
|
|
63
|
-
iOffsetHi: number
|
|
64
|
-
): number|Promise<number>;
|
|
66
|
+
xWrite(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise<number>
|
|
65
67
|
|
|
66
68
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
67
|
-
xTruncate(fileId: number, iSizeLo: number, iSizeHi): number|Promise<number
|
|
69
|
+
xTruncate(fileId: number, iSizeLo: number, iSizeHi): number | Promise<number>
|
|
68
70
|
|
|
69
71
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
70
|
-
xSync(fileId: number, flags: number): number|Promise<number
|
|
72
|
+
xSync(fileId: number, flags: number): number | Promise<number>
|
|
71
73
|
|
|
72
74
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
73
|
-
xFileSize(
|
|
74
|
-
fileId: number,
|
|
75
|
-
pSize64: number
|
|
76
|
-
): number|Promise<number>;
|
|
75
|
+
xFileSize(fileId: number, pSize64: number): number | Promise<number>
|
|
77
76
|
|
|
78
77
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
79
|
-
xLock(fileId: number, flags: number): number|Promise<number
|
|
78
|
+
xLock(fileId: number, flags: number): number | Promise<number>
|
|
80
79
|
|
|
81
80
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
82
|
-
xUnlock(fileId: number, flags: number): number|Promise<number
|
|
81
|
+
xUnlock(fileId: number, flags: number): number | Promise<number>
|
|
83
82
|
|
|
84
83
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
85
|
-
xCheckReservedLock(
|
|
86
|
-
fileId: number,
|
|
87
|
-
pResOut: number
|
|
88
|
-
): number|Promise<number>;
|
|
84
|
+
xCheckReservedLock(fileId: number, pResOut: number): number | Promise<number>
|
|
89
85
|
|
|
90
86
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
91
|
-
xFileControl(
|
|
92
|
-
fileId: number,
|
|
93
|
-
flags: number,
|
|
94
|
-
pOut: number
|
|
95
|
-
): number|Promise<number>;
|
|
87
|
+
xFileControl(fileId: number, flags: number, pOut: number): number | Promise<number>
|
|
96
88
|
|
|
97
89
|
/** @see https://sqlite.org/c3ref/io_methods.html */
|
|
98
|
-
xDeviceCharacteristics(fileId: number): number|Promise<number
|
|
90
|
+
xDeviceCharacteristics(fileId: number): number | Promise<number>
|
|
99
91
|
|
|
100
92
|
/** @see https://sqlite.org/c3ref/vfs.html */
|
|
101
|
-
xOpen(
|
|
102
|
-
pVfs: number,
|
|
103
|
-
zName: number,
|
|
104
|
-
pFile: number,
|
|
105
|
-
flags: number,
|
|
106
|
-
pOutFlags: number
|
|
107
|
-
): number|Promise<number>;
|
|
93
|
+
xOpen(pVfs: number, zName: number, pFile: number, flags: number, pOutFlags: number): number | Promise<number>
|
|
108
94
|
|
|
109
95
|
/** @see https://sqlite.org/c3ref/vfs.html */
|
|
110
|
-
xDelete(pVfs: number, zName: number, syncDir: number): number|Promise<number
|
|
96
|
+
xDelete(pVfs: number, zName: number, syncDir: number): number | Promise<number>
|
|
111
97
|
|
|
112
98
|
/** @see https://sqlite.org/c3ref/vfs.html */
|
|
113
|
-
xAccess(
|
|
114
|
-
pVfs: number,
|
|
115
|
-
zName: number,
|
|
116
|
-
flags: number,
|
|
117
|
-
pResOut: number
|
|
118
|
-
): number|Promise<number>;
|
|
99
|
+
xAccess(pVfs: number, zName: number, flags: number, pResOut: number): number | Promise<number>
|
|
119
100
|
}
|
|
120
101
|
|
|
121
102
|
/**
|
|
@@ -128,29 +109,29 @@ declare interface SQLitePrepareOptions {
|
|
|
128
109
|
* Set `unscoped` to `true` to give iterated statements an arbitrary
|
|
129
110
|
* lifetime.
|
|
130
111
|
*/
|
|
131
|
-
unscoped?: boolean
|
|
112
|
+
unscoped?: boolean
|
|
132
113
|
|
|
133
114
|
/**
|
|
134
115
|
* SQLITE_PREPARE_* flags
|
|
135
116
|
* @see https://www.sqlite.org/c3ref/c_prepare_normalize.html#sqlitepreparepersistent
|
|
136
117
|
*/
|
|
137
|
-
flags?: number
|
|
118
|
+
flags?: number
|
|
138
119
|
}
|
|
139
120
|
|
|
140
121
|
/**
|
|
141
122
|
* Javascript wrappers for the SQLite C API (plus a few convenience functions)
|
|
142
|
-
*
|
|
123
|
+
*
|
|
143
124
|
* Function signatures have been slightly modified to be more
|
|
144
125
|
* Javascript-friendly. For the C functions that return an error code,
|
|
145
126
|
* the corresponding Javascript wrapper will throw an exception with a
|
|
146
127
|
* `code` property on an error.
|
|
147
|
-
*
|
|
128
|
+
*
|
|
148
129
|
* Note that a few functions return a Promise in order to accomodate
|
|
149
130
|
* either a synchronous or asynchronous SQLite build, generally those
|
|
150
131
|
* involved with opening/closing a database or executing a statement.
|
|
151
|
-
*
|
|
132
|
+
*
|
|
152
133
|
* To create an instance of the API, follow these steps:
|
|
153
|
-
*
|
|
134
|
+
*
|
|
154
135
|
* ```javascript
|
|
155
136
|
* // Import an ES6 module factory function from one of the
|
|
156
137
|
* // package builds, either '@livestore/wa-sqlite.mjs' (synchronous) or
|
|
@@ -158,35 +139,35 @@ declare interface SQLitePrepareOptions {
|
|
|
158
139
|
* // use the asynchronous build if you plan to use an
|
|
159
140
|
* // asynchronous VFS or module.
|
|
160
141
|
* import SQLiteESMFactory from '@livestore/wa-sqlite/dist/wa-sqlite.mjs';
|
|
161
|
-
*
|
|
142
|
+
*
|
|
162
143
|
* // Import the Javascript API wrappers.
|
|
163
144
|
* import * as SQLite from '@livestore/wa-sqlite';
|
|
164
|
-
*
|
|
145
|
+
*
|
|
165
146
|
* // Use an async function to simplify Promise handling.
|
|
166
147
|
* (async function() {
|
|
167
148
|
* // Invoke the ES6 module factory to create the SQLite
|
|
168
149
|
* // Emscripten module. This will fetch and compile the
|
|
169
150
|
* // .wasm file.
|
|
170
151
|
* const module = await SQLiteESMFactory();
|
|
171
|
-
*
|
|
152
|
+
*
|
|
172
153
|
* // Use the module to build the API instance.
|
|
173
154
|
* const sqlite3 = SQLite.Factory(module);
|
|
174
|
-
*
|
|
155
|
+
*
|
|
175
156
|
* // Use the API to open and access a database.
|
|
176
157
|
* const db = await sqlite3.open_v2('myDB');
|
|
177
158
|
* ...
|
|
178
159
|
* })();
|
|
179
160
|
* ```
|
|
180
|
-
*
|
|
161
|
+
*
|
|
181
162
|
* @see https://sqlite.org/c3ref/funclist.html
|
|
182
163
|
*/
|
|
183
164
|
interface SQLiteAPI {
|
|
184
165
|
/**
|
|
185
166
|
* Bind a collection of values to a statement
|
|
186
|
-
*
|
|
167
|
+
*
|
|
187
168
|
* This convenience function binds values from either an array or object
|
|
188
169
|
* to a prepared statement with placeholder parameters.
|
|
189
|
-
*
|
|
170
|
+
*
|
|
190
171
|
* Array example using numbered parameters (numbering is implicit in
|
|
191
172
|
* this example):
|
|
192
173
|
* ```
|
|
@@ -196,7 +177,7 @@ interface SQLiteAPI {
|
|
|
196
177
|
* ...
|
|
197
178
|
* }
|
|
198
179
|
* ```
|
|
199
|
-
*
|
|
180
|
+
*
|
|
200
181
|
* Object example using named parameters (':', '@', or '$' prefixes
|
|
201
182
|
* are allowed):
|
|
202
183
|
* ```
|
|
@@ -210,88 +191,88 @@ interface SQLiteAPI {
|
|
|
210
191
|
* ...
|
|
211
192
|
* }
|
|
212
193
|
* ```
|
|
213
|
-
*
|
|
194
|
+
*
|
|
214
195
|
* Note that SQLite bindings are indexed beginning with 1, but when
|
|
215
196
|
* binding values from an array `a` the values begin with `a[0]`.
|
|
216
197
|
* @param stmt prepared statement pointer
|
|
217
|
-
* @param bindings
|
|
198
|
+
* @param bindings
|
|
218
199
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
219
200
|
*/
|
|
220
201
|
bind_collection(
|
|
221
202
|
stmt: number,
|
|
222
|
-
bindings: {[index: string]: SQLiteCompatibleType|null}|Array<SQLiteCompatibleType|null
|
|
223
|
-
): number
|
|
203
|
+
bindings: { [index: string]: SQLiteCompatibleType | null } | Array<SQLiteCompatibleType | null>,
|
|
204
|
+
): number
|
|
224
205
|
|
|
225
206
|
/**
|
|
226
207
|
* Bind value to prepared statement
|
|
227
|
-
*
|
|
208
|
+
*
|
|
228
209
|
* This convenience function calls the appropriate `bind_*` function
|
|
229
210
|
* based on the type of `value`. Note that binding indices begin with 1.
|
|
230
211
|
* @param stmt prepared statement pointer
|
|
231
212
|
* @param i binding index
|
|
232
|
-
* @param value
|
|
213
|
+
* @param value
|
|
233
214
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
234
215
|
*/
|
|
235
|
-
bind(stmt: number, i: number, value: SQLiteCompatibleType|null): number
|
|
216
|
+
bind(stmt: number, i: number, value: SQLiteCompatibleType | null): number
|
|
236
217
|
|
|
237
218
|
/**
|
|
238
219
|
* Bind blob to prepared statement parameter
|
|
239
|
-
*
|
|
220
|
+
*
|
|
240
221
|
* Note that binding indices begin with 1.
|
|
241
222
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
242
223
|
* @param stmt prepared statement pointer
|
|
243
224
|
* @param i binding index
|
|
244
|
-
* @param value
|
|
225
|
+
* @param value
|
|
245
226
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
246
227
|
*/
|
|
247
|
-
bind_blob(stmt: number, i: number, value: Uint8Array<ArrayBuffer
|
|
228
|
+
bind_blob(stmt: number, i: number, value: Uint8Array<ArrayBuffer> | Array<number>): number
|
|
248
229
|
|
|
249
230
|
/**
|
|
250
231
|
* Bind number to prepared statement parameter
|
|
251
|
-
*
|
|
232
|
+
*
|
|
252
233
|
* Note that binding indices begin with 1.
|
|
253
234
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
254
235
|
* @param stmt prepared statement pointer
|
|
255
236
|
* @param i binding index
|
|
256
|
-
* @param value
|
|
237
|
+
* @param value
|
|
257
238
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
258
239
|
*/
|
|
259
|
-
|
|
240
|
+
bind_double(stmt: number, i: number, value: number): number
|
|
260
241
|
|
|
261
|
-
|
|
242
|
+
/**
|
|
262
243
|
* Bind number to prepared statement parameter
|
|
263
|
-
*
|
|
244
|
+
*
|
|
264
245
|
* Note that binding indices begin with 1.
|
|
265
246
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
266
247
|
* @param stmt prepared statement pointer
|
|
267
248
|
* @param i binding index
|
|
268
|
-
* @param value
|
|
249
|
+
* @param value
|
|
269
250
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
270
251
|
*/
|
|
271
|
-
bind_int(stmt: number, i: number, value: number): number
|
|
252
|
+
bind_int(stmt: number, i: number, value: number): number
|
|
272
253
|
|
|
273
|
-
|
|
254
|
+
/**
|
|
274
255
|
* Bind number to prepared statement parameter
|
|
275
|
-
*
|
|
256
|
+
*
|
|
276
257
|
* Note that binding indices begin with 1.
|
|
277
258
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
278
259
|
* @param stmt prepared statement pointer
|
|
279
260
|
* @param i binding index
|
|
280
|
-
* @param value
|
|
261
|
+
* @param value
|
|
281
262
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
282
263
|
*/
|
|
283
|
-
|
|
264
|
+
bind_int64(stmt: number, i: number, value: bigint): number
|
|
284
265
|
|
|
285
|
-
|
|
266
|
+
/**
|
|
286
267
|
* Bind null to prepared statement
|
|
287
|
-
*
|
|
268
|
+
*
|
|
288
269
|
* Note that binding indices begin with 1.
|
|
289
270
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
290
271
|
* @param stmt prepared statement pointer
|
|
291
272
|
* @param i binding index
|
|
292
273
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
293
274
|
*/
|
|
294
|
-
bind_null(stmt: number, i: number): number
|
|
275
|
+
bind_null(stmt: number, i: number): number
|
|
295
276
|
|
|
296
277
|
/**
|
|
297
278
|
* Get number of bound parameters
|
|
@@ -299,30 +280,30 @@ interface SQLiteAPI {
|
|
|
299
280
|
* @param stmt prepared statement pointer
|
|
300
281
|
* @returns number of statement binding locations
|
|
301
282
|
*/
|
|
302
|
-
bind_parameter_count(stmt: number): number
|
|
283
|
+
bind_parameter_count(stmt: number): number
|
|
303
284
|
|
|
304
285
|
/**
|
|
305
286
|
* Get name of bound parameter
|
|
306
|
-
*
|
|
287
|
+
*
|
|
307
288
|
* Note that binding indices begin with 1.
|
|
308
289
|
* @see https://www.sqlite.org/c3ref/bind_parameter_name.html
|
|
309
290
|
* @param stmt prepared statement pointer
|
|
310
291
|
* @param i binding index
|
|
311
292
|
* @returns binding name
|
|
312
293
|
*/
|
|
313
|
-
bind_parameter_name(stmt: number, i: number): string
|
|
294
|
+
bind_parameter_name(stmt: number, i: number): string
|
|
314
295
|
|
|
315
|
-
|
|
296
|
+
/**
|
|
316
297
|
* Bind string to prepared statement
|
|
317
|
-
*
|
|
298
|
+
*
|
|
318
299
|
* Note that binding indices begin with 1.
|
|
319
300
|
* @see https://www.sqlite.org/c3ref/bind_blob.html
|
|
320
301
|
* @param stmt prepared statement pointer
|
|
321
302
|
* @param i binding index
|
|
322
|
-
* @param value
|
|
303
|
+
* @param value
|
|
323
304
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
324
305
|
*/
|
|
325
|
-
bind_text(stmt: number, i: number, value: string): number
|
|
306
|
+
bind_text(stmt: number, i: number, value: string): number
|
|
326
307
|
|
|
327
308
|
/**
|
|
328
309
|
* Get count of rows modified by last insert/update
|
|
@@ -330,7 +311,7 @@ interface SQLiteAPI {
|
|
|
330
311
|
* @param db database pointer
|
|
331
312
|
* @returns number of rows modified
|
|
332
313
|
*/
|
|
333
|
-
changes(db): number
|
|
314
|
+
changes(db): number
|
|
334
315
|
|
|
335
316
|
/**
|
|
336
317
|
* https://www.sqlite.org/c3ref/deserialize.html
|
|
@@ -349,8 +330,8 @@ interface SQLiteAPI {
|
|
|
349
330
|
pData: Uint8Array<ArrayBuffer>,
|
|
350
331
|
szDb: number,
|
|
351
332
|
szBuf: number,
|
|
352
|
-
mFlags: number
|
|
353
|
-
): number
|
|
333
|
+
mFlags: number,
|
|
334
|
+
): number
|
|
354
335
|
|
|
355
336
|
/**
|
|
356
337
|
* unsigned char *sqlite3_serialize(
|
|
@@ -364,7 +345,7 @@ interface SQLiteAPI {
|
|
|
364
345
|
db: number,
|
|
365
346
|
zSchema: string,
|
|
366
347
|
// mFlags: number
|
|
367
|
-
): Uint8Array<ArrayBuffer
|
|
348
|
+
): Uint8Array<ArrayBuffer>
|
|
368
349
|
|
|
369
350
|
// sqlite3_backup *sqlite3_backup_init(
|
|
370
351
|
// sqlite3 *pDest, /* Destination database handle */
|
|
@@ -377,25 +358,20 @@ interface SQLiteAPI {
|
|
|
377
358
|
// int sqlite3_backup_remaining(sqlite3_backup *p);
|
|
378
359
|
// int sqlite3_backup_pagecount(sqlite3_backup *p);
|
|
379
360
|
|
|
380
|
-
backup_init(
|
|
381
|
-
pDest: number,
|
|
382
|
-
zDestName: string,
|
|
383
|
-
pSource: number,
|
|
384
|
-
zSourceName: string
|
|
385
|
-
): number;
|
|
361
|
+
backup_init(pDest: number, zDestName: string, pSource: number, zSourceName: string): number
|
|
386
362
|
|
|
387
|
-
backup_step(p: number, nPage: number): number
|
|
388
|
-
backup_finish(p: number): number
|
|
389
|
-
backup_remaining(p: number): number
|
|
390
|
-
backup_pagecount(p: number): number
|
|
363
|
+
backup_step(p: number, nPage: number): number
|
|
364
|
+
backup_finish(p: number): number
|
|
365
|
+
backup_remaining(p: number): number
|
|
366
|
+
backup_pagecount(p: number): number
|
|
391
367
|
|
|
392
368
|
/**
|
|
393
369
|
* Combines the `backup_init`, `backup_step`, and `backup_finish` functions.
|
|
394
370
|
* destName/sourceName is usually "main" or "temp".
|
|
395
|
-
*
|
|
371
|
+
*
|
|
396
372
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
397
373
|
*/
|
|
398
|
-
backup(pDest: number, zDestName: string, pSource: number, zSourceName: string): number
|
|
374
|
+
backup(pDest: number, zDestName: string, pSource: number, zSourceName: string): number
|
|
399
375
|
|
|
400
376
|
/**
|
|
401
377
|
* Reset all bindings on a prepared statement.
|
|
@@ -403,7 +379,7 @@ interface SQLiteAPI {
|
|
|
403
379
|
* @param stmt prepared statement pointer
|
|
404
380
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
405
381
|
*/
|
|
406
|
-
clear_bindings(stmt: number): number
|
|
382
|
+
clear_bindings(stmt: number): number
|
|
407
383
|
|
|
408
384
|
/**
|
|
409
385
|
* Close database connection
|
|
@@ -411,27 +387,27 @@ interface SQLiteAPI {
|
|
|
411
387
|
* @param db database pointer
|
|
412
388
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
413
389
|
*/
|
|
414
|
-
close(db): Promise<number
|
|
390
|
+
close(db): Promise<number>
|
|
415
391
|
|
|
416
392
|
/**
|
|
417
393
|
* Call the appropriate `column_*` function based on the column type
|
|
418
|
-
*
|
|
394
|
+
*
|
|
419
395
|
* The type is determined by calling {@link column_type}, which may
|
|
420
396
|
* not match the type declared in `CREATE TABLE`. Note that if the column
|
|
421
397
|
* value is a blob then as with `column_blob` the result may be invalid
|
|
422
398
|
* after the next SQLite call; copy if it needs to be retained.
|
|
423
|
-
*
|
|
399
|
+
*
|
|
424
400
|
* Integer values are returned as Number if within the min/max safe
|
|
425
401
|
* integer bounds, otherwise they are returned as BigInt.
|
|
426
402
|
* @param stmt prepared statement pointer
|
|
427
403
|
* @param i column index
|
|
428
404
|
* @returns column value
|
|
429
405
|
*/
|
|
430
|
-
column(stmt: number, i: number): SQLiteCompatibleType
|
|
406
|
+
column(stmt: number, i: number): SQLiteCompatibleType
|
|
431
407
|
|
|
432
408
|
/**
|
|
433
409
|
* Extract a column value from a row after a prepared statment {@link step}
|
|
434
|
-
*
|
|
410
|
+
*
|
|
435
411
|
* The contents of the returned buffer may be invalid after the
|
|
436
412
|
* next SQLite call. Make a copy of the data (e.g. with `.slice()`)
|
|
437
413
|
* if longer retention is required.
|
|
@@ -440,7 +416,7 @@ interface SQLiteAPI {
|
|
|
440
416
|
* @param i column index
|
|
441
417
|
* @returns column value
|
|
442
418
|
*/
|
|
443
|
-
column_blob(stmt: number, i: number): Uint8Array<ArrayBuffer
|
|
419
|
+
column_blob(stmt: number, i: number): Uint8Array<ArrayBuffer>
|
|
444
420
|
|
|
445
421
|
/**
|
|
446
422
|
* Get storage size for column text or blob
|
|
@@ -449,7 +425,7 @@ interface SQLiteAPI {
|
|
|
449
425
|
* @param i column index
|
|
450
426
|
* @returns number of bytes in column text or blob
|
|
451
427
|
*/
|
|
452
|
-
column_bytes(stmt: number, i: number): number
|
|
428
|
+
column_bytes(stmt: number, i: number): number
|
|
453
429
|
|
|
454
430
|
/**
|
|
455
431
|
* Get number of columns for a prepared statement
|
|
@@ -457,7 +433,7 @@ interface SQLiteAPI {
|
|
|
457
433
|
* @param stmt prepared statement pointer
|
|
458
434
|
* @returns number of columns
|
|
459
435
|
*/
|
|
460
|
-
column_count(stmt: number): number
|
|
436
|
+
column_count(stmt: number): number
|
|
461
437
|
|
|
462
438
|
/**
|
|
463
439
|
* Extract a column value from a row after a prepared statment {@link step}
|
|
@@ -466,7 +442,7 @@ interface SQLiteAPI {
|
|
|
466
442
|
* @param i column index
|
|
467
443
|
* @returns column value
|
|
468
444
|
*/
|
|
469
|
-
column_double(stmt: number, i: number): number
|
|
445
|
+
column_double(stmt: number, i: number): number
|
|
470
446
|
|
|
471
447
|
/**
|
|
472
448
|
* Extract a column value from a row after a prepared statment {@link step}
|
|
@@ -475,7 +451,7 @@ interface SQLiteAPI {
|
|
|
475
451
|
* @param i column index
|
|
476
452
|
* @returns column value
|
|
477
453
|
*/
|
|
478
|
-
column_int(stmt: number, i: number): number
|
|
454
|
+
column_int(stmt: number, i: number): number
|
|
479
455
|
|
|
480
456
|
/**
|
|
481
457
|
* Extract a column value from a row after a prepared statment {@link step}
|
|
@@ -484,26 +460,26 @@ interface SQLiteAPI {
|
|
|
484
460
|
* @param i column index
|
|
485
461
|
* @returns column value
|
|
486
462
|
*/
|
|
487
|
-
column_int64(stmt: number, i: number): bigint
|
|
463
|
+
column_int64(stmt: number, i: number): bigint
|
|
488
464
|
|
|
489
|
-
|
|
465
|
+
/**
|
|
490
466
|
* Get a column name for a prepared statement
|
|
491
467
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
|
492
468
|
* @param stmt prepared statement pointer
|
|
493
469
|
* @param i column index
|
|
494
470
|
* @returns column name
|
|
495
471
|
*/
|
|
496
|
-
column_name(stmt: number, i: number): string
|
|
472
|
+
column_name(stmt: number, i: number): string
|
|
497
473
|
|
|
498
474
|
/**
|
|
499
475
|
* Get names for all columns of a prepared statement
|
|
500
|
-
*
|
|
476
|
+
*
|
|
501
477
|
* This is a convenience function that calls {@link column_count} and
|
|
502
478
|
* {@link column_name}.
|
|
503
|
-
* @param stmt
|
|
479
|
+
* @param stmt
|
|
504
480
|
* @returns array of column names
|
|
505
481
|
*/
|
|
506
|
-
column_names(stmt: number): Array<string
|
|
482
|
+
column_names(stmt: number): Array<string>
|
|
507
483
|
|
|
508
484
|
/**
|
|
509
485
|
* Extract a column value from a row after a prepared statment {@link step}
|
|
@@ -512,48 +488,46 @@ interface SQLiteAPI {
|
|
|
512
488
|
* @param i column index
|
|
513
489
|
* @returns column value
|
|
514
490
|
*/
|
|
515
|
-
column_text(stmt: number, i: number): string
|
|
491
|
+
column_text(stmt: number, i: number): string
|
|
516
492
|
|
|
517
493
|
/**
|
|
518
494
|
* Get column type for a prepared statement
|
|
519
|
-
*
|
|
495
|
+
*
|
|
520
496
|
* Note that this type may not match the type declared in `CREATE TABLE`.
|
|
521
497
|
* @see https://www.sqlite.org/c3ref/column_blob.html
|
|
522
498
|
* @param stmt prepared statement pointer
|
|
523
499
|
* @param i column index
|
|
524
500
|
* @returns enumeration value for type
|
|
525
501
|
*/
|
|
526
|
-
column_type(stmt: number, i: number): number
|
|
502
|
+
column_type(stmt: number, i: number): number
|
|
527
503
|
|
|
528
504
|
/**
|
|
529
505
|
* Register a commit hook
|
|
530
|
-
*
|
|
506
|
+
*
|
|
531
507
|
* @see https://www.sqlite.org/c3ref/commit_hook.html
|
|
532
508
|
*
|
|
533
509
|
* @param db database pointer
|
|
534
510
|
* @param callback If a non-zero value is returned, commit is converted into
|
|
535
511
|
* a rollback; disables callback when null
|
|
536
512
|
*/
|
|
537
|
-
commit_hook(
|
|
538
|
-
db: number,
|
|
539
|
-
callback: (() => number) | null): void;
|
|
513
|
+
commit_hook(db: number, callback: (() => number) | null): void
|
|
540
514
|
|
|
541
515
|
/**
|
|
542
516
|
* Create or redefine SQL functions
|
|
543
|
-
*
|
|
517
|
+
*
|
|
544
518
|
* The application data passed is ignored. Use closures instead.
|
|
545
|
-
*
|
|
519
|
+
*
|
|
546
520
|
* If any callback function returns a Promise, that function must
|
|
547
521
|
* be declared `async`, i.e. it must allow use of `await`.
|
|
548
522
|
* @see https://sqlite.org/c3ref/create_function.html
|
|
549
523
|
* @param db database pointer
|
|
550
|
-
* @param zFunctionName
|
|
524
|
+
* @param zFunctionName
|
|
551
525
|
* @param nArg number of function arguments
|
|
552
526
|
* @param eTextRep text encoding (and other flags)
|
|
553
527
|
* @param pApp application data (ignored)
|
|
554
|
-
* @param xFunc
|
|
555
|
-
* @param xStep
|
|
556
|
-
* @param xFinal
|
|
528
|
+
* @param xFunc
|
|
529
|
+
* @param xStep
|
|
530
|
+
* @param xFinal
|
|
557
531
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
558
532
|
*/
|
|
559
533
|
create_function(
|
|
@@ -562,9 +536,10 @@ interface SQLiteAPI {
|
|
|
562
536
|
nArg: number,
|
|
563
537
|
eTextRep: number,
|
|
564
538
|
pApp: number,
|
|
565
|
-
xFunc?: (context: number, values: Uint32Array) => void|Promise<void>,
|
|
566
|
-
xStep?: (context: number, values: Uint32Array) => void|Promise<void>,
|
|
567
|
-
xFinal?: (context: number) => void|Promise<void
|
|
539
|
+
xFunc?: (context: number, values: Uint32Array) => void | Promise<void>,
|
|
540
|
+
xStep?: (context: number, values: Uint32Array) => void | Promise<void>,
|
|
541
|
+
xFinal?: (context: number) => void | Promise<void>,
|
|
542
|
+
): number
|
|
568
543
|
|
|
569
544
|
/**
|
|
570
545
|
* Get number of columns in current row of a prepared statement
|
|
@@ -572,11 +547,11 @@ interface SQLiteAPI {
|
|
|
572
547
|
* @param stmt prepared statement pointer
|
|
573
548
|
* @returns number of columns
|
|
574
549
|
*/
|
|
575
|
-
data_count(stmt: number): number
|
|
550
|
+
data_count(stmt: number): number
|
|
576
551
|
|
|
577
552
|
/**
|
|
578
553
|
* One-step query execution interface
|
|
579
|
-
*
|
|
554
|
+
*
|
|
580
555
|
* The implementation of this function uses {@link row}, which makes a
|
|
581
556
|
* copy of blobs and returns BigInt for integers outside the safe integer
|
|
582
557
|
* bounds for Number.
|
|
@@ -589,21 +564,21 @@ interface SQLiteAPI {
|
|
|
589
564
|
exec(
|
|
590
565
|
db: number,
|
|
591
566
|
zSQL: string,
|
|
592
|
-
callback?: (row: Array<SQLiteCompatibleType|null>, columns: string[]) => void
|
|
593
|
-
|
|
594
|
-
): number
|
|
567
|
+
callback?: (row: Array<SQLiteCompatibleType | null>, columns: string[]) => void,
|
|
568
|
+
// ): Promise<number>;
|
|
569
|
+
): number
|
|
595
570
|
|
|
596
571
|
/**
|
|
597
572
|
* Destroy a prepared statement object compiled by {@link statements}
|
|
598
573
|
* with the `unscoped` option set to `true`
|
|
599
|
-
*
|
|
574
|
+
*
|
|
600
575
|
* This function does *not* throw on error.
|
|
601
576
|
* @see https://www.sqlite.org/c3ref/finalize.html
|
|
602
577
|
* @param stmt prepared statement pointer
|
|
603
578
|
* @returns Promise resolving to `SQLITE_OK` or error status
|
|
604
579
|
*/
|
|
605
580
|
// finalize(stmt: number): Promise<number>;
|
|
606
|
-
finalize(stmt: number): number
|
|
581
|
+
finalize(stmt: number): number
|
|
607
582
|
|
|
608
583
|
/**
|
|
609
584
|
* Test for autocommit mode
|
|
@@ -611,14 +586,14 @@ interface SQLiteAPI {
|
|
|
611
586
|
* @param db database pointer
|
|
612
587
|
* @returns Non-zero if autocommit mode is on, zero otherwise
|
|
613
588
|
*/
|
|
614
|
-
get_autocommit(db: number): number
|
|
589
|
+
get_autocommit(db: number): number
|
|
615
590
|
|
|
616
591
|
/**
|
|
617
592
|
* Get SQLite library version
|
|
618
593
|
* @see https://www.sqlite.org/c3ref/libversion.html
|
|
619
594
|
* @returns version string, e.g. '3.35.5'
|
|
620
595
|
*/
|
|
621
|
-
libversion(): string
|
|
596
|
+
libversion(): string
|
|
622
597
|
|
|
623
598
|
/**
|
|
624
599
|
* Get SQLite library version
|
|
@@ -632,51 +607,40 @@ interface SQLiteAPI {
|
|
|
632
607
|
* @see https://www.sqlite.org/c3ref/limit.html
|
|
633
608
|
* @param db database pointer
|
|
634
609
|
* @param id limit category
|
|
635
|
-
* @param newVal
|
|
610
|
+
* @param newVal
|
|
636
611
|
* @returns previous setting
|
|
637
612
|
*/
|
|
638
|
-
limit(
|
|
639
|
-
db: number,
|
|
640
|
-
id: number,
|
|
641
|
-
newVal: number): number;
|
|
613
|
+
limit(db: number, id: number, newVal: number): number
|
|
642
614
|
|
|
643
615
|
/**
|
|
644
616
|
* Opening a new database connection.
|
|
645
|
-
*
|
|
617
|
+
*
|
|
646
618
|
* Note that this function differs from the C API in that it
|
|
647
619
|
* returns the Promise-wrapped database pointer (instead of a
|
|
648
620
|
* result code).
|
|
649
621
|
* @see https://sqlite.org/c3ref/open.html
|
|
650
|
-
* @param zFilename
|
|
622
|
+
* @param zFilename
|
|
651
623
|
* @param iFlags `SQLite.SQLITE_OPEN_CREATE | SQLite.SQLITE_OPEN_READWRITE` (0x6) if omitted
|
|
652
624
|
* @param zVfs VFS name
|
|
653
625
|
* @returns Promise-wrapped database pointer.
|
|
654
626
|
*/
|
|
655
|
-
open_v2(
|
|
656
|
-
zFilename: string,
|
|
657
|
-
iFlags?: number,
|
|
658
|
-
zVfs?: string
|
|
659
|
-
): Promise<number>;
|
|
627
|
+
open_v2(zFilename: string, iFlags?: number, zVfs?: string): Promise<number>
|
|
660
628
|
|
|
661
|
-
open_v2Sync(
|
|
662
|
-
zFilename: string,
|
|
663
|
-
iFlags?: number,
|
|
664
|
-
zVfs?: string
|
|
665
|
-
): number;
|
|
629
|
+
open_v2Sync(zFilename: string, iFlags?: number, zVfs?: string): number
|
|
666
630
|
|
|
667
631
|
/**
|
|
668
632
|
* Specify callback to be invoked between long-running queries
|
|
669
|
-
*
|
|
633
|
+
*
|
|
670
634
|
* The application data passed is ignored. Use closures instead.
|
|
671
|
-
*
|
|
635
|
+
*
|
|
672
636
|
* If any callback function returns a Promise, that function must
|
|
673
637
|
* be declared `async`, i.e. it must allow use of `await`.
|
|
674
638
|
* @param db database pointer
|
|
675
639
|
* @param nProgressOps target number of database operations between handler invocations
|
|
676
|
-
* @param handler
|
|
677
|
-
* @param userData
|
|
640
|
+
* @param handler
|
|
641
|
+
* @param userData
|
|
678
642
|
*/
|
|
679
|
-
progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number|Promise<number>, userData)
|
|
643
|
+
progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number | Promise<number>, userData)
|
|
680
644
|
|
|
681
645
|
/**
|
|
682
646
|
* Reset a prepared statement object
|
|
@@ -684,97 +648,105 @@ interface SQLiteAPI {
|
|
|
684
648
|
* @param stmt prepared statement pointer
|
|
685
649
|
* @returns `SQLITE_OK` (rejects on error)
|
|
686
650
|
*/
|
|
687
|
-
reset(stmt: number): number
|
|
651
|
+
reset(stmt: number): number
|
|
688
652
|
|
|
689
653
|
/**
|
|
690
654
|
* Convenience function to call `result_*` based of the type of `value`
|
|
691
655
|
* @param context context pointer
|
|
692
|
-
* @param value
|
|
656
|
+
* @param value
|
|
693
657
|
*/
|
|
694
|
-
result(context: number, value: (
|
|
658
|
+
result(context: number, value: ( number[]) | null): void
|
|
695
659
|
|
|
696
660
|
/**
|
|
697
661
|
* Set the result of a function or vtable column
|
|
698
662
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
699
663
|
* @param context context pointer
|
|
700
|
-
* @param value
|
|
664
|
+
* @param value
|
|
701
665
|
*/
|
|
702
|
-
result_blob(context: number, value: Uint8Array<ArrayBuffer
|
|
666
|
+
result_blob(context: number, value: Uint8Array<ArrayBuffer> | number[]): void
|
|
703
667
|
|
|
704
668
|
/**
|
|
705
669
|
* Set the result of a function or vtable column
|
|
706
670
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
707
671
|
* @param context context pointer
|
|
708
|
-
* @param value
|
|
672
|
+
* @param value
|
|
709
673
|
*/
|
|
710
|
-
result_double(context: number, value: number): void
|
|
674
|
+
result_double(context: number, value: number): void
|
|
711
675
|
|
|
712
676
|
/**
|
|
713
677
|
* Set the result of a function or vtable column
|
|
714
678
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
715
679
|
* @param context context pointer
|
|
716
|
-
* @param value
|
|
680
|
+
* @param value
|
|
717
681
|
*/
|
|
718
|
-
result_int(context: number, value: number): void
|
|
682
|
+
result_int(context: number, value: number): void
|
|
719
683
|
|
|
720
684
|
/**
|
|
721
685
|
* Set the result of a function or vtable column
|
|
722
686
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
723
687
|
* @param context context pointer
|
|
724
|
-
* @param value
|
|
688
|
+
* @param value
|
|
725
689
|
*/
|
|
726
|
-
result_int64(context: number, value: bigint): void
|
|
690
|
+
result_int64(context: number, value: bigint): void
|
|
727
691
|
|
|
728
692
|
/**
|
|
729
693
|
* Set the result of a function or vtable column
|
|
730
694
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
731
695
|
* @param context context pointer
|
|
732
696
|
*/
|
|
733
|
-
result_null(context: number): void
|
|
697
|
+
result_null(context: number): void
|
|
734
698
|
|
|
735
699
|
/**
|
|
736
700
|
* Set the result of a function or vtable column
|
|
737
701
|
* @see https://sqlite.org/c3ref/result_blob.html
|
|
738
702
|
* @param context context pointer
|
|
739
|
-
* @param value
|
|
703
|
+
* @param value
|
|
740
704
|
*/
|
|
741
|
-
|
|
705
|
+
result_text(context: number, value: string): void
|
|
742
706
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
row(stmt: number): Array<SQLiteCompatibleType|null
|
|
707
|
+
/**
|
|
708
|
+
* Get all column data for a row from a prepared statement step
|
|
709
|
+
*
|
|
710
|
+
* This convenience function will return a copy of any blob, unlike
|
|
711
|
+
* {@link column_blob} which returns a value referencing volatile WASM
|
|
712
|
+
* memory with short validity. Like {@link column}, it will return a
|
|
713
|
+
* BigInt for integers outside the safe integer bounds for Number.
|
|
714
|
+
* @param stmt prepared statement pointer
|
|
715
|
+
* @returns row data
|
|
716
|
+
*/
|
|
717
|
+
row(stmt: number): Array<SQLiteCompatibleType | null>
|
|
754
718
|
|
|
755
719
|
/**
|
|
756
720
|
* Register a callback function that is invoked to authorize certain SQL statement actions.
|
|
757
721
|
* @see https://www.sqlite.org/c3ref/set_authorizer.html
|
|
758
722
|
* @param db database pointer
|
|
759
|
-
* @param authFunction
|
|
760
|
-
* @param userData
|
|
723
|
+
* @param authFunction
|
|
724
|
+
* @param userData
|
|
761
725
|
*/
|
|
762
726
|
set_authorizer(
|
|
763
727
|
db: number,
|
|
764
|
-
authFunction: (
|
|
765
|
-
|
|
766
|
-
|
|
728
|
+
authFunction: (
|
|
729
|
+
userData: any,
|
|
730
|
+
iActionCode: number,
|
|
731
|
+
param3: string | null,
|
|
732
|
+
param4: string | null,
|
|
733
|
+
param5: string | null,
|
|
734
|
+
param6: string | null,
|
|
735
|
+
) => number | Promise<number>,
|
|
736
|
+
userData: any,
|
|
737
|
+
): number
|
|
738
|
+
|
|
767
739
|
/**
|
|
768
740
|
* Get statement SQL
|
|
769
741
|
* @see https://www.sqlite.org/c3ref/expanded_sql.html
|
|
770
742
|
* @param stmt prepared statement pointer
|
|
771
743
|
* @returns SQL
|
|
772
744
|
*/
|
|
773
|
-
sql(stmt: number): string
|
|
745
|
+
sql(stmt: number): string
|
|
774
746
|
|
|
775
747
|
/**
|
|
776
748
|
* SQL statement iterator
|
|
777
|
-
*
|
|
749
|
+
*
|
|
778
750
|
* This function manages statement compilation by creating an async
|
|
779
751
|
* iterator that yields a prepared statement handle on each iteration.
|
|
780
752
|
* It is typically used with a `for await` loop (in an async function),
|
|
@@ -783,7 +755,7 @@ interface SQLiteAPI {
|
|
|
783
755
|
* // Compile one statement on each iteration of this loop.
|
|
784
756
|
* for await (const stmt of sqlite3.statements(db, sql)) {
|
|
785
757
|
* // Bind parameters here if using SQLite placeholders.
|
|
786
|
-
*
|
|
758
|
+
*
|
|
787
759
|
* // Execute the statement with this loop.
|
|
788
760
|
* while (await sqlite3.step(stmt) === SQLite.SQLITE_ROW) {
|
|
789
761
|
* // Collect row data here.
|
|
@@ -792,14 +764,14 @@ interface SQLiteAPI {
|
|
|
792
764
|
* // Change bindings, reset, and execute again if desired.
|
|
793
765
|
* }
|
|
794
766
|
* ```
|
|
795
|
-
*
|
|
767
|
+
*
|
|
796
768
|
* By default, the lifetime of a yielded prepared statement is managed
|
|
797
769
|
* automatically by the iterator, ending at the end of each iteration.
|
|
798
770
|
* {@link finalize} should *not* be called on a statement provided by
|
|
799
771
|
* the iterator unless the `unscoped` option is set to `true` (that
|
|
800
772
|
* option is provided for applications that wish to manage statement
|
|
801
773
|
* lifetimes manually).
|
|
802
|
-
*
|
|
774
|
+
*
|
|
803
775
|
* If using the iterator manually, i.e. by calling its `next`
|
|
804
776
|
* method, be sure to call the `return` method if iteration
|
|
805
777
|
* is abandoned before completion (`for await` and other implicit
|
|
@@ -807,11 +779,11 @@ interface SQLiteAPI {
|
|
|
807
779
|
* to ensure that all allocated resources are released.
|
|
808
780
|
* @see https://www.sqlite.org/c3ref/prepare.html
|
|
809
781
|
* @param db database pointer
|
|
810
|
-
* @param sql
|
|
782
|
+
* @param sql
|
|
811
783
|
* @param options
|
|
812
784
|
*/
|
|
813
785
|
// statements(db: number, sql: string, options?: SQLitePrepareOptions): AsyncIterable<number>;
|
|
814
|
-
statements(db: number, sql: string, options?: SQLitePrepareOptions): ReadonlyArray<number
|
|
786
|
+
statements(db: number, sql: string, options?: SQLitePrepareOptions): ReadonlyArray<number>
|
|
815
787
|
|
|
816
788
|
/**
|
|
817
789
|
* Evaluate an SQL statement
|
|
@@ -821,11 +793,11 @@ interface SQLiteAPI {
|
|
|
821
793
|
* (rejects on error)
|
|
822
794
|
*/
|
|
823
795
|
// step(stmt: number): Promise<number>;
|
|
824
|
-
step(stmt: number): number
|
|
796
|
+
step(stmt: number): number
|
|
825
797
|
|
|
826
|
-
|
|
798
|
+
/**
|
|
827
799
|
* Register an update hook
|
|
828
|
-
*
|
|
800
|
+
*
|
|
829
801
|
* The callback is invoked whenever a row is updated, inserted, or deleted
|
|
830
802
|
* in a rowid table on this connection.
|
|
831
803
|
* @see https://www.sqlite.org/c3ref/update_hook.html
|
|
@@ -835,33 +807,32 @@ interface SQLiteAPI {
|
|
|
835
807
|
* - SQLITE_INSERT: 18
|
|
836
808
|
* - SQLITE_UPDATE: 23
|
|
837
809
|
* @see https://www.sqlite.org/c3ref/c_alter_table.html
|
|
838
|
-
*
|
|
810
|
+
*
|
|
839
811
|
* @param db database pointer
|
|
840
812
|
* @param callback
|
|
841
813
|
*/
|
|
842
|
-
|
|
814
|
+
update_hook(
|
|
843
815
|
db: number,
|
|
844
|
-
callback: (updateType: number, dbName: string|null, tblName: string|null, rowid: bigint) => void
|
|
845
|
-
|
|
846
|
-
|
|
816
|
+
callback: (updateType: number, dbName: string | null, tblName: string | null, rowid: bigint) => void,
|
|
817
|
+
): void
|
|
847
818
|
|
|
848
819
|
/**
|
|
849
820
|
* Extract a value from `sqlite3_value`
|
|
850
|
-
*
|
|
821
|
+
*
|
|
851
822
|
* This is a convenience function that calls the appropriate `value_*`
|
|
852
823
|
* function based on its type. Note that if the value is a blob then as
|
|
853
824
|
* with `value_blob` the result may be invalid after the next SQLite call.
|
|
854
|
-
*
|
|
825
|
+
*
|
|
855
826
|
* Integer values are returned as Number if within the min/max safe
|
|
856
827
|
* integer bounds, otherwise they are returned as BigInt.
|
|
857
828
|
* @param pValue `sqlite3_value` pointer
|
|
858
829
|
* @returns value
|
|
859
830
|
*/
|
|
860
|
-
value(pValue: number): SQLiteCompatibleType
|
|
831
|
+
value(pValue: number): SQLiteCompatibleType
|
|
861
832
|
|
|
862
833
|
/**
|
|
863
834
|
* Extract a value from `sqlite3_value`
|
|
864
|
-
*
|
|
835
|
+
*
|
|
865
836
|
* The contents of the returned buffer may be invalid after the
|
|
866
837
|
* next SQLite call. Make a copy of the data (e.g. with `.slice()`)
|
|
867
838
|
* if longer retention is required.
|
|
@@ -869,7 +840,7 @@ interface SQLiteAPI {
|
|
|
869
840
|
* @param pValue `sqlite3_value` pointer
|
|
870
841
|
* @returns value
|
|
871
842
|
*/
|
|
872
|
-
value_blob(pValue: number): Uint8Array<ArrayBuffer
|
|
843
|
+
value_blob(pValue: number): Uint8Array<ArrayBuffer>
|
|
873
844
|
|
|
874
845
|
/**
|
|
875
846
|
* Get blob or text size for value
|
|
@@ -877,7 +848,7 @@ interface SQLiteAPI {
|
|
|
877
848
|
* @param pValue `sqlite3_value` pointer
|
|
878
849
|
* @returns size
|
|
879
850
|
*/
|
|
880
|
-
value_bytes(pValue: number): number
|
|
851
|
+
value_bytes(pValue: number): number
|
|
881
852
|
|
|
882
853
|
/**
|
|
883
854
|
* Extract a value from `sqlite3_value`
|
|
@@ -885,7 +856,7 @@ interface SQLiteAPI {
|
|
|
885
856
|
* @param pValue `sqlite3_value` pointer
|
|
886
857
|
* @returns value
|
|
887
858
|
*/
|
|
888
|
-
value_double(pValue: number): number
|
|
859
|
+
value_double(pValue: number): number
|
|
889
860
|
|
|
890
861
|
/**
|
|
891
862
|
* Extract a value from `sqlite3_value`
|
|
@@ -893,7 +864,7 @@ interface SQLiteAPI {
|
|
|
893
864
|
* @param pValue `sqlite3_value` pointer
|
|
894
865
|
* @returns value
|
|
895
866
|
*/
|
|
896
|
-
value_int(pValue: number): number
|
|
867
|
+
value_int(pValue: number): number
|
|
897
868
|
|
|
898
869
|
/**
|
|
899
870
|
* Extract a value from `sqlite3_value`
|
|
@@ -901,7 +872,7 @@ interface SQLiteAPI {
|
|
|
901
872
|
* @param pValue `sqlite3_value` pointer
|
|
902
873
|
* @returns value
|
|
903
874
|
*/
|
|
904
|
-
|
|
875
|
+
value_int64(pValue: number): bigint
|
|
905
876
|
|
|
906
877
|
/**
|
|
907
878
|
* Extract a value from `sqlite3_value`
|
|
@@ -909,7 +880,7 @@ interface SQLiteAPI {
|
|
|
909
880
|
* @param pValue `sqlite3_value` pointer
|
|
910
881
|
* @returns value
|
|
911
882
|
*/
|
|
912
|
-
value_text(pValue: number): string
|
|
883
|
+
value_text(pValue: number): string
|
|
913
884
|
|
|
914
885
|
/**
|
|
915
886
|
* Get type of `sqlite3_value`
|
|
@@ -917,355 +888,376 @@ interface SQLiteAPI {
|
|
|
917
888
|
* @param pValue `sqlite3_value` pointer
|
|
918
889
|
* @returns enumeration value for type
|
|
919
890
|
*/
|
|
920
|
-
value_type(pValue: number): number
|
|
921
|
-
|
|
891
|
+
value_type(pValue: number): number
|
|
892
|
+
|
|
922
893
|
/**
|
|
923
894
|
* Register a new Virtual File System.
|
|
924
|
-
*
|
|
895
|
+
*
|
|
925
896
|
* @see https://www.sqlite.org/c3ref/vfs_find.html
|
|
926
897
|
* @param vfs VFS object
|
|
927
|
-
* @param makeDefault
|
|
898
|
+
* @param makeDefault
|
|
928
899
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
929
900
|
*/
|
|
930
|
-
vfs_register(vfs: SQLiteVFS, makeDefault?: boolean): number
|
|
901
|
+
vfs_register(vfs: SQLiteVFS, makeDefault?: boolean): number
|
|
931
902
|
|
|
932
|
-
vfs_registered: Set<string
|
|
903
|
+
vfs_registered: Set<string>
|
|
933
904
|
|
|
934
905
|
/**
|
|
935
906
|
* Create a new session object for a database.
|
|
936
|
-
*
|
|
907
|
+
*
|
|
937
908
|
* @param db database pointer
|
|
938
909
|
* @param zDb database name
|
|
939
910
|
* @returns session pointer
|
|
940
911
|
*/
|
|
941
|
-
session_create(db: number, zDb: string): number
|
|
912
|
+
session_create(db: number, zDb: string): number
|
|
942
913
|
|
|
943
914
|
/**
|
|
944
915
|
* Attach a database to a session.
|
|
945
|
-
*
|
|
916
|
+
*
|
|
946
917
|
* @param pSession session pointer
|
|
947
918
|
* @param zTab table name
|
|
948
919
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
949
920
|
*/
|
|
950
|
-
session_attach(pSession: number, zTab: string | null): number
|
|
921
|
+
session_attach(pSession: number, zTab: string | null): number
|
|
951
922
|
|
|
952
923
|
/**
|
|
953
924
|
* Enable or disable a session.
|
|
954
|
-
*
|
|
925
|
+
*
|
|
955
926
|
* @param pSession session pointer
|
|
956
|
-
* @param enable
|
|
927
|
+
* @param enable
|
|
957
928
|
*/
|
|
958
|
-
session_enable(pSession: number, enable: boolean): void
|
|
929
|
+
session_enable(pSession: number, enable: boolean): void
|
|
959
930
|
|
|
960
931
|
/**
|
|
961
932
|
* Get the changeset for a session.
|
|
962
|
-
*
|
|
933
|
+
*
|
|
963
934
|
* @param pSession session pointer
|
|
964
935
|
* @returns {result: number, size: number, changeset: Uint8Array<ArrayBuffer>}
|
|
965
936
|
*/
|
|
966
937
|
session_changeset(pSession: number): {
|
|
967
|
-
result: number
|
|
968
|
-
size: number
|
|
969
|
-
changeset: Uint8Array<ArrayBuffer> | null
|
|
970
|
-
}
|
|
938
|
+
result: number
|
|
939
|
+
size: number
|
|
940
|
+
changeset: Uint8Array<ArrayBuffer> | null
|
|
941
|
+
}
|
|
971
942
|
|
|
972
943
|
session_changeset_inverted(pSession: number): {
|
|
973
|
-
result: number
|
|
974
|
-
size: number
|
|
975
|
-
changeset: Uint8Array<ArrayBuffer
|
|
976
|
-
}
|
|
944
|
+
result: number
|
|
945
|
+
size: number
|
|
946
|
+
changeset: Uint8Array<ArrayBuffer>
|
|
947
|
+
}
|
|
977
948
|
|
|
978
949
|
/**
|
|
979
950
|
* Delete a session object.
|
|
980
|
-
*
|
|
951
|
+
*
|
|
981
952
|
* @param pSession session pointer
|
|
982
953
|
*/
|
|
983
|
-
session_delete(pSession: number): void
|
|
954
|
+
session_delete(pSession: number): void
|
|
984
955
|
|
|
985
956
|
/**
|
|
986
957
|
* Start a changeset.
|
|
987
|
-
*
|
|
958
|
+
*
|
|
988
959
|
* @param changeset changeset blob to import from
|
|
989
960
|
* @returns changeset iterator pointer
|
|
990
961
|
*/
|
|
991
|
-
changeset_start(changesetBlob: Uint8Array<ArrayBuffer>): number
|
|
962
|
+
changeset_start(changesetBlob: Uint8Array<ArrayBuffer>): number
|
|
992
963
|
|
|
993
964
|
/**
|
|
994
965
|
* Finalize a changeset iterator.
|
|
995
|
-
*
|
|
966
|
+
*
|
|
996
967
|
* @param pIter changeset iterator pointer
|
|
997
968
|
* @returns `SQLITE_OK` (throws exception on error)
|
|
998
969
|
*/
|
|
999
|
-
changeset_finalize(pIter: number): number
|
|
970
|
+
changeset_finalize(pIter: number): number
|
|
1000
971
|
|
|
1001
972
|
/**
|
|
1002
973
|
* Invert a changeset.
|
|
1003
|
-
*
|
|
974
|
+
*
|
|
1004
975
|
* @param input changeset to invert
|
|
1005
976
|
* @returns inverted changeset
|
|
1006
977
|
*/
|
|
1007
|
-
changeset_invert(input: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer
|
|
978
|
+
changeset_invert(input: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>
|
|
1008
979
|
|
|
1009
980
|
/**
|
|
1010
|
-
* Apply a changeset to
|
|
1011
|
-
*
|
|
1012
|
-
* @param db database pointer
|
|
1013
|
-
* @param changeset changeset to apply
|
|
1014
|
-
* @
|
|
981
|
+
* Apply a changeset to the main database of the database handle passed.
|
|
982
|
+
*
|
|
983
|
+
* @param db - database handle pointer
|
|
984
|
+
* @param changeset - changeset to apply
|
|
985
|
+
* @param xFilter - Optional filter callback invoked once per table in the
|
|
986
|
+
* changeset. Return zero to skip changes for that table, non-zero to
|
|
987
|
+
* include them. Pass null to include all tables.
|
|
988
|
+
* @param xConflict - Conflict handler invoked for each conflict with the
|
|
989
|
+
* conflict type `eConflict` ({@link SQLITE_CHANGESET_DATA},
|
|
990
|
+
* {@link SQLITE_CHANGESET_NOTFOUND}, {@link SQLITE_CHANGESET_CONFLICT},
|
|
991
|
+
* {@link SQLITE_CHANGESET_CONSTRAINT}, or {@link SQLITE_CHANGESET_FOREIGN_KEY}).
|
|
992
|
+
* Must return {@link SQLITE_CHANGESET_OMIT}, {@link SQLITE_CHANGESET_REPLACE},
|
|
993
|
+
* or {@link SQLITE_CHANGESET_ABORT}.
|
|
994
|
+
* @returns {@link SQLITE_OK} if successful.
|
|
995
|
+
* @throws {@link SQLiteError} if an error occurs.
|
|
996
|
+
*
|
|
997
|
+
* @see {@link https://sqlite.org/session/sqlite3changeset_apply.html}
|
|
1015
998
|
*/
|
|
1016
|
-
changeset_apply(
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
999
|
+
changeset_apply(
|
|
1000
|
+
db: number,
|
|
1001
|
+
changeset: Uint8Array<ArrayBuffer>,
|
|
1002
|
+
xFilter: ((zTab: string) => number) | null,
|
|
1003
|
+
xConflict: (eConflict: SQLiteChangesetConflictType) => SQLiteChangesetAction,
|
|
1004
|
+
): number
|
|
1020
1005
|
}
|
|
1021
1006
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1007
|
+
type SQLiteAPI_ = SQLiteAPI
|
|
1008
|
+
type SQLiteVFS_ = SQLiteVFS
|
|
1024
1009
|
|
|
1025
1010
|
declare module '@livestore/wa-sqlite' {
|
|
1026
|
-
export type SQLiteVFS = SQLiteVFS_
|
|
1027
|
-
export type
|
|
1011
|
+
export type SQLiteVFS = SQLiteVFS_
|
|
1012
|
+
export type SQLiteAPI = SQLiteAPI_
|
|
1028
1013
|
}
|
|
1029
1014
|
|
|
1030
|
-
|
|
1031
1015
|
/** @ignore */
|
|
1032
1016
|
declare module '@livestore/wa-sqlite/src/sqlite-constants.js' {
|
|
1033
|
-
export const SQLITE_OK: 0
|
|
1034
|
-
export const SQLITE_ERROR: 1
|
|
1035
|
-
export const SQLITE_INTERNAL: 2
|
|
1036
|
-
export const SQLITE_PERM: 3
|
|
1037
|
-
export const SQLITE_ABORT: 4
|
|
1038
|
-
export const SQLITE_BUSY: 5
|
|
1039
|
-
export const SQLITE_LOCKED: 6
|
|
1040
|
-
export const SQLITE_NOMEM: 7
|
|
1041
|
-
export const SQLITE_READONLY: 8
|
|
1042
|
-
export const SQLITE_INTERRUPT: 9
|
|
1043
|
-
export const SQLITE_IOERR: 10
|
|
1044
|
-
export const SQLITE_CORRUPT: 11
|
|
1045
|
-
export const SQLITE_NOTFOUND: 12
|
|
1046
|
-
export const SQLITE_FULL: 13
|
|
1047
|
-
export const SQLITE_CANTOPEN: 14
|
|
1048
|
-
export const SQLITE_PROTOCOL: 15
|
|
1049
|
-
export const SQLITE_EMPTY: 16
|
|
1050
|
-
export const SQLITE_SCHEMA: 17
|
|
1051
|
-
export const SQLITE_TOOBIG: 18
|
|
1052
|
-
export const SQLITE_CONSTRAINT: 19
|
|
1053
|
-
export const SQLITE_MISMATCH: 20
|
|
1054
|
-
export const SQLITE_MISUSE: 21
|
|
1055
|
-
export const SQLITE_NOLFS: 22
|
|
1056
|
-
export const SQLITE_AUTH: 23
|
|
1057
|
-
export const SQLITE_FORMAT: 24
|
|
1058
|
-
export const SQLITE_RANGE: 25
|
|
1059
|
-
export const SQLITE_NOTADB: 26
|
|
1060
|
-
export const SQLITE_NOTICE: 27
|
|
1061
|
-
export const SQLITE_WARNING: 28
|
|
1062
|
-
export const SQLITE_ROW: 100
|
|
1063
|
-
export const SQLITE_DONE: 101
|
|
1064
|
-
export const SQLITE_IOERR_ACCESS: 3338
|
|
1065
|
-
export const SQLITE_IOERR_CHECKRESERVEDLOCK: 3594
|
|
1066
|
-
export const SQLITE_IOERR_CLOSE: 4106
|
|
1067
|
-
export const SQLITE_IOERR_DATA: 8202
|
|
1068
|
-
export const SQLITE_IOERR_DELETE: 2570
|
|
1069
|
-
export const SQLITE_IOERR_DELETE_NOENT: 5898
|
|
1070
|
-
export const SQLITE_IOERR_DIR_FSYNC: 1290
|
|
1071
|
-
export const SQLITE_IOERR_FSTAT: 1802
|
|
1072
|
-
export const SQLITE_IOERR_FSYNC: 1034
|
|
1073
|
-
export const SQLITE_IOERR_GETTEMPPATH: 6410
|
|
1074
|
-
export const SQLITE_IOERR_LOCK: 3850
|
|
1075
|
-
export const SQLITE_IOERR_NOMEM: 3082
|
|
1076
|
-
export const SQLITE_IOERR_READ: 266
|
|
1077
|
-
export const SQLITE_IOERR_RDLOCK: 2314
|
|
1078
|
-
export const SQLITE_IOERR_SEEK: 5642
|
|
1079
|
-
export const SQLITE_IOERR_SHORT_READ: 522
|
|
1080
|
-
export const SQLITE_IOERR_TRUNCATE: 1546
|
|
1081
|
-
export const SQLITE_IOERR_UNLOCK: 2058
|
|
1082
|
-
export const SQLITE_IOERR_VNODE: 6922
|
|
1083
|
-
export const SQLITE_IOERR_WRITE: 778
|
|
1084
|
-
export const SQLITE_IOERR_BEGIN_ATOMIC: 7434
|
|
1085
|
-
export const SQLITE_IOERR_COMMIT_ATOMIC: 7690
|
|
1086
|
-
export const SQLITE_IOERR_ROLLBACK_ATOMIC: 7946
|
|
1087
|
-
export const SQLITE_CONSTRAINT_CHECK: 275
|
|
1088
|
-
export const SQLITE_CONSTRAINT_COMMITHOOK: 531
|
|
1089
|
-
export const SQLITE_CONSTRAINT_FOREIGNKEY: 787
|
|
1090
|
-
export const SQLITE_CONSTRAINT_FUNCTION: 1043
|
|
1091
|
-
export const SQLITE_CONSTRAINT_NOTNULL: 1299
|
|
1092
|
-
export const SQLITE_CONSTRAINT_PINNED: 2835
|
|
1093
|
-
export const SQLITE_CONSTRAINT_PRIMARYKEY: 1555
|
|
1094
|
-
export const SQLITE_CONSTRAINT_ROWID: 2579
|
|
1095
|
-
export const SQLITE_CONSTRAINT_TRIGGER: 1811
|
|
1096
|
-
export const SQLITE_CONSTRAINT_UNIQUE: 2067
|
|
1097
|
-
export const SQLITE_CONSTRAINT_VTAB: 2323
|
|
1098
|
-
export const SQLITE_OPEN_READONLY: 1
|
|
1099
|
-
export const SQLITE_OPEN_READWRITE: 2
|
|
1100
|
-
export const SQLITE_OPEN_CREATE: 4
|
|
1101
|
-
export const SQLITE_OPEN_DELETEONCLOSE: 8
|
|
1102
|
-
export const SQLITE_OPEN_EXCLUSIVE: 16
|
|
1103
|
-
export const SQLITE_OPEN_AUTOPROXY: 32
|
|
1104
|
-
export const SQLITE_OPEN_URI: 64
|
|
1105
|
-
export const SQLITE_OPEN_MEMORY: 128
|
|
1106
|
-
export const SQLITE_OPEN_MAIN_DB: 256
|
|
1107
|
-
export const SQLITE_OPEN_TEMP_DB: 512
|
|
1108
|
-
export const SQLITE_OPEN_TRANSIENT_DB: 1024
|
|
1109
|
-
export const SQLITE_OPEN_MAIN_JOURNAL: 2048
|
|
1110
|
-
export const SQLITE_OPEN_TEMP_JOURNAL: 4096
|
|
1111
|
-
export const SQLITE_OPEN_SUBJOURNAL: 8192
|
|
1112
|
-
export const SQLITE_OPEN_SUPER_JOURNAL: 16384
|
|
1113
|
-
export const SQLITE_OPEN_NOMUTEX: 32768
|
|
1114
|
-
export const SQLITE_OPEN_FULLMUTEX: 65536
|
|
1115
|
-
export const SQLITE_OPEN_SHAREDCACHE: 131072
|
|
1116
|
-
export const SQLITE_OPEN_PRIVATECACHE: 262144
|
|
1117
|
-
export const SQLITE_OPEN_WAL: 524288
|
|
1118
|
-
export const SQLITE_OPEN_NOFOLLOW: 16777216
|
|
1119
|
-
export const SQLITE_LOCK_NONE: 0
|
|
1120
|
-
export const SQLITE_LOCK_SHARED: 1
|
|
1121
|
-
export const SQLITE_LOCK_RESERVED: 2
|
|
1122
|
-
export const SQLITE_LOCK_PENDING: 3
|
|
1123
|
-
export const SQLITE_LOCK_EXCLUSIVE: 4
|
|
1124
|
-
export const SQLITE_IOCAP_ATOMIC: 1
|
|
1125
|
-
export const SQLITE_IOCAP_ATOMIC512: 2
|
|
1126
|
-
export const SQLITE_IOCAP_ATOMIC1K: 4
|
|
1127
|
-
export const SQLITE_IOCAP_ATOMIC2K: 8
|
|
1128
|
-
export const SQLITE_IOCAP_ATOMIC4K: 16
|
|
1129
|
-
export const SQLITE_IOCAP_ATOMIC8K: 32
|
|
1130
|
-
export const SQLITE_IOCAP_ATOMIC16K: 64
|
|
1131
|
-
export const SQLITE_IOCAP_ATOMIC32K: 128
|
|
1132
|
-
export const SQLITE_IOCAP_ATOMIC64K: 256
|
|
1133
|
-
export const SQLITE_IOCAP_SAFE_APPEND: 512
|
|
1134
|
-
export const SQLITE_IOCAP_SEQUENTIAL: 1024
|
|
1135
|
-
export const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: 2048
|
|
1136
|
-
export const SQLITE_IOCAP_POWERSAFE_OVERWRITE: 4096
|
|
1137
|
-
export const SQLITE_IOCAP_IMMUTABLE: 8192
|
|
1138
|
-
export const SQLITE_IOCAP_BATCH_ATOMIC: 16384
|
|
1139
|
-
export const SQLITE_ACCESS_EXISTS: 0
|
|
1140
|
-
export const SQLITE_ACCESS_READWRITE: 1
|
|
1141
|
-
export const SQLITE_ACCESS_READ: 2
|
|
1142
|
-
export const SQLITE_FCNTL_LOCKSTATE: 1
|
|
1143
|
-
export const SQLITE_FCNTL_GET_LOCKPROXYFILE: 2
|
|
1144
|
-
export const SQLITE_FCNTL_SET_LOCKPROXYFILE: 3
|
|
1145
|
-
export const SQLITE_FCNTL_LAST_ERRNO: 4
|
|
1146
|
-
export const SQLITE_FCNTL_SIZE_HINT: 5
|
|
1147
|
-
export const SQLITE_FCNTL_CHUNK_SIZE: 6
|
|
1148
|
-
export const SQLITE_FCNTL_FILE_POINTER: 7
|
|
1149
|
-
export const SQLITE_FCNTL_SYNC_OMITTED: 8
|
|
1150
|
-
export const SQLITE_FCNTL_WIN32_AV_RETRY: 9
|
|
1151
|
-
export const SQLITE_FCNTL_PERSIST_WAL: 10
|
|
1152
|
-
export const SQLITE_FCNTL_OVERWRITE: 11
|
|
1153
|
-
export const SQLITE_FCNTL_VFSNAME: 12
|
|
1154
|
-
export const SQLITE_FCNTL_POWERSAFE_OVERWRITE: 13
|
|
1155
|
-
export const SQLITE_FCNTL_PRAGMA: 14
|
|
1156
|
-
export const SQLITE_FCNTL_BUSYHANDLER: 15
|
|
1157
|
-
export const SQLITE_FCNTL_TEMPFILENAME: 16
|
|
1158
|
-
export const SQLITE_FCNTL_MMAP_SIZE: 18
|
|
1159
|
-
export const SQLITE_FCNTL_TRACE: 19
|
|
1160
|
-
export const SQLITE_FCNTL_HAS_MOVED: 20
|
|
1161
|
-
export const SQLITE_FCNTL_SYNC: 21
|
|
1162
|
-
export const SQLITE_FCNTL_COMMIT_PHASETWO: 22
|
|
1163
|
-
export const SQLITE_FCNTL_WIN32_SET_HANDLE: 23
|
|
1164
|
-
export const SQLITE_FCNTL_WAL_BLOCK: 24
|
|
1165
|
-
export const SQLITE_FCNTL_ZIPVFS: 25
|
|
1166
|
-
export const SQLITE_FCNTL_RBU: 26
|
|
1167
|
-
export const SQLITE_FCNTL_VFS_POINTER: 27
|
|
1168
|
-
export const SQLITE_FCNTL_JOURNAL_POINTER: 28
|
|
1169
|
-
export const SQLITE_FCNTL_WIN32_GET_HANDLE: 29
|
|
1170
|
-
export const SQLITE_FCNTL_PDB: 30
|
|
1171
|
-
export const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: 31
|
|
1172
|
-
export const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: 32
|
|
1173
|
-
export const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: 33
|
|
1174
|
-
export const SQLITE_FCNTL_LOCK_TIMEOUT: 34
|
|
1175
|
-
export const SQLITE_FCNTL_DATA_VERSION: 35
|
|
1176
|
-
export const SQLITE_FCNTL_SIZE_LIMIT: 36
|
|
1177
|
-
export const SQLITE_FCNTL_CKPT_DONE: 37
|
|
1178
|
-
export const SQLITE_FCNTL_RESERVE_BYTES: 38
|
|
1179
|
-
export const SQLITE_FCNTL_CKPT_START: 39
|
|
1180
|
-
export const SQLITE_INTEGER: 1
|
|
1181
|
-
export const SQLITE_FLOAT: 2
|
|
1182
|
-
export const SQLITE_TEXT: 3
|
|
1183
|
-
export const SQLITE_BLOB: 4
|
|
1184
|
-
export const SQLITE_NULL: 5
|
|
1185
|
-
export const SQLITE_STATIC: 0
|
|
1186
|
-
export const SQLITE_TRANSIENT: -1
|
|
1187
|
-
export const SQLITE_UTF8: 1
|
|
1188
|
-
export const SQLITE_UTF16LE: 2
|
|
1189
|
-
export const SQLITE_UTF16BE: 3
|
|
1190
|
-
export const SQLITE_UTF16: 4
|
|
1191
|
-
export const SQLITE_INDEX_CONSTRAINT_EQ: 2
|
|
1192
|
-
export const SQLITE_INDEX_CONSTRAINT_GT: 4
|
|
1193
|
-
export const SQLITE_INDEX_CONSTRAINT_LE: 8
|
|
1194
|
-
export const SQLITE_INDEX_CONSTRAINT_LT: 16
|
|
1195
|
-
export const SQLITE_INDEX_CONSTRAINT_GE: 32
|
|
1196
|
-
export const SQLITE_INDEX_CONSTRAINT_MATCH: 64
|
|
1197
|
-
export const SQLITE_INDEX_CONSTRAINT_LIKE: 65
|
|
1198
|
-
export const SQLITE_INDEX_CONSTRAINT_GLOB: 66
|
|
1199
|
-
export const SQLITE_INDEX_CONSTRAINT_REGEXP: 67
|
|
1200
|
-
export const SQLITE_INDEX_CONSTRAINT_NE: 68
|
|
1201
|
-
export const SQLITE_INDEX_CONSTRAINT_ISNOT: 69
|
|
1202
|
-
export const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: 70
|
|
1203
|
-
export const SQLITE_INDEX_CONSTRAINT_ISNULL: 71
|
|
1204
|
-
export const SQLITE_INDEX_CONSTRAINT_IS: 72
|
|
1205
|
-
export const SQLITE_INDEX_CONSTRAINT_FUNCTION: 150
|
|
1206
|
-
export const SQLITE_INDEX_SCAN_UNIQUE: 1
|
|
1207
|
-
export const SQLITE_DETERMINISTIC: 0x000000800
|
|
1208
|
-
export const SQLITE_DIRECTONLY: 0x000080000
|
|
1209
|
-
export const SQLITE_SUBTYPE: 0x000100000
|
|
1210
|
-
export const SQLITE_INNOCUOUS: 0x000200000
|
|
1211
|
-
export const SQLITE_SYNC_NORMAL: 0x00002
|
|
1212
|
-
export const SQLITE_SYNC_FULL: 0x00003
|
|
1213
|
-
export const SQLITE_SYNC_DATAONLY: 0x00010
|
|
1214
|
-
export const SQLITE_CREATE_INDEX: 1
|
|
1215
|
-
export const SQLITE_CREATE_TABLE: 2
|
|
1216
|
-
export const SQLITE_CREATE_TEMP_INDEX: 3
|
|
1217
|
-
export const SQLITE_CREATE_TEMP_TABLE: 4
|
|
1218
|
-
export const SQLITE_CREATE_TEMP_TRIGGER: 5
|
|
1219
|
-
export const SQLITE_CREATE_TEMP_VIEW: 6
|
|
1220
|
-
export const SQLITE_CREATE_TRIGGER: 7
|
|
1221
|
-
export const SQLITE_CREATE_VIEW: 8
|
|
1222
|
-
export const SQLITE_DELETE: 9
|
|
1223
|
-
export const SQLITE_DROP_INDEX: 10
|
|
1224
|
-
export const SQLITE_DROP_TABLE: 11
|
|
1225
|
-
export const SQLITE_DROP_TEMP_INDEX: 12
|
|
1226
|
-
export const SQLITE_DROP_TEMP_TABLE: 13
|
|
1227
|
-
export const SQLITE_DROP_TEMP_TRIGGER: 14
|
|
1228
|
-
export const SQLITE_DROP_TEMP_VIEW: 15
|
|
1229
|
-
export const SQLITE_DROP_TRIGGER: 16
|
|
1230
|
-
export const SQLITE_DROP_VIEW: 17
|
|
1231
|
-
export const SQLITE_INSERT: 18
|
|
1232
|
-
export const SQLITE_PRAGMA: 19
|
|
1233
|
-
export const SQLITE_READ: 20
|
|
1234
|
-
export const SQLITE_SELECT: 21
|
|
1235
|
-
export const SQLITE_TRANSACTION: 22
|
|
1236
|
-
export const SQLITE_UPDATE: 23
|
|
1237
|
-
export const SQLITE_ATTACH: 24
|
|
1238
|
-
export const SQLITE_DETACH: 25
|
|
1239
|
-
export const SQLITE_ALTER_TABLE: 26
|
|
1240
|
-
export const SQLITE_REINDEX: 27
|
|
1241
|
-
export const SQLITE_ANALYZE: 28
|
|
1242
|
-
export const SQLITE_CREATE_VTABLE: 29
|
|
1243
|
-
export const SQLITE_DROP_VTABLE: 30
|
|
1244
|
-
export const SQLITE_FUNCTION: 31
|
|
1245
|
-
export const SQLITE_SAVEPOINT: 32
|
|
1246
|
-
export const SQLITE_COPY: 0
|
|
1247
|
-
export const SQLITE_RECURSIVE: 33
|
|
1248
|
-
export const SQLITE_DENY: 1
|
|
1249
|
-
export const SQLITE_IGNORE: 2
|
|
1250
|
-
export const SQLITE_LIMIT_LENGTH: 0
|
|
1251
|
-
export const SQLITE_LIMIT_SQL_LENGTH: 1
|
|
1252
|
-
export const SQLITE_LIMIT_COLUMN: 2
|
|
1253
|
-
export const SQLITE_LIMIT_EXPR_DEPTH: 3
|
|
1254
|
-
export const SQLITE_LIMIT_COMPOUND_SELECT: 4
|
|
1255
|
-
export const SQLITE_LIMIT_VDBE_OP: 5
|
|
1256
|
-
export const SQLITE_LIMIT_FUNCTION_ARG: 6
|
|
1257
|
-
export const SQLITE_LIMIT_ATTACHED: 7
|
|
1258
|
-
export const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: 8
|
|
1259
|
-
export const SQLITE_LIMIT_VARIABLE_NUMBER: 9
|
|
1260
|
-
export const SQLITE_LIMIT_TRIGGER_DEPTH: 10
|
|
1261
|
-
export const SQLITE_LIMIT_WORKER_THREADS: 11
|
|
1262
|
-
export const
|
|
1263
|
-
export const
|
|
1264
|
-
export const
|
|
1017
|
+
export const SQLITE_OK: 0
|
|
1018
|
+
export const SQLITE_ERROR: 1
|
|
1019
|
+
export const SQLITE_INTERNAL: 2
|
|
1020
|
+
export const SQLITE_PERM: 3
|
|
1021
|
+
export const SQLITE_ABORT: 4
|
|
1022
|
+
export const SQLITE_BUSY: 5
|
|
1023
|
+
export const SQLITE_LOCKED: 6
|
|
1024
|
+
export const SQLITE_NOMEM: 7
|
|
1025
|
+
export const SQLITE_READONLY: 8
|
|
1026
|
+
export const SQLITE_INTERRUPT: 9
|
|
1027
|
+
export const SQLITE_IOERR: 10
|
|
1028
|
+
export const SQLITE_CORRUPT: 11
|
|
1029
|
+
export const SQLITE_NOTFOUND: 12
|
|
1030
|
+
export const SQLITE_FULL: 13
|
|
1031
|
+
export const SQLITE_CANTOPEN: 14
|
|
1032
|
+
export const SQLITE_PROTOCOL: 15
|
|
1033
|
+
export const SQLITE_EMPTY: 16
|
|
1034
|
+
export const SQLITE_SCHEMA: 17
|
|
1035
|
+
export const SQLITE_TOOBIG: 18
|
|
1036
|
+
export const SQLITE_CONSTRAINT: 19
|
|
1037
|
+
export const SQLITE_MISMATCH: 20
|
|
1038
|
+
export const SQLITE_MISUSE: 21
|
|
1039
|
+
export const SQLITE_NOLFS: 22
|
|
1040
|
+
export const SQLITE_AUTH: 23
|
|
1041
|
+
export const SQLITE_FORMAT: 24
|
|
1042
|
+
export const SQLITE_RANGE: 25
|
|
1043
|
+
export const SQLITE_NOTADB: 26
|
|
1044
|
+
export const SQLITE_NOTICE: 27
|
|
1045
|
+
export const SQLITE_WARNING: 28
|
|
1046
|
+
export const SQLITE_ROW: 100
|
|
1047
|
+
export const SQLITE_DONE: 101
|
|
1048
|
+
export const SQLITE_IOERR_ACCESS: 3338
|
|
1049
|
+
export const SQLITE_IOERR_CHECKRESERVEDLOCK: 3594
|
|
1050
|
+
export const SQLITE_IOERR_CLOSE: 4106
|
|
1051
|
+
export const SQLITE_IOERR_DATA: 8202
|
|
1052
|
+
export const SQLITE_IOERR_DELETE: 2570
|
|
1053
|
+
export const SQLITE_IOERR_DELETE_NOENT: 5898
|
|
1054
|
+
export const SQLITE_IOERR_DIR_FSYNC: 1290
|
|
1055
|
+
export const SQLITE_IOERR_FSTAT: 1802
|
|
1056
|
+
export const SQLITE_IOERR_FSYNC: 1034
|
|
1057
|
+
export const SQLITE_IOERR_GETTEMPPATH: 6410
|
|
1058
|
+
export const SQLITE_IOERR_LOCK: 3850
|
|
1059
|
+
export const SQLITE_IOERR_NOMEM: 3082
|
|
1060
|
+
export const SQLITE_IOERR_READ: 266
|
|
1061
|
+
export const SQLITE_IOERR_RDLOCK: 2314
|
|
1062
|
+
export const SQLITE_IOERR_SEEK: 5642
|
|
1063
|
+
export const SQLITE_IOERR_SHORT_READ: 522
|
|
1064
|
+
export const SQLITE_IOERR_TRUNCATE: 1546
|
|
1065
|
+
export const SQLITE_IOERR_UNLOCK: 2058
|
|
1066
|
+
export const SQLITE_IOERR_VNODE: 6922
|
|
1067
|
+
export const SQLITE_IOERR_WRITE: 778
|
|
1068
|
+
export const SQLITE_IOERR_BEGIN_ATOMIC: 7434
|
|
1069
|
+
export const SQLITE_IOERR_COMMIT_ATOMIC: 7690
|
|
1070
|
+
export const SQLITE_IOERR_ROLLBACK_ATOMIC: 7946
|
|
1071
|
+
export const SQLITE_CONSTRAINT_CHECK: 275
|
|
1072
|
+
export const SQLITE_CONSTRAINT_COMMITHOOK: 531
|
|
1073
|
+
export const SQLITE_CONSTRAINT_FOREIGNKEY: 787
|
|
1074
|
+
export const SQLITE_CONSTRAINT_FUNCTION: 1043
|
|
1075
|
+
export const SQLITE_CONSTRAINT_NOTNULL: 1299
|
|
1076
|
+
export const SQLITE_CONSTRAINT_PINNED: 2835
|
|
1077
|
+
export const SQLITE_CONSTRAINT_PRIMARYKEY: 1555
|
|
1078
|
+
export const SQLITE_CONSTRAINT_ROWID: 2579
|
|
1079
|
+
export const SQLITE_CONSTRAINT_TRIGGER: 1811
|
|
1080
|
+
export const SQLITE_CONSTRAINT_UNIQUE: 2067
|
|
1081
|
+
export const SQLITE_CONSTRAINT_VTAB: 2323
|
|
1082
|
+
export const SQLITE_OPEN_READONLY: 1
|
|
1083
|
+
export const SQLITE_OPEN_READWRITE: 2
|
|
1084
|
+
export const SQLITE_OPEN_CREATE: 4
|
|
1085
|
+
export const SQLITE_OPEN_DELETEONCLOSE: 8
|
|
1086
|
+
export const SQLITE_OPEN_EXCLUSIVE: 16
|
|
1087
|
+
export const SQLITE_OPEN_AUTOPROXY: 32
|
|
1088
|
+
export const SQLITE_OPEN_URI: 64
|
|
1089
|
+
export const SQLITE_OPEN_MEMORY: 128
|
|
1090
|
+
export const SQLITE_OPEN_MAIN_DB: 256
|
|
1091
|
+
export const SQLITE_OPEN_TEMP_DB: 512
|
|
1092
|
+
export const SQLITE_OPEN_TRANSIENT_DB: 1024
|
|
1093
|
+
export const SQLITE_OPEN_MAIN_JOURNAL: 2048
|
|
1094
|
+
export const SQLITE_OPEN_TEMP_JOURNAL: 4096
|
|
1095
|
+
export const SQLITE_OPEN_SUBJOURNAL: 8192
|
|
1096
|
+
export const SQLITE_OPEN_SUPER_JOURNAL: 16384
|
|
1097
|
+
export const SQLITE_OPEN_NOMUTEX: 32768
|
|
1098
|
+
export const SQLITE_OPEN_FULLMUTEX: 65536
|
|
1099
|
+
export const SQLITE_OPEN_SHAREDCACHE: 131072
|
|
1100
|
+
export const SQLITE_OPEN_PRIVATECACHE: 262144
|
|
1101
|
+
export const SQLITE_OPEN_WAL: 524288
|
|
1102
|
+
export const SQLITE_OPEN_NOFOLLOW: 16777216
|
|
1103
|
+
export const SQLITE_LOCK_NONE: 0
|
|
1104
|
+
export const SQLITE_LOCK_SHARED: 1
|
|
1105
|
+
export const SQLITE_LOCK_RESERVED: 2
|
|
1106
|
+
export const SQLITE_LOCK_PENDING: 3
|
|
1107
|
+
export const SQLITE_LOCK_EXCLUSIVE: 4
|
|
1108
|
+
export const SQLITE_IOCAP_ATOMIC: 1
|
|
1109
|
+
export const SQLITE_IOCAP_ATOMIC512: 2
|
|
1110
|
+
export const SQLITE_IOCAP_ATOMIC1K: 4
|
|
1111
|
+
export const SQLITE_IOCAP_ATOMIC2K: 8
|
|
1112
|
+
export const SQLITE_IOCAP_ATOMIC4K: 16
|
|
1113
|
+
export const SQLITE_IOCAP_ATOMIC8K: 32
|
|
1114
|
+
export const SQLITE_IOCAP_ATOMIC16K: 64
|
|
1115
|
+
export const SQLITE_IOCAP_ATOMIC32K: 128
|
|
1116
|
+
export const SQLITE_IOCAP_ATOMIC64K: 256
|
|
1117
|
+
export const SQLITE_IOCAP_SAFE_APPEND: 512
|
|
1118
|
+
export const SQLITE_IOCAP_SEQUENTIAL: 1024
|
|
1119
|
+
export const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: 2048
|
|
1120
|
+
export const SQLITE_IOCAP_POWERSAFE_OVERWRITE: 4096
|
|
1121
|
+
export const SQLITE_IOCAP_IMMUTABLE: 8192
|
|
1122
|
+
export const SQLITE_IOCAP_BATCH_ATOMIC: 16384
|
|
1123
|
+
export const SQLITE_ACCESS_EXISTS: 0
|
|
1124
|
+
export const SQLITE_ACCESS_READWRITE: 1
|
|
1125
|
+
export const SQLITE_ACCESS_READ: 2
|
|
1126
|
+
export const SQLITE_FCNTL_LOCKSTATE: 1
|
|
1127
|
+
export const SQLITE_FCNTL_GET_LOCKPROXYFILE: 2
|
|
1128
|
+
export const SQLITE_FCNTL_SET_LOCKPROXYFILE: 3
|
|
1129
|
+
export const SQLITE_FCNTL_LAST_ERRNO: 4
|
|
1130
|
+
export const SQLITE_FCNTL_SIZE_HINT: 5
|
|
1131
|
+
export const SQLITE_FCNTL_CHUNK_SIZE: 6
|
|
1132
|
+
export const SQLITE_FCNTL_FILE_POINTER: 7
|
|
1133
|
+
export const SQLITE_FCNTL_SYNC_OMITTED: 8
|
|
1134
|
+
export const SQLITE_FCNTL_WIN32_AV_RETRY: 9
|
|
1135
|
+
export const SQLITE_FCNTL_PERSIST_WAL: 10
|
|
1136
|
+
export const SQLITE_FCNTL_OVERWRITE: 11
|
|
1137
|
+
export const SQLITE_FCNTL_VFSNAME: 12
|
|
1138
|
+
export const SQLITE_FCNTL_POWERSAFE_OVERWRITE: 13
|
|
1139
|
+
export const SQLITE_FCNTL_PRAGMA: 14
|
|
1140
|
+
export const SQLITE_FCNTL_BUSYHANDLER: 15
|
|
1141
|
+
export const SQLITE_FCNTL_TEMPFILENAME: 16
|
|
1142
|
+
export const SQLITE_FCNTL_MMAP_SIZE: 18
|
|
1143
|
+
export const SQLITE_FCNTL_TRACE: 19
|
|
1144
|
+
export const SQLITE_FCNTL_HAS_MOVED: 20
|
|
1145
|
+
export const SQLITE_FCNTL_SYNC: 21
|
|
1146
|
+
export const SQLITE_FCNTL_COMMIT_PHASETWO: 22
|
|
1147
|
+
export const SQLITE_FCNTL_WIN32_SET_HANDLE: 23
|
|
1148
|
+
export const SQLITE_FCNTL_WAL_BLOCK: 24
|
|
1149
|
+
export const SQLITE_FCNTL_ZIPVFS: 25
|
|
1150
|
+
export const SQLITE_FCNTL_RBU: 26
|
|
1151
|
+
export const SQLITE_FCNTL_VFS_POINTER: 27
|
|
1152
|
+
export const SQLITE_FCNTL_JOURNAL_POINTER: 28
|
|
1153
|
+
export const SQLITE_FCNTL_WIN32_GET_HANDLE: 29
|
|
1154
|
+
export const SQLITE_FCNTL_PDB: 30
|
|
1155
|
+
export const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: 31
|
|
1156
|
+
export const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: 32
|
|
1157
|
+
export const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: 33
|
|
1158
|
+
export const SQLITE_FCNTL_LOCK_TIMEOUT: 34
|
|
1159
|
+
export const SQLITE_FCNTL_DATA_VERSION: 35
|
|
1160
|
+
export const SQLITE_FCNTL_SIZE_LIMIT: 36
|
|
1161
|
+
export const SQLITE_FCNTL_CKPT_DONE: 37
|
|
1162
|
+
export const SQLITE_FCNTL_RESERVE_BYTES: 38
|
|
1163
|
+
export const SQLITE_FCNTL_CKPT_START: 39
|
|
1164
|
+
export const SQLITE_INTEGER: 1
|
|
1165
|
+
export const SQLITE_FLOAT: 2
|
|
1166
|
+
export const SQLITE_TEXT: 3
|
|
1167
|
+
export const SQLITE_BLOB: 4
|
|
1168
|
+
export const SQLITE_NULL: 5
|
|
1169
|
+
export const SQLITE_STATIC: 0
|
|
1170
|
+
export const SQLITE_TRANSIENT: -1
|
|
1171
|
+
export const SQLITE_UTF8: 1
|
|
1172
|
+
export const SQLITE_UTF16LE: 2
|
|
1173
|
+
export const SQLITE_UTF16BE: 3
|
|
1174
|
+
export const SQLITE_UTF16: 4
|
|
1175
|
+
export const SQLITE_INDEX_CONSTRAINT_EQ: 2
|
|
1176
|
+
export const SQLITE_INDEX_CONSTRAINT_GT: 4
|
|
1177
|
+
export const SQLITE_INDEX_CONSTRAINT_LE: 8
|
|
1178
|
+
export const SQLITE_INDEX_CONSTRAINT_LT: 16
|
|
1179
|
+
export const SQLITE_INDEX_CONSTRAINT_GE: 32
|
|
1180
|
+
export const SQLITE_INDEX_CONSTRAINT_MATCH: 64
|
|
1181
|
+
export const SQLITE_INDEX_CONSTRAINT_LIKE: 65
|
|
1182
|
+
export const SQLITE_INDEX_CONSTRAINT_GLOB: 66
|
|
1183
|
+
export const SQLITE_INDEX_CONSTRAINT_REGEXP: 67
|
|
1184
|
+
export const SQLITE_INDEX_CONSTRAINT_NE: 68
|
|
1185
|
+
export const SQLITE_INDEX_CONSTRAINT_ISNOT: 69
|
|
1186
|
+
export const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: 70
|
|
1187
|
+
export const SQLITE_INDEX_CONSTRAINT_ISNULL: 71
|
|
1188
|
+
export const SQLITE_INDEX_CONSTRAINT_IS: 72
|
|
1189
|
+
export const SQLITE_INDEX_CONSTRAINT_FUNCTION: 150
|
|
1190
|
+
export const SQLITE_INDEX_SCAN_UNIQUE: 1
|
|
1191
|
+
export const SQLITE_DETERMINISTIC: 0x000000800
|
|
1192
|
+
export const SQLITE_DIRECTONLY: 0x000080000
|
|
1193
|
+
export const SQLITE_SUBTYPE: 0x000100000
|
|
1194
|
+
export const SQLITE_INNOCUOUS: 0x000200000
|
|
1195
|
+
export const SQLITE_SYNC_NORMAL: 0x00002
|
|
1196
|
+
export const SQLITE_SYNC_FULL: 0x00003
|
|
1197
|
+
export const SQLITE_SYNC_DATAONLY: 0x00010
|
|
1198
|
+
export const SQLITE_CREATE_INDEX: 1
|
|
1199
|
+
export const SQLITE_CREATE_TABLE: 2
|
|
1200
|
+
export const SQLITE_CREATE_TEMP_INDEX: 3
|
|
1201
|
+
export const SQLITE_CREATE_TEMP_TABLE: 4
|
|
1202
|
+
export const SQLITE_CREATE_TEMP_TRIGGER: 5
|
|
1203
|
+
export const SQLITE_CREATE_TEMP_VIEW: 6
|
|
1204
|
+
export const SQLITE_CREATE_TRIGGER: 7
|
|
1205
|
+
export const SQLITE_CREATE_VIEW: 8
|
|
1206
|
+
export const SQLITE_DELETE: 9
|
|
1207
|
+
export const SQLITE_DROP_INDEX: 10
|
|
1208
|
+
export const SQLITE_DROP_TABLE: 11
|
|
1209
|
+
export const SQLITE_DROP_TEMP_INDEX: 12
|
|
1210
|
+
export const SQLITE_DROP_TEMP_TABLE: 13
|
|
1211
|
+
export const SQLITE_DROP_TEMP_TRIGGER: 14
|
|
1212
|
+
export const SQLITE_DROP_TEMP_VIEW: 15
|
|
1213
|
+
export const SQLITE_DROP_TRIGGER: 16
|
|
1214
|
+
export const SQLITE_DROP_VIEW: 17
|
|
1215
|
+
export const SQLITE_INSERT: 18
|
|
1216
|
+
export const SQLITE_PRAGMA: 19
|
|
1217
|
+
export const SQLITE_READ: 20
|
|
1218
|
+
export const SQLITE_SELECT: 21
|
|
1219
|
+
export const SQLITE_TRANSACTION: 22
|
|
1220
|
+
export const SQLITE_UPDATE: 23
|
|
1221
|
+
export const SQLITE_ATTACH: 24
|
|
1222
|
+
export const SQLITE_DETACH: 25
|
|
1223
|
+
export const SQLITE_ALTER_TABLE: 26
|
|
1224
|
+
export const SQLITE_REINDEX: 27
|
|
1225
|
+
export const SQLITE_ANALYZE: 28
|
|
1226
|
+
export const SQLITE_CREATE_VTABLE: 29
|
|
1227
|
+
export const SQLITE_DROP_VTABLE: 30
|
|
1228
|
+
export const SQLITE_FUNCTION: 31
|
|
1229
|
+
export const SQLITE_SAVEPOINT: 32
|
|
1230
|
+
export const SQLITE_COPY: 0
|
|
1231
|
+
export const SQLITE_RECURSIVE: 33
|
|
1232
|
+
export const SQLITE_DENY: 1
|
|
1233
|
+
export const SQLITE_IGNORE: 2
|
|
1234
|
+
export const SQLITE_LIMIT_LENGTH: 0
|
|
1235
|
+
export const SQLITE_LIMIT_SQL_LENGTH: 1
|
|
1236
|
+
export const SQLITE_LIMIT_COLUMN: 2
|
|
1237
|
+
export const SQLITE_LIMIT_EXPR_DEPTH: 3
|
|
1238
|
+
export const SQLITE_LIMIT_COMPOUND_SELECT: 4
|
|
1239
|
+
export const SQLITE_LIMIT_VDBE_OP: 5
|
|
1240
|
+
export const SQLITE_LIMIT_FUNCTION_ARG: 6
|
|
1241
|
+
export const SQLITE_LIMIT_ATTACHED: 7
|
|
1242
|
+
export const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: 8
|
|
1243
|
+
export const SQLITE_LIMIT_VARIABLE_NUMBER: 9
|
|
1244
|
+
export const SQLITE_LIMIT_TRIGGER_DEPTH: 10
|
|
1245
|
+
export const SQLITE_LIMIT_WORKER_THREADS: 11
|
|
1246
|
+
export const SQLITE_CHANGESET_DATA: 1
|
|
1247
|
+
export const SQLITE_CHANGESET_NOTFOUND: 2
|
|
1248
|
+
export const SQLITE_CHANGESET_CONFLICT: 3
|
|
1249
|
+
export const SQLITE_CHANGESET_CONSTRAINT: 4
|
|
1250
|
+
export const SQLITE_CHANGESET_FOREIGN_KEY: 5
|
|
1251
|
+
export const SQLITE_CHANGESET_OMIT: 0
|
|
1252
|
+
export const SQLITE_CHANGESET_REPLACE: 1
|
|
1253
|
+
export const SQLITE_CHANGESET_ABORT: 2
|
|
1254
|
+
export const SQLITE_PREPARE_PERSISTENT: 0x01
|
|
1255
|
+
export const SQLITE_PREPARE_NORMALIZED: 0x02
|
|
1256
|
+
export const SQLITE_PREPARE_NO_VTAB: 0x04
|
|
1265
1257
|
}
|
|
1266
1258
|
|
|
1267
1259
|
declare module '@livestore/wa-sqlite' {
|
|
1268
|
-
export * from '@livestore/wa-sqlite/src/sqlite-constants.js'
|
|
1260
|
+
export * from '@livestore/wa-sqlite/src/sqlite-constants.js'
|
|
1269
1261
|
|
|
1270
1262
|
/**
|
|
1271
1263
|
* @ignore
|
|
@@ -1275,111 +1267,131 @@ declare module '@livestore/wa-sqlite' {
|
|
|
1275
1267
|
* @param {*} Module SQLite module
|
|
1276
1268
|
* @returns {SQLiteAPI}
|
|
1277
1269
|
*/
|
|
1278
|
-
export function Factory(Module: any): SQLiteAPI
|
|
1270
|
+
export function Factory(Module: any): SQLiteAPI
|
|
1279
1271
|
|
|
1280
1272
|
export class SQLiteError extends Error {
|
|
1281
|
-
|
|
1282
|
-
|
|
1273
|
+
constructor(message: any, code: any)
|
|
1274
|
+
code: any
|
|
1283
1275
|
}
|
|
1284
1276
|
}
|
|
1285
1277
|
|
|
1286
1278
|
/** @ignore */
|
|
1287
1279
|
declare module '@livestore/wa-sqlite/dist/wa-sqlite.mjs' {
|
|
1288
|
-
function ModuleFactory(config?: object): Promise<any
|
|
1289
|
-
export = ModuleFactory
|
|
1280
|
+
function ModuleFactory(config?: object): Promise<any>
|
|
1281
|
+
export = ModuleFactory
|
|
1290
1282
|
}
|
|
1291
1283
|
|
|
1292
1284
|
/** @ignore */
|
|
1293
1285
|
declare module '@livestore/wa-sqlite/dist/wa-sqlite-async.mjs' {
|
|
1294
|
-
function ModuleFactory(config?: object): Promise<any
|
|
1295
|
-
export = ModuleFactory
|
|
1286
|
+
function ModuleFactory(config?: object): Promise<any>
|
|
1287
|
+
export = ModuleFactory
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
/** @ignore */
|
|
1291
|
+
declare module '@livestore/wa-sqlite/dist/wa-sqlite.node.mjs' {
|
|
1292
|
+
function ModuleFactory(config?: object): Promise<any>
|
|
1293
|
+
export = ModuleFactory
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
/** @ignore */
|
|
1297
|
+
declare module '@livestore/wa-sqlite/src/sqlite-api.js' {
|
|
1298
|
+
export * from '@livestore/wa-sqlite'
|
|
1296
1299
|
}
|
|
1297
1300
|
|
|
1298
1301
|
/** @ignore */
|
|
1299
1302
|
declare module '@livestore/wa-sqlite/src/VFS.js' {
|
|
1300
|
-
export * from '@livestore/wa-sqlite/src/sqlite-constants.js'
|
|
1303
|
+
export * from '@livestore/wa-sqlite/src/sqlite-constants.js'
|
|
1301
1304
|
|
|
1302
1305
|
export class Base {
|
|
1303
|
-
name: string
|
|
1304
|
-
|
|
1306
|
+
constructor(name: string, module: any)
|
|
1307
|
+
name: string
|
|
1308
|
+
mxPathName: number
|
|
1305
1309
|
/**
|
|
1306
1310
|
* @param {number} fileId
|
|
1307
1311
|
* @returns {number|Promise<number>}
|
|
1308
1312
|
*/
|
|
1309
|
-
xClose(fileId: number): number
|
|
1313
|
+
xClose(fileId: number): number
|
|
1310
1314
|
/**
|
|
1311
1315
|
* @param {number} fileId
|
|
1312
1316
|
* @param {Uint8Array<ArrayBuffer>} pData
|
|
1313
1317
|
* @param {number} iOffset
|
|
1314
1318
|
* @returns {number}
|
|
1315
1319
|
*/
|
|
1316
|
-
xRead(
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
+
xRead(
|
|
1321
|
+
fileId: number,
|
|
1322
|
+
pData: {
|
|
1323
|
+
size: number
|
|
1324
|
+
value: Uint8Array<ArrayBuffer>
|
|
1325
|
+
},
|
|
1326
|
+
iOffset: number,
|
|
1327
|
+
): number
|
|
1320
1328
|
/**
|
|
1321
1329
|
* @param {number} fileId
|
|
1322
1330
|
* @param {Uint8Array<ArrayBuffer>} pData
|
|
1323
1331
|
* @param {number} iOffset
|
|
1324
1332
|
* @returns {number}
|
|
1325
1333
|
*/
|
|
1326
|
-
xWrite(
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1334
|
+
xWrite(
|
|
1335
|
+
fileId: number,
|
|
1336
|
+
pData: {
|
|
1337
|
+
size: number
|
|
1338
|
+
value: Uint8Array<ArrayBuffer>
|
|
1339
|
+
},
|
|
1340
|
+
iOffset: number,
|
|
1341
|
+
): number
|
|
1330
1342
|
/**
|
|
1331
1343
|
* @param {number} fileId
|
|
1332
1344
|
* @param {number} iSize
|
|
1333
1345
|
* @returns {number}
|
|
1334
1346
|
*/
|
|
1335
|
-
xTruncate(fileId: number, iSize: number): number
|
|
1347
|
+
xTruncate(fileId: number, iSize: number): number
|
|
1336
1348
|
/**
|
|
1337
1349
|
* @param {number} fileId
|
|
1338
1350
|
* @param {*} flags
|
|
1339
1351
|
* @returns {number}
|
|
1340
1352
|
*/
|
|
1341
|
-
xSync(fileId: number, flags: any): number
|
|
1353
|
+
xSync(fileId: number, flags: any): number
|
|
1342
1354
|
/**
|
|
1343
1355
|
* @param {number} fileId
|
|
1344
1356
|
* @param {DataView} pSize64
|
|
1345
1357
|
* @returns {number|Promise<number>}
|
|
1346
1358
|
*/
|
|
1347
|
-
xFileSize(fileId: number, pSize64: DataView): number
|
|
1359
|
+
xFileSize(fileId: number, pSize64: DataView): number
|
|
1348
1360
|
/**
|
|
1349
1361
|
* @param {number} fileId
|
|
1350
1362
|
* @param {number} flags
|
|
1351
1363
|
* @returns {number}
|
|
1352
1364
|
*/
|
|
1353
|
-
xLock(fileId: number, flags: number): number
|
|
1365
|
+
xLock(fileId: number, flags: number): number
|
|
1354
1366
|
/**
|
|
1355
1367
|
* @param {number} fileId
|
|
1356
1368
|
* @param {number} flags
|
|
1357
1369
|
* @returns {number}
|
|
1358
1370
|
*/
|
|
1359
|
-
xUnlock(fileId: number, flags: number): number
|
|
1371
|
+
xUnlock(fileId: number, flags: number): number
|
|
1360
1372
|
/**
|
|
1361
1373
|
* @param {number} fileId
|
|
1362
1374
|
* @param {DataView} pResOut
|
|
1363
1375
|
* @returns {number}
|
|
1364
1376
|
*/
|
|
1365
|
-
xCheckReservedLock(fileId: number, pResOut: DataView): number
|
|
1377
|
+
xCheckReservedLock(fileId: number, pResOut: DataView): number
|
|
1366
1378
|
/**
|
|
1367
1379
|
* @param {number} fileId
|
|
1368
1380
|
* @param {number} flags
|
|
1369
1381
|
* @param {DataView} pArg
|
|
1370
1382
|
* @returns {number}
|
|
1371
1383
|
*/
|
|
1372
|
-
xFileControl(fileId: number, flags: number, pArg: DataView): number
|
|
1384
|
+
xFileControl(fileId: number, flags: number, pArg: DataView): number
|
|
1373
1385
|
/**
|
|
1374
1386
|
* @param {number} fileId
|
|
1375
1387
|
* @returns {number}
|
|
1376
1388
|
*/
|
|
1377
|
-
xSectorSize(fileId: number): number
|
|
1389
|
+
xSectorSize(fileId: number): number
|
|
1378
1390
|
/**
|
|
1379
1391
|
* @param {number} fileId
|
|
1380
1392
|
* @returns {number}
|
|
1381
1393
|
*/
|
|
1382
|
-
xDeviceCharacteristics(fileId: number): number
|
|
1394
|
+
xDeviceCharacteristics(fileId: number): number
|
|
1383
1395
|
/**
|
|
1384
1396
|
* @param {string?} name
|
|
1385
1397
|
* @param {number} fileId
|
|
@@ -1387,28 +1399,28 @@ declare module '@livestore/wa-sqlite/src/VFS.js' {
|
|
|
1387
1399
|
* @param {DataView} pOutFlags
|
|
1388
1400
|
* @returns {number}
|
|
1389
1401
|
*/
|
|
1390
|
-
xOpen(name: string | null, fileId: number, flags: number, pOutFlags: DataView): number
|
|
1402
|
+
xOpen(name: string | null, fileId: number, flags: number, pOutFlags: DataView): number
|
|
1391
1403
|
/**
|
|
1392
1404
|
*
|
|
1393
1405
|
* @param {string} name
|
|
1394
1406
|
* @param {number} syncDir
|
|
1395
1407
|
* @returns {number}
|
|
1396
1408
|
*/
|
|
1397
|
-
xDelete(name: string, syncDir: number): number
|
|
1409
|
+
xDelete(name: string, syncDir: number): number
|
|
1398
1410
|
/**
|
|
1399
1411
|
* @param {string} name
|
|
1400
1412
|
* @param {number} flags
|
|
1401
1413
|
* @param {DataView} pResOut
|
|
1402
1414
|
* @returns {number}
|
|
1403
1415
|
*/
|
|
1404
|
-
xAccess(name: string, flags: number, pResOut: DataView): number
|
|
1416
|
+
xAccess(name: string, flags: number, pResOut: DataView): number
|
|
1405
1417
|
/**
|
|
1406
1418
|
* Handle asynchronous operation. This implementation will be overriden on
|
|
1407
1419
|
* registration by an Asyncify build.
|
|
1408
1420
|
* @param {function(): Promise<number>} f
|
|
1409
1421
|
* @returns {number}
|
|
1410
1422
|
*/
|
|
1411
|
-
handleAsync(f: () => Promise<number>): number
|
|
1423
|
+
handleAsync(f: () => Promise<number>): number
|
|
1412
1424
|
}
|
|
1413
1425
|
}
|
|
1414
1426
|
|
|
@@ -1416,67 +1428,66 @@ declare module '@livestore/wa-sqlite/src/VFS.js' {
|
|
|
1416
1428
|
declare module '@livestore/wa-sqlite/src/FacadeVFS.js' {
|
|
1417
1429
|
export type FacadeVFS = any
|
|
1418
1430
|
}
|
|
1419
|
-
|
|
1420
1431
|
|
|
1421
1432
|
declare module '@livestore/wa-sqlite/src/examples/AccessHandlePoolVFS.js' {
|
|
1422
|
-
import * as VFS from
|
|
1433
|
+
import * as VFS from '@livestore/wa-sqlite/src/VFS.js'
|
|
1423
1434
|
export class AccessHandlePoolVFS extends VFS.Base {
|
|
1424
1435
|
constructor(name: string, module: any)
|
|
1425
|
-
static create(name: string, module: any): Promise<AccessHandlePoolVFS
|
|
1436
|
+
static create(name: string, module: any): Promise<AccessHandlePoolVFS>
|
|
1426
1437
|
}
|
|
1427
1438
|
}
|
|
1428
1439
|
|
|
1429
1440
|
declare module '@livestore/wa-sqlite/src/examples/OPFSCoopSyncVFS.js' {
|
|
1430
|
-
import * as VFS from
|
|
1441
|
+
import * as VFS from '@livestore/wa-sqlite/src/VFS.js'
|
|
1431
1442
|
export class OPFSCoopSyncVFS extends VFS.Base {
|
|
1432
1443
|
constructor(name: string, module: any)
|
|
1433
|
-
static create(name: string, module: any): Promise<OPFSCoopSyncVFS
|
|
1444
|
+
static create(name: string, module: any): Promise<OPFSCoopSyncVFS>
|
|
1434
1445
|
}
|
|
1435
1446
|
}
|
|
1436
1447
|
|
|
1437
1448
|
/** @ignore */
|
|
1438
1449
|
declare module '@livestore/wa-sqlite/src/examples/IndexedDbVFS.js' {
|
|
1439
|
-
import * as VFS from
|
|
1450
|
+
import * as VFS from '@livestore/wa-sqlite/src/VFS.js'
|
|
1440
1451
|
export class IndexedDbVFS extends VFS.Base {
|
|
1441
1452
|
/**
|
|
1442
1453
|
* @param {string} idbName Name of IndexedDB database.
|
|
1443
1454
|
*/
|
|
1444
|
-
constructor(idbName?: string)
|
|
1445
|
-
name: string
|
|
1446
|
-
mapIdToFile: Map<any, any
|
|
1447
|
-
cacheSize: number
|
|
1448
|
-
db: any
|
|
1455
|
+
constructor(idbName?: string)
|
|
1456
|
+
name: string
|
|
1457
|
+
mapIdToFile: Map<any, any>
|
|
1458
|
+
cacheSize: number
|
|
1459
|
+
db: any
|
|
1449
1460
|
// close(): Promise<void>;
|
|
1450
|
-
close(): void
|
|
1461
|
+
close(): void
|
|
1451
1462
|
/**
|
|
1452
1463
|
* Delete a file from IndexedDB.
|
|
1453
1464
|
* @param {string} name
|
|
1454
1465
|
*/
|
|
1455
|
-
deleteFile(name: string): Promise<void
|
|
1466
|
+
deleteFile(name: string): Promise<void>
|
|
1456
1467
|
/**
|
|
1457
1468
|
* Forcibly clear an orphaned file lock.
|
|
1458
1469
|
* @param {string} name
|
|
1459
1470
|
*/
|
|
1460
|
-
forceClearLock(name: string): Promise<void
|
|
1461
|
-
_getStore(mode?: string): any
|
|
1471
|
+
forceClearLock(name: string): Promise<void>
|
|
1472
|
+
_getStore(mode?: string): any
|
|
1462
1473
|
/**
|
|
1463
1474
|
* Returns the key for file metadata.
|
|
1464
1475
|
* @param {string} name
|
|
1465
1476
|
* @returns
|
|
1466
1477
|
*/
|
|
1467
|
-
_metaKey(name: string): string
|
|
1478
|
+
_metaKey(name: string): string
|
|
1468
1479
|
/**
|
|
1469
1480
|
* Returns the key for file block data.
|
|
1470
1481
|
* @param {string} name
|
|
1471
1482
|
* @param {number} index
|
|
1472
1483
|
* @returns
|
|
1473
1484
|
*/
|
|
1474
|
-
_blockKey(name: string, index: number): string
|
|
1475
|
-
_getBlock(store: any, file: any, index: any): Promise<any
|
|
1476
|
-
_putBlock(store: any, file: any, index: any, blockData: any): void
|
|
1477
|
-
_purgeCache(store: any, file: any, size?: number): void
|
|
1478
|
-
_flushCache(store: any, file: any): Promise<void
|
|
1479
|
-
_sync(file: any): Promise<void
|
|
1485
|
+
_blockKey(name: string, index: number): string
|
|
1486
|
+
_getBlock(store: any, file: any, index: any): Promise<any>
|
|
1487
|
+
_putBlock(store: any, file: any, index: any, blockData: any): void
|
|
1488
|
+
_purgeCache(store: any, file: any, size?: number): void
|
|
1489
|
+
_flushCache(store: any, file: any): Promise<void>
|
|
1490
|
+
_sync(file: any): Promise<void>
|
|
1480
1491
|
/**
|
|
1481
1492
|
* Helper function that deletes all keys greater or equal to `key`
|
|
1482
1493
|
* provided they start with `prefix`.
|
|
@@ -1484,26 +1495,25 @@ declare module '@livestore/wa-sqlite/src/examples/IndexedDbVFS.js' {
|
|
|
1484
1495
|
* @param {string} [prefix]
|
|
1485
1496
|
* @returns
|
|
1486
1497
|
*/
|
|
1487
|
-
_delete(key: string, prefix?: string): Promise<any
|
|
1498
|
+
_delete(key: string, prefix?: string): Promise<any>
|
|
1488
1499
|
}
|
|
1489
1500
|
}
|
|
1490
1501
|
|
|
1491
1502
|
/** @ignore */
|
|
1492
1503
|
declare module '@livestore/wa-sqlite/src/examples/MemoryVFS.js' {
|
|
1493
|
-
import * as VFS from
|
|
1504
|
+
import * as VFS from '@livestore/wa-sqlite/src/VFS.js'
|
|
1494
1505
|
/** @ignore */
|
|
1495
1506
|
export class MemoryVFS extends VFS.Base {
|
|
1496
|
-
name: string
|
|
1497
|
-
mapNameToFile: Map<any, any
|
|
1498
|
-
mapIdToFile: Map<any, any
|
|
1507
|
+
name: string
|
|
1508
|
+
mapNameToFile: Map<any, any>
|
|
1509
|
+
mapIdToFile: Map<any, any>
|
|
1499
1510
|
}
|
|
1500
1511
|
}
|
|
1501
1512
|
|
|
1502
1513
|
/** @ignore */
|
|
1503
1514
|
declare module '@livestore/wa-sqlite/src/examples/MemoryAsyncVFS.js' {
|
|
1504
|
-
import { MemoryVFS } from
|
|
1505
|
-
export class MemoryAsyncVFS extends MemoryVFS {
|
|
1506
|
-
}
|
|
1515
|
+
import { MemoryVFS } from '@livestore/wa-sqlite/src/examples/MemoryVFS.js'
|
|
1516
|
+
export class MemoryAsyncVFS extends MemoryVFS {}
|
|
1507
1517
|
}
|
|
1508
1518
|
|
|
1509
1519
|
/** @ignore */
|
|
@@ -1527,5 +1537,5 @@ declare module '@livestore/wa-sqlite/src/examples/tag.js' {
|
|
|
1527
1537
|
* @param {number} db
|
|
1528
1538
|
* @returns {function(TemplateStringsArray, ...any): Promise<object[]>}
|
|
1529
1539
|
*/
|
|
1530
|
-
export function tag(sqlite3: any, db: number): (arg0: TemplateStringsArray, ...args: any[]) => Promise<object[]
|
|
1540
|
+
export function tag(sqlite3: any, db: number): (arg0: TemplateStringsArray, ...args: any[]) => Promise<object[]>
|
|
1531
1541
|
}
|