jsql-neo 5.3.0 → 5.4.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.
@@ -1,373 +0,0 @@
1
- /**
2
- * @param {string} table
3
- * @returns {string}
4
- */
5
- export function jsql_count(table) {
6
- let deferred2_0;
7
- let deferred2_1;
8
- try {
9
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10
- const len0 = WASM_VECTOR_LEN;
11
- const ret = wasm.jsql_count(ptr0, len0);
12
- deferred2_0 = ret[0];
13
- deferred2_1 = ret[1];
14
- return getStringFromWasm0(ret[0], ret[1]);
15
- } finally {
16
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
17
- }
18
- }
19
-
20
- /**
21
- * @param {string} name
22
- * @param {string} schema_json
23
- * @returns {string}
24
- */
25
- export function jsql_create_table(name, schema_json) {
26
- let deferred3_0;
27
- let deferred3_1;
28
- try {
29
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
30
- const len0 = WASM_VECTOR_LEN;
31
- const ptr1 = passStringToWasm0(schema_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
32
- const len1 = WASM_VECTOR_LEN;
33
- const ret = wasm.jsql_create_table(ptr0, len0, ptr1, len1);
34
- deferred3_0 = ret[0];
35
- deferred3_1 = ret[1];
36
- return getStringFromWasm0(ret[0], ret[1]);
37
- } finally {
38
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
39
- }
40
- }
41
-
42
- /**
43
- * @param {string} name
44
- * @returns {string}
45
- */
46
- export function jsql_drop_table(name) {
47
- let deferred2_0;
48
- let deferred2_1;
49
- try {
50
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
51
- const len0 = WASM_VECTOR_LEN;
52
- const ret = wasm.jsql_drop_table(ptr0, len0);
53
- deferred2_0 = ret[0];
54
- deferred2_1 = ret[1];
55
- return getStringFromWasm0(ret[0], ret[1]);
56
- } finally {
57
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
58
- }
59
- }
60
-
61
- /**
62
- * @param {string} table
63
- * @param {string} filter_json
64
- * @param {number} limit
65
- * @param {number} offset
66
- * @returns {string}
67
- */
68
- export function jsql_find(table, filter_json, limit, offset) {
69
- let deferred3_0;
70
- let deferred3_1;
71
- try {
72
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
73
- const len0 = WASM_VECTOR_LEN;
74
- const ptr1 = passStringToWasm0(filter_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
75
- const len1 = WASM_VECTOR_LEN;
76
- const ret = wasm.jsql_find(ptr0, len0, ptr1, len1, limit, offset);
77
- deferred3_0 = ret[0];
78
- deferred3_1 = ret[1];
79
- return getStringFromWasm0(ret[0], ret[1]);
80
- } finally {
81
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
82
- }
83
- }
84
-
85
- /**
86
- * @param {string} table
87
- * @param {bigint} id
88
- * @returns {string}
89
- */
90
- export function jsql_find_by_id(table, id) {
91
- let deferred2_0;
92
- let deferred2_1;
93
- try {
94
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
95
- const len0 = WASM_VECTOR_LEN;
96
- const ret = wasm.jsql_find_by_id(ptr0, len0, id);
97
- deferred2_0 = ret[0];
98
- deferred2_1 = ret[1];
99
- return getStringFromWasm0(ret[0], ret[1]);
100
- } finally {
101
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
102
- }
103
- }
104
-
105
- /**
106
- * @param {string} table
107
- * @param {string} data_json
108
- * @returns {string}
109
- */
110
- export function jsql_insert(table, data_json) {
111
- let deferred3_0;
112
- let deferred3_1;
113
- try {
114
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
115
- const len0 = WASM_VECTOR_LEN;
116
- const ptr1 = passStringToWasm0(data_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
117
- const len1 = WASM_VECTOR_LEN;
118
- const ret = wasm.jsql_insert(ptr0, len0, ptr1, len1);
119
- deferred3_0 = ret[0];
120
- deferred3_1 = ret[1];
121
- return getStringFromWasm0(ret[0], ret[1]);
122
- } finally {
123
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
124
- }
125
- }
126
-
127
- /**
128
- * @param {string} table
129
- * @param {Uint8Array} data
130
- * @returns {string}
131
- */
132
- export function jsql_insert_buf(table, data) {
133
- let deferred3_0;
134
- let deferred3_1;
135
- try {
136
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
137
- const len0 = WASM_VECTOR_LEN;
138
- const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
139
- const len1 = WASM_VECTOR_LEN;
140
- const ret = wasm.jsql_insert_buf(ptr0, len0, ptr1, len1);
141
- deferred3_0 = ret[0];
142
- deferred3_1 = ret[1];
143
- return getStringFromWasm0(ret[0], ret[1]);
144
- } finally {
145
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
146
- }
147
- }
148
-
149
- /**
150
- * @param {string} table
151
- * @param {Uint8Array} data
152
- * @returns {string}
153
- */
154
- export function jsql_insert_buf_count(table, data) {
155
- let deferred3_0;
156
- let deferred3_1;
157
- try {
158
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
159
- const len0 = WASM_VECTOR_LEN;
160
- const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
161
- const len1 = WASM_VECTOR_LEN;
162
- const ret = wasm.jsql_insert_buf_count(ptr0, len0, ptr1, len1);
163
- deferred3_0 = ret[0];
164
- deferred3_1 = ret[1];
165
- return getStringFromWasm0(ret[0], ret[1]);
166
- } finally {
167
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
168
- }
169
- }
170
-
171
- /**
172
- * @param {string} table
173
- * @param {string} json
174
- * @returns {string}
175
- */
176
- export function jsql_insert_json(table, json) {
177
- let deferred3_0;
178
- let deferred3_1;
179
- try {
180
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
181
- const len0 = WASM_VECTOR_LEN;
182
- const ptr1 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
183
- const len1 = WASM_VECTOR_LEN;
184
- const ret = wasm.jsql_insert_json(ptr0, len0, ptr1, len1);
185
- deferred3_0 = ret[0];
186
- deferred3_1 = ret[1];
187
- return getStringFromWasm0(ret[0], ret[1]);
188
- } finally {
189
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
190
- }
191
- }
192
-
193
- /**
194
- * @param {string} table
195
- * @param {bigint} id
196
- * @returns {string}
197
- */
198
- export function jsql_remove_by_id(table, id) {
199
- let deferred2_0;
200
- let deferred2_1;
201
- try {
202
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.jsql_remove_by_id(ptr0, len0, id);
205
- deferred2_0 = ret[0];
206
- deferred2_1 = ret[1];
207
- return getStringFromWasm0(ret[0], ret[1]);
208
- } finally {
209
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
210
- }
211
- }
212
-
213
- /**
214
- * @param {string} table
215
- * @param {bigint} id
216
- * @param {string} data_json
217
- * @returns {string}
218
- */
219
- export function jsql_update_by_id(table, id, data_json) {
220
- let deferred3_0;
221
- let deferred3_1;
222
- try {
223
- const ptr0 = passStringToWasm0(table, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
224
- const len0 = WASM_VECTOR_LEN;
225
- const ptr1 = passStringToWasm0(data_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
226
- const len1 = WASM_VECTOR_LEN;
227
- const ret = wasm.jsql_update_by_id(ptr0, len0, id, ptr1, len1);
228
- deferred3_0 = ret[0];
229
- deferred3_1 = ret[1];
230
- return getStringFromWasm0(ret[0], ret[1]);
231
- } finally {
232
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
233
- }
234
- }
235
- export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
236
- const obj = arg1;
237
- const ret = typeof(obj) === 'string' ? obj : undefined;
238
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
239
- var len1 = WASM_VECTOR_LEN;
240
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
241
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
242
- }
243
- export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
244
- throw new Error(getStringFromWasm0(arg0, arg1));
245
- }
246
- export function __wbg_new_cc984128914cfc6f(arg0) {
247
- const ret = new Date(arg0);
248
- return ret;
249
- }
250
- export function __wbg_now_86c0d4ba3fa605b8() {
251
- const ret = Date.now();
252
- return ret;
253
- }
254
- export function __wbg_toISOString_706fbe321055ee58(arg0) {
255
- const ret = arg0.toISOString();
256
- return ret;
257
- }
258
- export function __wbindgen_cast_0000000000000001(arg0) {
259
- // Cast intrinsic for `F64 -> Externref`.
260
- const ret = arg0;
261
- return ret;
262
- }
263
- export function __wbindgen_init_externref_table() {
264
- const table = wasm.__wbindgen_externrefs;
265
- const offset = table.grow(4);
266
- table.set(0, undefined);
267
- table.set(offset + 0, undefined);
268
- table.set(offset + 1, null);
269
- table.set(offset + 2, true);
270
- table.set(offset + 3, false);
271
- }
272
- let cachedDataViewMemory0 = null;
273
- function getDataViewMemory0() {
274
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
275
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
276
- }
277
- return cachedDataViewMemory0;
278
- }
279
-
280
- function getStringFromWasm0(ptr, len) {
281
- return decodeText(ptr >>> 0, len);
282
- }
283
-
284
- let cachedUint8ArrayMemory0 = null;
285
- function getUint8ArrayMemory0() {
286
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
287
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
288
- }
289
- return cachedUint8ArrayMemory0;
290
- }
291
-
292
- function isLikeNone(x) {
293
- return x === undefined || x === null;
294
- }
295
-
296
- function passArray8ToWasm0(arg, malloc) {
297
- const ptr = malloc(arg.length * 1, 1) >>> 0;
298
- getUint8ArrayMemory0().set(arg, ptr / 1);
299
- WASM_VECTOR_LEN = arg.length;
300
- return ptr;
301
- }
302
-
303
- function passStringToWasm0(arg, malloc, realloc) {
304
- if (realloc === undefined) {
305
- const buf = cachedTextEncoder.encode(arg);
306
- const ptr = malloc(buf.length, 1) >>> 0;
307
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
308
- WASM_VECTOR_LEN = buf.length;
309
- return ptr;
310
- }
311
-
312
- let len = arg.length;
313
- let ptr = malloc(len, 1) >>> 0;
314
-
315
- const mem = getUint8ArrayMemory0();
316
-
317
- let offset = 0;
318
-
319
- for (; offset < len; offset++) {
320
- const code = arg.charCodeAt(offset);
321
- if (code > 0x7F) break;
322
- mem[ptr + offset] = code;
323
- }
324
- if (offset !== len) {
325
- if (offset !== 0) {
326
- arg = arg.slice(offset);
327
- }
328
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
329
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
330
- const ret = cachedTextEncoder.encodeInto(arg, view);
331
-
332
- offset += ret.written;
333
- ptr = realloc(ptr, len, offset, 1) >>> 0;
334
- }
335
-
336
- WASM_VECTOR_LEN = offset;
337
- return ptr;
338
- }
339
-
340
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
341
- cachedTextDecoder.decode();
342
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
343
- let numBytesDecoded = 0;
344
- function decodeText(ptr, len) {
345
- numBytesDecoded += len;
346
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
347
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
348
- cachedTextDecoder.decode();
349
- numBytesDecoded = len;
350
- }
351
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
352
- }
353
-
354
- const cachedTextEncoder = new TextEncoder();
355
-
356
- if (!('encodeInto' in cachedTextEncoder)) {
357
- cachedTextEncoder.encodeInto = function (arg, view) {
358
- const buf = cachedTextEncoder.encode(arg);
359
- view.set(buf);
360
- return {
361
- read: arg.length,
362
- written: buf.length
363
- };
364
- };
365
- }
366
-
367
- let WASM_VECTOR_LEN = 0;
368
-
369
-
370
- let wasm;
371
- export function __wbg_set_wasm(val) {
372
- wasm = val;
373
- }