jsql-neo 5.5.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -202
- package/README.md +8155 -8097
- package/bin/jsql +320 -320
- package/bin/jsql-server +90 -90
- package/bin/jsql-server-control.js +177 -177
- package/index.d.ts +412 -385
- package/index.js +128 -124
- package/lib/ast.js +214 -214
- package/lib/btree.js +478 -413
- package/lib/cache.js +328 -328
- package/lib/client.js +125 -125
- package/lib/database.js +1741 -1744
- package/lib/date-types.js +182 -182
- package/lib/errors.js +89 -89
- package/lib/jsql_format.js +497 -497
- package/lib/migrate.js +254 -254
- package/lib/mod.js +292 -292
- package/lib/mongo_server.js +607 -607
- package/lib/multiserver.js +140 -140
- package/lib/mysql_compat.js +413 -413
- package/lib/mysql_server.js +1237 -1237
- package/lib/native_client.js +722 -732
- package/lib/nedb_compat.js +506 -506
- package/lib/pg_server.js +864 -864
- package/lib/plugin.js +259 -35
- package/lib/plugins/audit.js +37 -0
- package/lib/plugins/index.js +72 -0
- package/lib/plugins/logger.js +35 -0
- package/lib/plugins/metrics.js +38 -0
- package/lib/plugins/timestamps.js +57 -0
- package/lib/plugins/validation.js +128 -0
- package/lib/prepared.js +37 -0
- package/lib/query.js +834 -815
- package/lib/redis_server.js +571 -571
- package/lib/sql.js +4053 -3460
- package/lib/sqlite_compat.js +323 -323
- package/lib/sqlite_worker.js +264 -264
- package/lib/table.js +1351 -1304
- package/lib/tui.js +502 -502
- package/lib/wasm.js +1 -1
- package/lib/wasm_client.js +715 -718
- package/lib/web_ui.js +257 -257
- package/native/jsql-neo-native.node +0 -0
- package/nativesrc/jsql-neo-core/Cargo.lock +462 -455
- package/nativesrc/jsql-neo-core/Cargo.toml +26 -24
- package/nativesrc/jsql-neo-core/src/engine/hybrid.rs +492 -455
- package/nativesrc/jsql-neo-core/src/engine/memory.rs +191 -168
- package/nativesrc/jsql-neo-core/src/engine/mod.rs +74 -62
- package/nativesrc/jsql-neo-core/src/engine/table.rs +996 -700
- package/nativesrc/jsql-neo-core/src/lib.rs +2 -2
- package/nativesrc/jsql-neo-core/src/storage/mod.rs +2 -2
- package/nativesrc/jsql-neo-core/src/storage/persistent.rs +1 -1
- package/nativesrc/jsql-neo-core/src/storage/wal.rs +298 -85
- package/nativesrc/jsql-neo-core/src/types.rs +93 -93
- package/nativesrc/jsql-neo-native/Cargo.lock +613 -606
- package/nativesrc/jsql-neo-native/Cargo.toml +24 -16
- package/nativesrc/jsql-neo-native/build.rs +3 -3
- package/nativesrc/jsql-neo-native/package.json +7 -7
- package/nativesrc/jsql-neo-native/src/lib.rs +281 -269
- package/nativesrc/jsql-neo-wasm/Cargo.lock +472 -465
- package/nativesrc/jsql-neo-wasm/Cargo.toml +22 -15
- package/nativesrc/jsql-neo-wasm/src/lib.rs +463 -447
- package/package.json +87 -87
- package/postinstall.js +158 -158
- package/test/btree.test.js +144 -128
- package/test/coverage.js +187 -187
- package/test/join.test.js +110 -110
- package/test/native.test.js +158 -158
- package/test/query-opt.test.js +109 -0
- package/test/regress-5.1.0.js +271 -271
- package/test/smoke.js +58 -58
- package/test/sql-parser.test.js +450 -273
- package/test/wasm.test.js +110 -110
- package/wasm/browser.d.ts +89 -89
- package/wasm/browser.mjs +591 -569
- package/wasm/browser_bg.mjs +618 -597
- package/wasm/jsql_neo_wasm.d.ts +44 -38
- package/wasm/jsql_neo_wasm.js +641 -520
- package/wasm/jsql_neo_wasm_bg.wasm +0 -0
- package/wasm/jsql_neo_wasm_bg.wasm.d.ts +26 -26
- package/wasm/package.json +11 -11
package/wasm/jsql_neo_wasm.js
CHANGED
|
@@ -1,520 +1,641 @@
|
|
|
1
|
-
/* @ts-self-types="./jsql_neo_wasm.d.ts" */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
wasm.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
deferred2_0 =
|
|
95
|
-
deferred2_1 =
|
|
96
|
-
return getStringFromWasm0(
|
|
97
|
-
} finally {
|
|
98
|
-
wasm.
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
* @param {string}
|
|
106
|
-
* @param {
|
|
107
|
-
* @
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const ptr0 = passStringToWasm0(
|
|
115
|
-
const len0 = WASM_VECTOR_LEN;
|
|
116
|
-
const ptr1 = passStringToWasm0(
|
|
117
|
-
const len1 = WASM_VECTOR_LEN;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
*
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
* @param {
|
|
266
|
-
* @
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
let
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
const ptr0 = passStringToWasm0(table, wasm.
|
|
274
|
-
const len0 = WASM_VECTOR_LEN;
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
*
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
1
|
+
/* @ts-self-types="./jsql_neo_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 运行期加列:扩展表结构并为已有行回填默认值。
|
|
5
|
+
* fs_json 为单个 FieldSchema 的 JSON,例如 {"type":"integer","nullable":true,"default":0}
|
|
6
|
+
* @param {string} table
|
|
7
|
+
* @param {string} name
|
|
8
|
+
* @param {string} fs_json
|
|
9
|
+
* @returns {string}
|
|
10
|
+
*/
|
|
11
|
+
function jsql_add_column(table, name, fs_json) {
|
|
12
|
+
let deferred4_0;
|
|
13
|
+
let deferred4_1;
|
|
14
|
+
try {
|
|
15
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
16
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
17
|
+
const len0 = WASM_VECTOR_LEN;
|
|
18
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
19
|
+
const len1 = WASM_VECTOR_LEN;
|
|
20
|
+
const ptr2 = passStringToWasm0(fs_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
21
|
+
const len2 = WASM_VECTOR_LEN;
|
|
22
|
+
wasm.jsql_add_column(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
23
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
24
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
25
|
+
deferred4_0 = r0;
|
|
26
|
+
deferred4_1 = r1;
|
|
27
|
+
return getStringFromWasm0(r0, r1);
|
|
28
|
+
} finally {
|
|
29
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
30
|
+
wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.jsql_add_column = jsql_add_column;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
38
|
+
function jsql_begin_tx() {
|
|
39
|
+
let deferred1_0;
|
|
40
|
+
let deferred1_1;
|
|
41
|
+
try {
|
|
42
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
43
|
+
wasm.jsql_begin_tx(retptr);
|
|
44
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
45
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
46
|
+
deferred1_0 = r0;
|
|
47
|
+
deferred1_1 = r1;
|
|
48
|
+
return getStringFromWasm0(r0, r1);
|
|
49
|
+
} finally {
|
|
50
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
51
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.jsql_begin_tx = jsql_begin_tx;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {string} tx_id
|
|
58
|
+
* @returns {string}
|
|
59
|
+
*/
|
|
60
|
+
function jsql_commit_tx(tx_id) {
|
|
61
|
+
let deferred2_0;
|
|
62
|
+
let deferred2_1;
|
|
63
|
+
try {
|
|
64
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
65
|
+
const ptr0 = passStringToWasm0(tx_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
66
|
+
const len0 = WASM_VECTOR_LEN;
|
|
67
|
+
wasm.jsql_commit_tx(retptr, ptr0, len0);
|
|
68
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
69
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
70
|
+
deferred2_0 = r0;
|
|
71
|
+
deferred2_1 = r1;
|
|
72
|
+
return getStringFromWasm0(r0, r1);
|
|
73
|
+
} finally {
|
|
74
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
75
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.jsql_commit_tx = jsql_commit_tx;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @param {string} table
|
|
82
|
+
* @returns {string}
|
|
83
|
+
*/
|
|
84
|
+
function jsql_count(table) {
|
|
85
|
+
let deferred2_0;
|
|
86
|
+
let deferred2_1;
|
|
87
|
+
try {
|
|
88
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
89
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
90
|
+
const len0 = WASM_VECTOR_LEN;
|
|
91
|
+
wasm.jsql_count(retptr, ptr0, len0);
|
|
92
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
93
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
94
|
+
deferred2_0 = r0;
|
|
95
|
+
deferred2_1 = r1;
|
|
96
|
+
return getStringFromWasm0(r0, r1);
|
|
97
|
+
} finally {
|
|
98
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
99
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.jsql_count = jsql_count;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param {string} name
|
|
106
|
+
* @param {string} schema_json
|
|
107
|
+
* @returns {string}
|
|
108
|
+
*/
|
|
109
|
+
function jsql_create_table(name, schema_json) {
|
|
110
|
+
let deferred3_0;
|
|
111
|
+
let deferred3_1;
|
|
112
|
+
try {
|
|
113
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
114
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
115
|
+
const len0 = WASM_VECTOR_LEN;
|
|
116
|
+
const ptr1 = passStringToWasm0(schema_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
117
|
+
const len1 = WASM_VECTOR_LEN;
|
|
118
|
+
wasm.jsql_create_table(retptr, ptr0, len0, ptr1, len1);
|
|
119
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
120
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
121
|
+
deferred3_0 = r0;
|
|
122
|
+
deferred3_1 = r1;
|
|
123
|
+
return getStringFromWasm0(r0, r1);
|
|
124
|
+
} finally {
|
|
125
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
126
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.jsql_create_table = jsql_create_table;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @param {string} name
|
|
133
|
+
* @returns {string}
|
|
134
|
+
*/
|
|
135
|
+
function jsql_drop_table(name) {
|
|
136
|
+
let deferred2_0;
|
|
137
|
+
let deferred2_1;
|
|
138
|
+
try {
|
|
139
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
140
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
141
|
+
const len0 = WASM_VECTOR_LEN;
|
|
142
|
+
wasm.jsql_drop_table(retptr, ptr0, len0);
|
|
143
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
144
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
145
|
+
deferred2_0 = r0;
|
|
146
|
+
deferred2_1 = r1;
|
|
147
|
+
return getStringFromWasm0(r0, r1);
|
|
148
|
+
} finally {
|
|
149
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
150
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exports.jsql_drop_table = jsql_drop_table;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @param {string} table
|
|
157
|
+
* @param {string} filter_json
|
|
158
|
+
* @param {number} limit
|
|
159
|
+
* @param {number} offset
|
|
160
|
+
* @returns {string}
|
|
161
|
+
*/
|
|
162
|
+
function jsql_find(table, filter_json, limit, offset) {
|
|
163
|
+
let deferred3_0;
|
|
164
|
+
let deferred3_1;
|
|
165
|
+
try {
|
|
166
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
167
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
168
|
+
const len0 = WASM_VECTOR_LEN;
|
|
169
|
+
const ptr1 = passStringToWasm0(filter_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
170
|
+
const len1 = WASM_VECTOR_LEN;
|
|
171
|
+
wasm.jsql_find(retptr, ptr0, len0, ptr1, len1, limit, offset);
|
|
172
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
173
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
174
|
+
deferred3_0 = r0;
|
|
175
|
+
deferred3_1 = r1;
|
|
176
|
+
return getStringFromWasm0(r0, r1);
|
|
177
|
+
} finally {
|
|
178
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
179
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.jsql_find = jsql_find;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @param {string} table
|
|
186
|
+
* @param {bigint} id
|
|
187
|
+
* @returns {string}
|
|
188
|
+
*/
|
|
189
|
+
function jsql_find_by_id(table, id) {
|
|
190
|
+
let deferred2_0;
|
|
191
|
+
let deferred2_1;
|
|
192
|
+
try {
|
|
193
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
194
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
195
|
+
const len0 = WASM_VECTOR_LEN;
|
|
196
|
+
wasm.jsql_find_by_id(retptr, ptr0, len0, id);
|
|
197
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
198
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
199
|
+
deferred2_0 = r0;
|
|
200
|
+
deferred2_1 = r1;
|
|
201
|
+
return getStringFromWasm0(r0, r1);
|
|
202
|
+
} finally {
|
|
203
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
204
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.jsql_find_by_id = jsql_find_by_id;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @param {string} table
|
|
211
|
+
* @param {string} ids_json
|
|
212
|
+
* @returns {string}
|
|
213
|
+
*/
|
|
214
|
+
function jsql_find_by_ids(table, ids_json) {
|
|
215
|
+
let deferred3_0;
|
|
216
|
+
let deferred3_1;
|
|
217
|
+
try {
|
|
218
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
219
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
220
|
+
const len0 = WASM_VECTOR_LEN;
|
|
221
|
+
const ptr1 = passStringToWasm0(ids_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
222
|
+
const len1 = WASM_VECTOR_LEN;
|
|
223
|
+
wasm.jsql_find_by_ids(retptr, ptr0, len0, ptr1, len1);
|
|
224
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
225
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
226
|
+
deferred3_0 = r0;
|
|
227
|
+
deferred3_1 = r1;
|
|
228
|
+
return getStringFromWasm0(r0, r1);
|
|
229
|
+
} finally {
|
|
230
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
231
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.jsql_find_by_ids = jsql_find_by_ids;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @param {string} table
|
|
238
|
+
* @param {string} data_json
|
|
239
|
+
* @returns {string}
|
|
240
|
+
*/
|
|
241
|
+
function jsql_insert(table, data_json) {
|
|
242
|
+
let deferred3_0;
|
|
243
|
+
let deferred3_1;
|
|
244
|
+
try {
|
|
245
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
246
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
247
|
+
const len0 = WASM_VECTOR_LEN;
|
|
248
|
+
const ptr1 = passStringToWasm0(data_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
249
|
+
const len1 = WASM_VECTOR_LEN;
|
|
250
|
+
wasm.jsql_insert(retptr, ptr0, len0, ptr1, len1);
|
|
251
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
252
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
253
|
+
deferred3_0 = r0;
|
|
254
|
+
deferred3_1 = r1;
|
|
255
|
+
return getStringFromWasm0(r0, r1);
|
|
256
|
+
} finally {
|
|
257
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
258
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.jsql_insert = jsql_insert;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @param {string} table
|
|
265
|
+
* @param {Uint8Array} data
|
|
266
|
+
* @returns {string}
|
|
267
|
+
*/
|
|
268
|
+
function jsql_insert_buf(table, data) {
|
|
269
|
+
let deferred3_0;
|
|
270
|
+
let deferred3_1;
|
|
271
|
+
try {
|
|
272
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
273
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
276
|
+
const len1 = WASM_VECTOR_LEN;
|
|
277
|
+
wasm.jsql_insert_buf(retptr, ptr0, len0, ptr1, len1);
|
|
278
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
|
+
deferred3_0 = r0;
|
|
281
|
+
deferred3_1 = r1;
|
|
282
|
+
return getStringFromWasm0(r0, r1);
|
|
283
|
+
} finally {
|
|
284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
285
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
exports.jsql_insert_buf = jsql_insert_buf;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} table
|
|
292
|
+
* @param {Uint8Array} data
|
|
293
|
+
* @returns {string}
|
|
294
|
+
*/
|
|
295
|
+
function jsql_insert_buf_count(table, data) {
|
|
296
|
+
let deferred3_0;
|
|
297
|
+
let deferred3_1;
|
|
298
|
+
try {
|
|
299
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
300
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
301
|
+
const len0 = WASM_VECTOR_LEN;
|
|
302
|
+
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
303
|
+
const len1 = WASM_VECTOR_LEN;
|
|
304
|
+
wasm.jsql_insert_buf_count(retptr, ptr0, len0, ptr1, len1);
|
|
305
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
306
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
307
|
+
deferred3_0 = r0;
|
|
308
|
+
deferred3_1 = r1;
|
|
309
|
+
return getStringFromWasm0(r0, r1);
|
|
310
|
+
} finally {
|
|
311
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
312
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
exports.jsql_insert_buf_count = jsql_insert_buf_count;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @param {string} table
|
|
319
|
+
* @param {string} json
|
|
320
|
+
* @returns {string}
|
|
321
|
+
*/
|
|
322
|
+
function jsql_insert_json(table, json) {
|
|
323
|
+
let deferred3_0;
|
|
324
|
+
let deferred3_1;
|
|
325
|
+
try {
|
|
326
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
327
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
328
|
+
const len0 = WASM_VECTOR_LEN;
|
|
329
|
+
const ptr1 = passStringToWasm0(json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
330
|
+
const len1 = WASM_VECTOR_LEN;
|
|
331
|
+
wasm.jsql_insert_json(retptr, ptr0, len0, ptr1, len1);
|
|
332
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
333
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
334
|
+
deferred3_0 = r0;
|
|
335
|
+
deferred3_1 = r1;
|
|
336
|
+
return getStringFromWasm0(r0, r1);
|
|
337
|
+
} finally {
|
|
338
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
339
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
exports.jsql_insert_json = jsql_insert_json;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @param {string} table
|
|
346
|
+
* @param {bigint} id
|
|
347
|
+
* @returns {string}
|
|
348
|
+
*/
|
|
349
|
+
function jsql_remove_by_id(table, id) {
|
|
350
|
+
let deferred2_0;
|
|
351
|
+
let deferred2_1;
|
|
352
|
+
try {
|
|
353
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
354
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
355
|
+
const len0 = WASM_VECTOR_LEN;
|
|
356
|
+
wasm.jsql_remove_by_id(retptr, ptr0, len0, id);
|
|
357
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
358
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
359
|
+
deferred2_0 = r0;
|
|
360
|
+
deferred2_1 = r1;
|
|
361
|
+
return getStringFromWasm0(r0, r1);
|
|
362
|
+
} finally {
|
|
363
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
364
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
exports.jsql_remove_by_id = jsql_remove_by_id;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @param {string} table
|
|
371
|
+
* @param {string} ids_json
|
|
372
|
+
* @returns {string}
|
|
373
|
+
*/
|
|
374
|
+
function jsql_remove_by_ids(table, ids_json) {
|
|
375
|
+
let deferred3_0;
|
|
376
|
+
let deferred3_1;
|
|
377
|
+
try {
|
|
378
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
379
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
380
|
+
const len0 = WASM_VECTOR_LEN;
|
|
381
|
+
const ptr1 = passStringToWasm0(ids_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
382
|
+
const len1 = WASM_VECTOR_LEN;
|
|
383
|
+
wasm.jsql_remove_by_ids(retptr, ptr0, len0, ptr1, len1);
|
|
384
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
385
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
386
|
+
deferred3_0 = r0;
|
|
387
|
+
deferred3_1 = r1;
|
|
388
|
+
return getStringFromWasm0(r0, r1);
|
|
389
|
+
} finally {
|
|
390
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
391
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
exports.jsql_remove_by_ids = jsql_remove_by_ids;
|
|
395
|
+
|
|
396
|
+
function jsql_reset() {
|
|
397
|
+
wasm.jsql_reset();
|
|
398
|
+
}
|
|
399
|
+
exports.jsql_reset = jsql_reset;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* @param {string} tx_id
|
|
403
|
+
* @returns {string}
|
|
404
|
+
*/
|
|
405
|
+
function jsql_rollback_tx(tx_id) {
|
|
406
|
+
let deferred2_0;
|
|
407
|
+
let deferred2_1;
|
|
408
|
+
try {
|
|
409
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
410
|
+
const ptr0 = passStringToWasm0(tx_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
411
|
+
const len0 = WASM_VECTOR_LEN;
|
|
412
|
+
wasm.jsql_rollback_tx(retptr, ptr0, len0);
|
|
413
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
414
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
415
|
+
deferred2_0 = r0;
|
|
416
|
+
deferred2_1 = r1;
|
|
417
|
+
return getStringFromWasm0(r0, r1);
|
|
418
|
+
} finally {
|
|
419
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
420
|
+
wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
exports.jsql_rollback_tx = jsql_rollback_tx;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @param {string} table
|
|
427
|
+
* @param {bigint} id
|
|
428
|
+
* @param {string} data_json
|
|
429
|
+
* @returns {string}
|
|
430
|
+
*/
|
|
431
|
+
function jsql_update_by_id(table, id, data_json) {
|
|
432
|
+
let deferred3_0;
|
|
433
|
+
let deferred3_1;
|
|
434
|
+
try {
|
|
435
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
436
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
437
|
+
const len0 = WASM_VECTOR_LEN;
|
|
438
|
+
const ptr1 = passStringToWasm0(data_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
439
|
+
const len1 = WASM_VECTOR_LEN;
|
|
440
|
+
wasm.jsql_update_by_id(retptr, ptr0, len0, id, ptr1, len1);
|
|
441
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
442
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
443
|
+
deferred3_0 = r0;
|
|
444
|
+
deferred3_1 = r1;
|
|
445
|
+
return getStringFromWasm0(r0, r1);
|
|
446
|
+
} finally {
|
|
447
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
448
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
exports.jsql_update_by_id = jsql_update_by_id;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* @param {string} table
|
|
455
|
+
* @param {string} batch_json
|
|
456
|
+
* @returns {string}
|
|
457
|
+
*/
|
|
458
|
+
function jsql_update_by_ids(table, batch_json) {
|
|
459
|
+
let deferred3_0;
|
|
460
|
+
let deferred3_1;
|
|
461
|
+
try {
|
|
462
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
463
|
+
const ptr0 = passStringToWasm0(table, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
464
|
+
const len0 = WASM_VECTOR_LEN;
|
|
465
|
+
const ptr1 = passStringToWasm0(batch_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
466
|
+
const len1 = WASM_VECTOR_LEN;
|
|
467
|
+
wasm.jsql_update_by_ids(retptr, ptr0, len0, ptr1, len1);
|
|
468
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
469
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
470
|
+
deferred3_0 = r0;
|
|
471
|
+
deferred3_1 = r1;
|
|
472
|
+
return getStringFromWasm0(r0, r1);
|
|
473
|
+
} finally {
|
|
474
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
475
|
+
wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
exports.jsql_update_by_ids = jsql_update_by_ids;
|
|
479
|
+
function __wbg_get_imports() {
|
|
480
|
+
const import0 = {
|
|
481
|
+
__proto__: null,
|
|
482
|
+
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
483
|
+
const obj = getObject(arg1);
|
|
484
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
485
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
486
|
+
var len1 = WASM_VECTOR_LEN;
|
|
487
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
488
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
489
|
+
},
|
|
490
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
491
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
492
|
+
},
|
|
493
|
+
__wbg_new_cc984128914cfc6f: function(arg0) {
|
|
494
|
+
const ret = new Date(getObject(arg0));
|
|
495
|
+
return addHeapObject(ret);
|
|
496
|
+
},
|
|
497
|
+
__wbg_now_86c0d4ba3fa605b8: function() {
|
|
498
|
+
const ret = Date.now();
|
|
499
|
+
return ret;
|
|
500
|
+
},
|
|
501
|
+
__wbg_toISOString_706fbe321055ee58: function(arg0) {
|
|
502
|
+
const ret = getObject(arg0).toISOString();
|
|
503
|
+
return addHeapObject(ret);
|
|
504
|
+
},
|
|
505
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
506
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
507
|
+
const ret = arg0;
|
|
508
|
+
return addHeapObject(ret);
|
|
509
|
+
},
|
|
510
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
511
|
+
takeObject(arg0);
|
|
512
|
+
},
|
|
513
|
+
};
|
|
514
|
+
return {
|
|
515
|
+
__proto__: null,
|
|
516
|
+
"./jsql_neo_wasm_bg.js": import0,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function addHeapObject(obj) {
|
|
521
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
522
|
+
const idx = heap_next;
|
|
523
|
+
heap_next = heap[idx];
|
|
524
|
+
|
|
525
|
+
heap[idx] = obj;
|
|
526
|
+
return idx;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
function dropObject(idx) {
|
|
530
|
+
if (idx < 1028) return;
|
|
531
|
+
heap[idx] = heap_next;
|
|
532
|
+
heap_next = idx;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
let cachedDataViewMemory0 = null;
|
|
536
|
+
function getDataViewMemory0() {
|
|
537
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
538
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
539
|
+
}
|
|
540
|
+
return cachedDataViewMemory0;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function getStringFromWasm0(ptr, len) {
|
|
544
|
+
return decodeText(ptr >>> 0, len);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
let cachedUint8ArrayMemory0 = null;
|
|
548
|
+
function getUint8ArrayMemory0() {
|
|
549
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
550
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
551
|
+
}
|
|
552
|
+
return cachedUint8ArrayMemory0;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
function getObject(idx) { return heap[idx]; }
|
|
556
|
+
|
|
557
|
+
let heap = new Array(1024).fill(undefined);
|
|
558
|
+
heap.push(undefined, null, true, false);
|
|
559
|
+
|
|
560
|
+
let heap_next = heap.length;
|
|
561
|
+
|
|
562
|
+
function isLikeNone(x) {
|
|
563
|
+
return x === undefined || x === null;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
567
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
568
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
569
|
+
WASM_VECTOR_LEN = arg.length;
|
|
570
|
+
return ptr;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
574
|
+
if (realloc === undefined) {
|
|
575
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
576
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
577
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
578
|
+
WASM_VECTOR_LEN = buf.length;
|
|
579
|
+
return ptr;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
let len = arg.length;
|
|
583
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
584
|
+
|
|
585
|
+
const mem = getUint8ArrayMemory0();
|
|
586
|
+
|
|
587
|
+
let offset = 0;
|
|
588
|
+
|
|
589
|
+
for (; offset < len; offset++) {
|
|
590
|
+
const code = arg.charCodeAt(offset);
|
|
591
|
+
if (code > 0x7F) break;
|
|
592
|
+
mem[ptr + offset] = code;
|
|
593
|
+
}
|
|
594
|
+
if (offset !== len) {
|
|
595
|
+
if (offset !== 0) {
|
|
596
|
+
arg = arg.slice(offset);
|
|
597
|
+
}
|
|
598
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
599
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
600
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
601
|
+
|
|
602
|
+
offset += ret.written;
|
|
603
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
WASM_VECTOR_LEN = offset;
|
|
607
|
+
return ptr;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function takeObject(idx) {
|
|
611
|
+
const ret = getObject(idx);
|
|
612
|
+
dropObject(idx);
|
|
613
|
+
return ret;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
617
|
+
cachedTextDecoder.decode();
|
|
618
|
+
function decodeText(ptr, len) {
|
|
619
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
const cachedTextEncoder = new TextEncoder();
|
|
623
|
+
|
|
624
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
625
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
626
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
627
|
+
view.set(buf);
|
|
628
|
+
return {
|
|
629
|
+
read: arg.length,
|
|
630
|
+
written: buf.length
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
let WASM_VECTOR_LEN = 0;
|
|
636
|
+
|
|
637
|
+
const wasmPath = `${__dirname}/jsql_neo_wasm_bg.wasm`;
|
|
638
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
639
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
640
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
641
|
+
let wasm = wasmInstance.exports;
|