@loradb/lora-wasm 0.9.0 → 0.10.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/package.json +10 -8
- package/pkg-bundler/LICENSE +0 -87
- package/pkg-bundler/README.md +0 -303
- package/pkg-bundler/lora_wasm.d.ts +0 -85
- package/pkg-bundler/lora_wasm.js +0 -5
- package/pkg-bundler/lora_wasm_bg.js +0 -835
- package/pkg-bundler/lora_wasm_bg.wasm +0 -0
- package/pkg-bundler/lora_wasm_bg.wasm.d.ts +0 -29
- package/pkg-bundler/package.json +0 -22
- package/pkg-node/LICENSE +0 -87
- package/pkg-node/README.md +0 -303
- package/pkg-node/lora_wasm.d.ts +0 -85
- package/pkg-node/lora_wasm.js +0 -843
- package/pkg-node/lora_wasm_bg.wasm +0 -0
- package/pkg-node/lora_wasm_bg.wasm.d.ts +0 -29
- package/pkg-node/package.json +0 -16
- package/pkg-web/LICENSE +0 -87
- package/pkg-web/README.md +0 -303
- package/pkg-web/lora_wasm.d.ts +0 -138
- package/pkg-web/lora_wasm.js +0 -866
- package/pkg-web/lora_wasm_bg.wasm +0 -0
- package/pkg-web/lora_wasm_bg.wasm.d.ts +0 -29
- package/pkg-web/package.json +0 -20
package/pkg-node/lora_wasm.js
DELETED
|
@@ -1,843 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
let imports = {};
|
|
3
|
-
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
let wasm;
|
|
5
|
-
const { TextEncoder, TextDecoder } = require(`util`);
|
|
6
|
-
|
|
7
|
-
let WASM_VECTOR_LEN = 0;
|
|
8
|
-
|
|
9
|
-
let cachedUint8ArrayMemory0 = null;
|
|
10
|
-
|
|
11
|
-
function getUint8ArrayMemory0() {
|
|
12
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
13
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
-
}
|
|
15
|
-
return cachedUint8ArrayMemory0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
19
|
-
|
|
20
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
21
|
-
? function (arg, view) {
|
|
22
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
23
|
-
}
|
|
24
|
-
: function (arg, view) {
|
|
25
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
26
|
-
view.set(buf);
|
|
27
|
-
return {
|
|
28
|
-
read: arg.length,
|
|
29
|
-
written: buf.length
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
34
|
-
|
|
35
|
-
if (realloc === undefined) {
|
|
36
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
37
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
38
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
39
|
-
WASM_VECTOR_LEN = buf.length;
|
|
40
|
-
return ptr;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let len = arg.length;
|
|
44
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
45
|
-
|
|
46
|
-
const mem = getUint8ArrayMemory0();
|
|
47
|
-
|
|
48
|
-
let offset = 0;
|
|
49
|
-
|
|
50
|
-
for (; offset < len; offset++) {
|
|
51
|
-
const code = arg.charCodeAt(offset);
|
|
52
|
-
if (code > 0x7F) break;
|
|
53
|
-
mem[ptr + offset] = code;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (offset !== len) {
|
|
57
|
-
if (offset !== 0) {
|
|
58
|
-
arg = arg.slice(offset);
|
|
59
|
-
}
|
|
60
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
61
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
62
|
-
const ret = encodeString(arg, view);
|
|
63
|
-
|
|
64
|
-
offset += ret.written;
|
|
65
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
WASM_VECTOR_LEN = offset;
|
|
69
|
-
return ptr;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
let cachedDataViewMemory0 = null;
|
|
73
|
-
|
|
74
|
-
function getDataViewMemory0() {
|
|
75
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
76
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
77
|
-
}
|
|
78
|
-
return cachedDataViewMemory0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function addToExternrefTable0(obj) {
|
|
82
|
-
const idx = wasm.__externref_table_alloc();
|
|
83
|
-
wasm.__wbindgen_export_4.set(idx, obj);
|
|
84
|
-
return idx;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function handleError(f, args) {
|
|
88
|
-
try {
|
|
89
|
-
return f.apply(this, args);
|
|
90
|
-
} catch (e) {
|
|
91
|
-
const idx = addToExternrefTable0(e);
|
|
92
|
-
wasm.__wbindgen_exn_store(idx);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
97
|
-
|
|
98
|
-
cachedTextDecoder.decode();
|
|
99
|
-
|
|
100
|
-
function getStringFromWasm0(ptr, len) {
|
|
101
|
-
ptr = ptr >>> 0;
|
|
102
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function isLikeNone(x) {
|
|
106
|
-
return x === undefined || x === null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function debugString(val) {
|
|
110
|
-
// primitive types
|
|
111
|
-
const type = typeof val;
|
|
112
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
113
|
-
return `${val}`;
|
|
114
|
-
}
|
|
115
|
-
if (type == 'string') {
|
|
116
|
-
return `"${val}"`;
|
|
117
|
-
}
|
|
118
|
-
if (type == 'symbol') {
|
|
119
|
-
const description = val.description;
|
|
120
|
-
if (description == null) {
|
|
121
|
-
return 'Symbol';
|
|
122
|
-
} else {
|
|
123
|
-
return `Symbol(${description})`;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (type == 'function') {
|
|
127
|
-
const name = val.name;
|
|
128
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
129
|
-
return `Function(${name})`;
|
|
130
|
-
} else {
|
|
131
|
-
return 'Function';
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// objects
|
|
135
|
-
if (Array.isArray(val)) {
|
|
136
|
-
const length = val.length;
|
|
137
|
-
let debug = '[';
|
|
138
|
-
if (length > 0) {
|
|
139
|
-
debug += debugString(val[0]);
|
|
140
|
-
}
|
|
141
|
-
for(let i = 1; i < length; i++) {
|
|
142
|
-
debug += ', ' + debugString(val[i]);
|
|
143
|
-
}
|
|
144
|
-
debug += ']';
|
|
145
|
-
return debug;
|
|
146
|
-
}
|
|
147
|
-
// Test for built-in
|
|
148
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
149
|
-
let className;
|
|
150
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
151
|
-
className = builtInMatches[1];
|
|
152
|
-
} else {
|
|
153
|
-
// Failed to match the standard '[object ClassName]'
|
|
154
|
-
return toString.call(val);
|
|
155
|
-
}
|
|
156
|
-
if (className == 'Object') {
|
|
157
|
-
// we're a user defined class or Object
|
|
158
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
159
|
-
// easier than looping through ownProperties of `val`.
|
|
160
|
-
try {
|
|
161
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
162
|
-
} catch (_) {
|
|
163
|
-
return 'Object';
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
// errors
|
|
167
|
-
if (val instanceof Error) {
|
|
168
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
169
|
-
}
|
|
170
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
171
|
-
return className;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function takeFromExternrefTable0(idx) {
|
|
175
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
176
|
-
wasm.__externref_table_dealloc(idx);
|
|
177
|
-
return value;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
181
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
182
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
183
|
-
WASM_VECTOR_LEN = arg.length;
|
|
184
|
-
return ptr;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
188
|
-
ptr = ptr >>> 0;
|
|
189
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Call once at module start to install a panic hook that routes Rust
|
|
193
|
-
* panics to `console.error`. No-op if compiled without the default feature.
|
|
194
|
-
*/
|
|
195
|
-
module.exports.init = function() {
|
|
196
|
-
wasm.init();
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
const WasmDatabaseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
200
|
-
? { register: () => {}, unregister: () => {} }
|
|
201
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmdatabase_free(ptr >>> 0, 1));
|
|
202
|
-
/**
|
|
203
|
-
* In-memory Lora graph database handle.
|
|
204
|
-
*/
|
|
205
|
-
class WasmDatabase {
|
|
206
|
-
|
|
207
|
-
__destroy_into_raw() {
|
|
208
|
-
const ptr = this.__wbg_ptr;
|
|
209
|
-
this.__wbg_ptr = 0;
|
|
210
|
-
WasmDatabaseFinalization.unregister(this);
|
|
211
|
-
return ptr;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
free() {
|
|
215
|
-
const ptr = this.__destroy_into_raw();
|
|
216
|
-
wasm.__wbg_wasmdatabase_free(ptr, 0);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* @returns {number}
|
|
220
|
-
*/
|
|
221
|
-
nodeCount() {
|
|
222
|
-
const ret = wasm.wasmdatabase_nodeCount(this.__wbg_ptr);
|
|
223
|
-
return ret >>> 0;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Open a true native row stream. Rows are pulled from the Rust executor
|
|
227
|
-
* one `next()` call at a time.
|
|
228
|
-
* @param {string} query
|
|
229
|
-
* @param {any} params
|
|
230
|
-
* @returns {WasmQueryStream}
|
|
231
|
-
*/
|
|
232
|
-
openStream(query, params) {
|
|
233
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
-
const len0 = WASM_VECTOR_LEN;
|
|
235
|
-
const ret = wasm.wasmdatabase_openStream(this.__wbg_ptr, ptr0, len0, params);
|
|
236
|
-
if (ret[2]) {
|
|
237
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
238
|
-
}
|
|
239
|
-
return WasmQueryStream.__wrap(ret[0]);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Execute an array of `{ query, params? }` statements inside one native
|
|
243
|
-
* transaction. Returns an array of query results in statement order.
|
|
244
|
-
* @param {any} statements
|
|
245
|
-
* @param {string | null} [mode]
|
|
246
|
-
* @returns {any}
|
|
247
|
-
*/
|
|
248
|
-
transaction(statements, mode) {
|
|
249
|
-
var ptr0 = isLikeNone(mode) ? 0 : passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
250
|
-
var len0 = WASM_VECTOR_LEN;
|
|
251
|
-
const ret = wasm.wasmdatabase_transaction(this.__wbg_ptr, statements, ptr0, len0);
|
|
252
|
-
if (ret[2]) {
|
|
253
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
254
|
-
}
|
|
255
|
-
return takeFromExternrefTable0(ret[0]);
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Replace the graph state with a database snapshot decoded from `bytes`.
|
|
259
|
-
* Legacy store snapshot bytes are accepted for compatibility.
|
|
260
|
-
*
|
|
261
|
-
* Returns a plain object matching the shape of `SnapshotMeta`:
|
|
262
|
-
* `{ formatVersion, nodeCount, relationshipCount, walLsn }`.
|
|
263
|
-
* @param {Uint8Array} bytes
|
|
264
|
-
* @param {any} options
|
|
265
|
-
* @returns {any}
|
|
266
|
-
*/
|
|
267
|
-
loadSnapshot(bytes, options) {
|
|
268
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
269
|
-
const len0 = WASM_VECTOR_LEN;
|
|
270
|
-
const ret = wasm.wasmdatabase_loadSnapshot(this.__wbg_ptr, ptr0, len0, options);
|
|
271
|
-
if (ret[2]) {
|
|
272
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
273
|
-
}
|
|
274
|
-
return takeFromExternrefTable0(ret[0]);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Serialize the graph into database snapshot bytes. The caller is
|
|
278
|
-
* responsible for writing them to IndexedDB, localStorage, a server, or
|
|
279
|
-
* another host-provided store — WASM has no direct filesystem access.
|
|
280
|
-
* The returned bytes can later be passed to `loadSnapshot` on any
|
|
281
|
-
* `WasmDatabase` instance.
|
|
282
|
-
*
|
|
283
|
-
* Returns the serialized bytes as a `Uint8Array`.
|
|
284
|
-
* @param {any} options
|
|
285
|
-
* @returns {Uint8Array}
|
|
286
|
-
*/
|
|
287
|
-
saveSnapshot(options) {
|
|
288
|
-
const ret = wasm.wasmdatabase_saveSnapshot(this.__wbg_ptr, options);
|
|
289
|
-
if (ret[3]) {
|
|
290
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
291
|
-
}
|
|
292
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
293
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
294
|
-
return v1;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Execute a Lora query and return the result as a binary buffer.
|
|
298
|
-
*
|
|
299
|
-
* Wire format is the shared `lora_binding_buffer` layout. The TS
|
|
300
|
-
* wrapper decodes it once into the same `{ columns, rows }` shape
|
|
301
|
-
* `execute()` returns, but in a tight V8 loop instead of going
|
|
302
|
-
* through `serde_wasm_bindgen` value-by-value. Materially faster
|
|
303
|
-
* on bulk reads.
|
|
304
|
-
* @param {string} query
|
|
305
|
-
* @param {any} params
|
|
306
|
-
* @returns {Uint8Array}
|
|
307
|
-
*/
|
|
308
|
-
executeBuffer(query, params) {
|
|
309
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
310
|
-
const len0 = WASM_VECTOR_LEN;
|
|
311
|
-
const ret = wasm.wasmdatabase_executeBuffer(this.__wbg_ptr, ptr0, len0, params);
|
|
312
|
-
if (ret[3]) {
|
|
313
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
314
|
-
}
|
|
315
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
316
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
317
|
-
return v2;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* @returns {number}
|
|
321
|
-
*/
|
|
322
|
-
relationshipCount() {
|
|
323
|
-
const ret = wasm.wasmdatabase_relationshipCount(this.__wbg_ptr);
|
|
324
|
-
return ret >>> 0;
|
|
325
|
-
}
|
|
326
|
-
constructor() {
|
|
327
|
-
const ret = wasm.wasmdatabase_new();
|
|
328
|
-
this.__wbg_ptr = ret >>> 0;
|
|
329
|
-
WasmDatabaseFinalization.register(this, this.__wbg_ptr, this);
|
|
330
|
-
return this;
|
|
331
|
-
}
|
|
332
|
-
clear() {
|
|
333
|
-
wasm.wasmdatabase_clear(this.__wbg_ptr);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Execute a Lora query. `params` may be `undefined`, `null`, or a
|
|
337
|
-
* plain object keyed by parameter name.
|
|
338
|
-
*
|
|
339
|
-
* Returns `{ columns: string[], rows: Array<Record<string, LoraValue>> }`
|
|
340
|
-
* as a plain JS object (structured-clonable).
|
|
341
|
-
* @param {string} query
|
|
342
|
-
* @param {any} params
|
|
343
|
-
* @returns {any}
|
|
344
|
-
*/
|
|
345
|
-
execute(query, params) {
|
|
346
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
347
|
-
const len0 = WASM_VECTOR_LEN;
|
|
348
|
-
const ret = wasm.wasmdatabase_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
349
|
-
if (ret[2]) {
|
|
350
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
351
|
-
}
|
|
352
|
-
return takeFromExternrefTable0(ret[0]);
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Compile a query and return its plan without executing it.
|
|
356
|
-
*
|
|
357
|
-
* Mutating queries (CREATE / MERGE / SET / DELETE / REMOVE) leave
|
|
358
|
-
* the graph untouched — this method never runs the executor.
|
|
359
|
-
* @param {string} query
|
|
360
|
-
* @param {any} params
|
|
361
|
-
* @returns {any}
|
|
362
|
-
*/
|
|
363
|
-
explain(query, params) {
|
|
364
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
365
|
-
const len0 = WASM_VECTOR_LEN;
|
|
366
|
-
const ret = wasm.wasmdatabase_explain(this.__wbg_ptr, ptr0, len0, params);
|
|
367
|
-
if (ret[2]) {
|
|
368
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
369
|
-
}
|
|
370
|
-
return takeFromExternrefTable0(ret[0]);
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Execute a query and return the plan plus runtime metrics.
|
|
374
|
-
*
|
|
375
|
-
* **PROFILE executes the query for real.** Mutating queries are
|
|
376
|
-
* persisted exactly as in `execute()`. Use `explain()` to inspect
|
|
377
|
-
* a mutating plan without running it.
|
|
378
|
-
* @param {string} query
|
|
379
|
-
* @param {any} params
|
|
380
|
-
* @returns {any}
|
|
381
|
-
*/
|
|
382
|
-
profile(query, params) {
|
|
383
|
-
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
384
|
-
const len0 = WASM_VECTOR_LEN;
|
|
385
|
-
const ret = wasm.wasmdatabase_profile(this.__wbg_ptr, ptr0, len0, params);
|
|
386
|
-
if (ret[2]) {
|
|
387
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
388
|
-
}
|
|
389
|
-
return takeFromExternrefTable0(ret[0]);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
module.exports.WasmDatabase = WasmDatabase;
|
|
393
|
-
|
|
394
|
-
const WasmQueryStreamFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
395
|
-
? { register: () => {}, unregister: () => {} }
|
|
396
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmquerystream_free(ptr >>> 0, 1));
|
|
397
|
-
|
|
398
|
-
class WasmQueryStream {
|
|
399
|
-
|
|
400
|
-
static __wrap(ptr) {
|
|
401
|
-
ptr = ptr >>> 0;
|
|
402
|
-
const obj = Object.create(WasmQueryStream.prototype);
|
|
403
|
-
obj.__wbg_ptr = ptr;
|
|
404
|
-
WasmQueryStreamFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
405
|
-
return obj;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
__destroy_into_raw() {
|
|
409
|
-
const ptr = this.__wbg_ptr;
|
|
410
|
-
this.__wbg_ptr = 0;
|
|
411
|
-
WasmQueryStreamFinalization.unregister(this);
|
|
412
|
-
return ptr;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
free() {
|
|
416
|
-
const ptr = this.__destroy_into_raw();
|
|
417
|
-
wasm.__wbg_wasmquerystream_free(ptr, 0);
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* @returns {any}
|
|
421
|
-
*/
|
|
422
|
-
next() {
|
|
423
|
-
const ret = wasm.wasmquerystream_next(this.__wbg_ptr);
|
|
424
|
-
if (ret[2]) {
|
|
425
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
426
|
-
}
|
|
427
|
-
return takeFromExternrefTable0(ret[0]);
|
|
428
|
-
}
|
|
429
|
-
close() {
|
|
430
|
-
wasm.wasmquerystream_close(this.__wbg_ptr);
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* @returns {any}
|
|
434
|
-
*/
|
|
435
|
-
columns() {
|
|
436
|
-
const ret = wasm.wasmquerystream_columns(this.__wbg_ptr);
|
|
437
|
-
if (ret[2]) {
|
|
438
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
439
|
-
}
|
|
440
|
-
return takeFromExternrefTable0(ret[0]);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
module.exports.WasmQueryStream = WasmQueryStream;
|
|
444
|
-
|
|
445
|
-
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
446
|
-
const ret = String(arg1);
|
|
447
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
-
const len1 = WASM_VECTOR_LEN;
|
|
449
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
450
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
454
|
-
const ret = arg0.buffer;
|
|
455
|
-
return ret;
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
459
|
-
const ret = arg0.call(arg1);
|
|
460
|
-
return ret;
|
|
461
|
-
}, arguments) };
|
|
462
|
-
|
|
463
|
-
module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
464
|
-
const ret = arg0.call(arg1, arg2);
|
|
465
|
-
return ret;
|
|
466
|
-
}, arguments) };
|
|
467
|
-
|
|
468
|
-
module.exports.__wbg_crypto_86f2631e91b51511 = function(arg0) {
|
|
469
|
-
const ret = arg0.crypto;
|
|
470
|
-
return ret;
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
474
|
-
const ret = arg0.done;
|
|
475
|
-
return ret;
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
module.exports.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
479
|
-
const ret = Object.entries(arg0);
|
|
480
|
-
return ret;
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
484
|
-
let deferred0_0;
|
|
485
|
-
let deferred0_1;
|
|
486
|
-
try {
|
|
487
|
-
deferred0_0 = arg0;
|
|
488
|
-
deferred0_1 = arg1;
|
|
489
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
490
|
-
} finally {
|
|
491
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
module.exports.__wbg_getRandomValues_b3f15fcbfabb0f8b = function() { return handleError(function (arg0, arg1) {
|
|
496
|
-
arg0.getRandomValues(arg1);
|
|
497
|
-
}, arguments) };
|
|
498
|
-
|
|
499
|
-
module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
500
|
-
const ret = Reflect.get(arg0, arg1);
|
|
501
|
-
return ret;
|
|
502
|
-
}, arguments) };
|
|
503
|
-
|
|
504
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
505
|
-
const ret = arg0[arg1 >>> 0];
|
|
506
|
-
return ret;
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
510
|
-
let result;
|
|
511
|
-
try {
|
|
512
|
-
result = arg0 instanceof ArrayBuffer;
|
|
513
|
-
} catch (_) {
|
|
514
|
-
result = false;
|
|
515
|
-
}
|
|
516
|
-
const ret = result;
|
|
517
|
-
return ret;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
module.exports.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
521
|
-
let result;
|
|
522
|
-
try {
|
|
523
|
-
result = arg0 instanceof Map;
|
|
524
|
-
} catch (_) {
|
|
525
|
-
result = false;
|
|
526
|
-
}
|
|
527
|
-
const ret = result;
|
|
528
|
-
return ret;
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
532
|
-
let result;
|
|
533
|
-
try {
|
|
534
|
-
result = arg0 instanceof Uint8Array;
|
|
535
|
-
} catch (_) {
|
|
536
|
-
result = false;
|
|
537
|
-
}
|
|
538
|
-
const ret = result;
|
|
539
|
-
return ret;
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
543
|
-
const ret = Array.isArray(arg0);
|
|
544
|
-
return ret;
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
548
|
-
const ret = Number.isSafeInteger(arg0);
|
|
549
|
-
return ret;
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
553
|
-
const ret = Symbol.iterator;
|
|
554
|
-
return ret;
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
558
|
-
const ret = arg0.length;
|
|
559
|
-
return ret;
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
563
|
-
const ret = arg0.length;
|
|
564
|
-
return ret;
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
module.exports.__wbg_msCrypto_d562bbe83e0d4b91 = function(arg0) {
|
|
568
|
-
const ret = arg0.msCrypto;
|
|
569
|
-
return ret;
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
module.exports.__wbg_new_405e22f390576ce2 = function() {
|
|
573
|
-
const ret = new Object();
|
|
574
|
-
return ret;
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
module.exports.__wbg_new_5e0be73521bc8c17 = function() {
|
|
578
|
-
const ret = new Map();
|
|
579
|
-
return ret;
|
|
580
|
-
};
|
|
581
|
-
|
|
582
|
-
module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
583
|
-
const ret = new Array();
|
|
584
|
-
return ret;
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
588
|
-
const ret = new Error();
|
|
589
|
-
return ret;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
593
|
-
const ret = new Uint8Array(arg0);
|
|
594
|
-
return ret;
|
|
595
|
-
};
|
|
596
|
-
|
|
597
|
-
module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
598
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
599
|
-
return ret;
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
603
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
604
|
-
return ret;
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
608
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
609
|
-
return ret;
|
|
610
|
-
};
|
|
611
|
-
|
|
612
|
-
module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
613
|
-
const ret = arg0.next;
|
|
614
|
-
return ret;
|
|
615
|
-
};
|
|
616
|
-
|
|
617
|
-
module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
618
|
-
const ret = arg0.next();
|
|
619
|
-
return ret;
|
|
620
|
-
}, arguments) };
|
|
621
|
-
|
|
622
|
-
module.exports.__wbg_node_e1f24f89a7336c2e = function(arg0) {
|
|
623
|
-
const ret = arg0.node;
|
|
624
|
-
return ret;
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
module.exports.__wbg_now_807e54c39636c349 = function() {
|
|
628
|
-
const ret = Date.now();
|
|
629
|
-
return ret;
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
module.exports.__wbg_process_3975fd6c72f520aa = function(arg0) {
|
|
633
|
-
const ret = arg0.process;
|
|
634
|
-
return ret;
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
module.exports.__wbg_randomFillSync_f8c153b79f285817 = function() { return handleError(function (arg0, arg1) {
|
|
638
|
-
arg0.randomFillSync(arg1);
|
|
639
|
-
}, arguments) };
|
|
640
|
-
|
|
641
|
-
module.exports.__wbg_require_b74f47fc2d022fd6 = function() { return handleError(function () {
|
|
642
|
-
const ret = module.require;
|
|
643
|
-
return ret;
|
|
644
|
-
}, arguments) };
|
|
645
|
-
|
|
646
|
-
module.exports.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
647
|
-
arg0[arg1 >>> 0] = arg2;
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
651
|
-
arg0[arg1] = arg2;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
655
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
656
|
-
};
|
|
657
|
-
|
|
658
|
-
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
659
|
-
const ret = arg0.set(arg1, arg2);
|
|
660
|
-
return ret;
|
|
661
|
-
};
|
|
662
|
-
|
|
663
|
-
module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
664
|
-
const ret = arg1.stack;
|
|
665
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
666
|
-
const len1 = WASM_VECTOR_LEN;
|
|
667
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
668
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
669
|
-
};
|
|
670
|
-
|
|
671
|
-
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
672
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
673
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
677
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
678
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
682
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
683
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
687
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
688
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
689
|
-
};
|
|
690
|
-
|
|
691
|
-
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
692
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
693
|
-
return ret;
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
697
|
-
const ret = arg0.value;
|
|
698
|
-
return ret;
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
module.exports.__wbg_versions_4e31226f5e8dc909 = function(arg0) {
|
|
702
|
-
const ret = arg0.versions;
|
|
703
|
-
return ret;
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
707
|
-
const ret = arg0;
|
|
708
|
-
return ret;
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
712
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
713
|
-
return ret;
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
717
|
-
const v = arg1;
|
|
718
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
719
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
720
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
724
|
-
const v = arg0;
|
|
725
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
726
|
-
return ret;
|
|
727
|
-
};
|
|
728
|
-
|
|
729
|
-
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
730
|
-
const ret = debugString(arg1);
|
|
731
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
|
-
const len1 = WASM_VECTOR_LEN;
|
|
733
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
734
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
738
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
739
|
-
return ret;
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
743
|
-
const ret = arg0 in arg1;
|
|
744
|
-
return ret;
|
|
745
|
-
};
|
|
746
|
-
|
|
747
|
-
module.exports.__wbindgen_init_externref_table = function() {
|
|
748
|
-
const table = wasm.__wbindgen_export_4;
|
|
749
|
-
const offset = table.grow(4);
|
|
750
|
-
table.set(0, undefined);
|
|
751
|
-
table.set(offset + 0, undefined);
|
|
752
|
-
table.set(offset + 1, null);
|
|
753
|
-
table.set(offset + 2, true);
|
|
754
|
-
table.set(offset + 3, false);
|
|
755
|
-
;
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
759
|
-
const ret = typeof(arg0) === 'bigint';
|
|
760
|
-
return ret;
|
|
761
|
-
};
|
|
762
|
-
|
|
763
|
-
module.exports.__wbindgen_is_function = function(arg0) {
|
|
764
|
-
const ret = typeof(arg0) === 'function';
|
|
765
|
-
return ret;
|
|
766
|
-
};
|
|
767
|
-
|
|
768
|
-
module.exports.__wbindgen_is_null = function(arg0) {
|
|
769
|
-
const ret = arg0 === null;
|
|
770
|
-
return ret;
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
774
|
-
const val = arg0;
|
|
775
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
776
|
-
return ret;
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
|
780
|
-
const ret = typeof(arg0) === 'string';
|
|
781
|
-
return ret;
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
785
|
-
const ret = arg0 === undefined;
|
|
786
|
-
return ret;
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
790
|
-
const ret = arg0 === arg1;
|
|
791
|
-
return ret;
|
|
792
|
-
};
|
|
793
|
-
|
|
794
|
-
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
795
|
-
const ret = arg0 == arg1;
|
|
796
|
-
return ret;
|
|
797
|
-
};
|
|
798
|
-
|
|
799
|
-
module.exports.__wbindgen_memory = function() {
|
|
800
|
-
const ret = wasm.memory;
|
|
801
|
-
return ret;
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
805
|
-
const obj = arg1;
|
|
806
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
807
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
808
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
812
|
-
const ret = arg0;
|
|
813
|
-
return ret;
|
|
814
|
-
};
|
|
815
|
-
|
|
816
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
817
|
-
const obj = arg1;
|
|
818
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
819
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
820
|
-
var len1 = WASM_VECTOR_LEN;
|
|
821
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
822
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
826
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
827
|
-
return ret;
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
831
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
const path = require('path').join(__dirname, 'lora_wasm_bg.wasm');
|
|
835
|
-
const bytes = require('fs').readFileSync(path);
|
|
836
|
-
|
|
837
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
|
838
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
839
|
-
wasm = wasmInstance.exports;
|
|
840
|
-
module.exports.__wasm = wasm;
|
|
841
|
-
|
|
842
|
-
wasm.__wbindgen_start();
|
|
843
|
-
|