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