@prisma/query-compiler-wasm 7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba → 7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7

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,11 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export interface JsCompileError {
4
- message: string;
5
- code: string | undefined;
6
- meta: Value | undefined;
7
- }
8
-
9
3
  export interface QueryCompilerParams {
10
4
  datamodel: string;
11
5
  provider: AdapterProvider;
@@ -14,10 +8,16 @@ export interface QueryCompilerParams {
14
8
 
15
9
  export type BatchResponse = { type: "multi"; plans: Expression[] } | { type: "compacted"; plan: Expression; arguments: Record<string, ArgumentValue>[]; nestedSelection: string[]; keys: string[]; expectNonEmpty: boolean };
16
10
 
11
+ export interface JsCompileError {
12
+ message: string;
13
+ code: string | undefined;
14
+ meta: Value | undefined;
15
+ }
16
+
17
17
  export class QueryCompiler {
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- compileBatch(request: string): any;
21
20
  constructor(params: QueryCompilerParams);
22
21
  compile(request: string): any;
22
+ compileBatch(request: string): any;
23
23
  }
@@ -166,6 +166,21 @@ function debugString(val) {
166
166
  return className;
167
167
  }
168
168
 
169
+ function addToExternrefTable0(obj) {
170
+ const idx = wasm.__externref_table_alloc();
171
+ wasm.__wbindgen_externrefs.set(idx, obj);
172
+ return idx;
173
+ }
174
+
175
+ function handleError(f, args) {
176
+ try {
177
+ return f.apply(this, args);
178
+ } catch (e) {
179
+ const idx = addToExternrefTable0(e);
180
+ wasm.__wbindgen_exn_store(idx);
181
+ }
182
+ }
183
+
169
184
  function getArrayU8FromWasm0(ptr, len) {
170
185
  ptr = ptr >>> 0;
171
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -194,19 +209,6 @@ export class QueryCompiler {
194
209
  const ptr = this.__destroy_into_raw();
195
210
  wasm.__wbg_querycompiler_free(ptr, 0);
196
211
  }
197
- /**
198
- * @param {string} request
199
- * @returns {any}
200
- */
201
- compileBatch(request) {
202
- const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
205
- if (ret[2]) {
206
- throw takeFromExternrefTable0(ret[1]);
207
- }
208
- return takeFromExternrefTable0(ret[0]);
209
- }
210
212
  /**
211
213
  * @param {QueryCompilerParams} params
212
214
  */
@@ -232,6 +234,19 @@ export class QueryCompiler {
232
234
  }
233
235
  return takeFromExternrefTable0(ret[0]);
234
236
  }
237
+ /**
238
+ * @param {string} request
239
+ * @returns {any}
240
+ */
241
+ compileBatch(request) {
242
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
235
250
  }
236
251
  if (Symbol.dispose) QueryCompiler.prototype[Symbol.dispose] = QueryCompiler.prototype.free;
237
252
 
@@ -272,6 +287,11 @@ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
272
287
  return ret;
273
288
  };
274
289
 
290
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
291
+ const ret = typeof(arg0) === 'function';
292
+ return ret;
293
+ };
294
+
275
295
  export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
276
296
  const val = arg0;
277
297
  const ret = typeof(val) === 'object' && val !== null;
@@ -313,11 +333,30 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
313
333
  throw new Error(getStringFromWasm0(arg0, arg1));
314
334
  };
315
335
 
336
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
337
+ const ret = arg0.call(arg1, arg2);
338
+ return ret;
339
+ }, arguments) };
340
+
341
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
342
+ const ret = arg0.call(arg1);
343
+ return ret;
344
+ }, arguments) };
345
+
346
+ export function __wbg_crypto_805be4ce92f1e370(arg0) {
347
+ const ret = arg0.crypto;
348
+ return ret;
349
+ };
350
+
316
351
  export function __wbg_entries_e171b586f8f6bdbf(arg0) {
317
352
  const ret = Object.entries(arg0);
318
353
  return ret;
319
354
  };
320
355
 
356
+ export function __wbg_getRandomValues_f6a868620c8bab49() { return handleError(function (arg0, arg1) {
357
+ arg0.getRandomValues(arg1);
358
+ }, arguments) };
359
+
321
360
  export function __wbg_getTime_14776bfb48a1bff9(arg0) {
322
361
  const ret = arg0.getTime();
323
362
  return ret;
@@ -360,6 +399,11 @@ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
360
399
  return ret;
361
400
  };
362
401
 
402
+ export function __wbg_keys_b4d27b02ad14f4be(arg0) {
403
+ const ret = Object.keys(arg0);
404
+ return ret;
405
+ };
406
+
363
407
  export function __wbg_length_69bca3cb64fc8748(arg0) {
364
408
  const ret = arg0.length;
365
409
  return ret;
@@ -370,6 +414,11 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
370
414
  return ret;
371
415
  };
372
416
 
417
+ export function __wbg_msCrypto_2ac4d17c4748234a(arg0) {
418
+ const ret = arg0.msCrypto;
419
+ return ret;
420
+ };
421
+
373
422
  export function __wbg_new_0_f9740686d739025c() {
374
423
  const ret = new Date();
375
424
  return ret;
@@ -395,10 +444,49 @@ export function __wbg_new_e17d9f43105b08be() {
395
444
  return ret;
396
445
  };
397
446
 
447
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
448
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
449
+ return ret;
450
+ };
451
+
452
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
453
+ const ret = new Uint8Array(arg0 >>> 0);
454
+ return ret;
455
+ };
456
+
457
+ export function __wbg_node_ecc8306b9857f33d(arg0) {
458
+ const ret = arg0.node;
459
+ return ret;
460
+ };
461
+
462
+ export function __wbg_now_793306c526e2e3b6() {
463
+ const ret = Date.now();
464
+ return ret;
465
+ };
466
+
467
+ export function __wbg_now_b3f7572f6ef3d3a9() { return handleError(function () {
468
+ const ret = Date.now();
469
+ return ret;
470
+ }, arguments) };
471
+
472
+ export function __wbg_process_5cff2739921be718(arg0) {
473
+ const ret = arg0.process;
474
+ return ret;
475
+ };
476
+
398
477
  export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
399
478
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
400
479
  };
401
480
 
481
+ export function __wbg_randomFillSync_d3c85af7e31cf1f8() { return handleError(function (arg0, arg1) {
482
+ arg0.randomFillSync(arg1);
483
+ }, arguments) };
484
+
485
+ export function __wbg_require_0c566c6f2eef6c79() { return handleError(function () {
486
+ const ret = module.require;
487
+ return ret;
488
+ }, arguments) };
489
+
402
490
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
403
491
  arg0[arg1] = arg2;
404
492
  };
@@ -416,6 +504,36 @@ export function __wbg_set_message_82ae475bb413aa5c(arg0, arg1) {
416
504
  global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
417
505
  };
418
506
 
507
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
508
+ const ret = typeof global === 'undefined' ? null : global;
509
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
510
+ };
511
+
512
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
513
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
515
+ };
516
+
517
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
518
+ const ret = typeof self === 'undefined' ? null : self;
519
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
520
+ };
521
+
522
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
523
+ const ret = typeof window === 'undefined' ? null : window;
524
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
525
+ };
526
+
527
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
528
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
529
+ return ret;
530
+ };
531
+
532
+ export function __wbg_versions_a8e5a362e1f16442(arg0) {
533
+ const ret = arg0.versions;
534
+ return ret;
535
+ };
536
+
419
537
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
420
538
  // Cast intrinsic for `Ref(String) -> Externref`.
421
539
  const ret = getStringFromWasm0(arg0, arg1);
@@ -434,6 +552,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
434
552
  return ret;
435
553
  };
436
554
 
555
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
558
+ return ret;
559
+ };
560
+
437
561
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
438
562
  // Cast intrinsic for `F64 -> Externref`.
439
563
  const ret = arg0;
Binary file
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_querycompiler_free: (a: number, b: number) => void;
5
+ export const querycompiler_new: (a: any) => [number, number, number];
5
6
  export const querycompiler_compile: (a: number, b: number, c: number) => [number, number, number];
6
7
  export const querycompiler_compileBatch: (a: number, b: number, c: number) => [number, number, number];
7
- export const querycompiler_new: (a: any) => [number, number, number];
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
10
12
  export const __wbindgen_externrefs: WebAssembly.Table;
11
13
  export const __externref_table_dealloc: (a: number) => void;
12
14
  export const __wbindgen_start: () => void;
@@ -1,11 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export interface JsCompileError {
4
- message: string;
5
- code: string | undefined;
6
- meta: Value | undefined;
7
- }
8
-
9
3
  export interface QueryCompilerParams {
10
4
  datamodel: string;
11
5
  provider: AdapterProvider;
@@ -14,10 +8,16 @@ export interface QueryCompilerParams {
14
8
 
15
9
  export type BatchResponse = { type: "multi"; plans: Expression[] } | { type: "compacted"; plan: Expression; arguments: Record<string, ArgumentValue>[]; nestedSelection: string[]; keys: string[]; expectNonEmpty: boolean };
16
10
 
11
+ export interface JsCompileError {
12
+ message: string;
13
+ code: string | undefined;
14
+ meta: Value | undefined;
15
+ }
16
+
17
17
  export class QueryCompiler {
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- compileBatch(request: string): any;
21
20
  constructor(params: QueryCompilerParams);
22
21
  compile(request: string): any;
22
+ compileBatch(request: string): any;
23
23
  }
@@ -166,6 +166,21 @@ function debugString(val) {
166
166
  return className;
167
167
  }
168
168
 
169
+ function addToExternrefTable0(obj) {
170
+ const idx = wasm.__externref_table_alloc();
171
+ wasm.__wbindgen_externrefs.set(idx, obj);
172
+ return idx;
173
+ }
174
+
175
+ function handleError(f, args) {
176
+ try {
177
+ return f.apply(this, args);
178
+ } catch (e) {
179
+ const idx = addToExternrefTable0(e);
180
+ wasm.__wbindgen_exn_store(idx);
181
+ }
182
+ }
183
+
169
184
  function getArrayU8FromWasm0(ptr, len) {
170
185
  ptr = ptr >>> 0;
171
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -194,19 +209,6 @@ export class QueryCompiler {
194
209
  const ptr = this.__destroy_into_raw();
195
210
  wasm.__wbg_querycompiler_free(ptr, 0);
196
211
  }
197
- /**
198
- * @param {string} request
199
- * @returns {any}
200
- */
201
- compileBatch(request) {
202
- const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
205
- if (ret[2]) {
206
- throw takeFromExternrefTable0(ret[1]);
207
- }
208
- return takeFromExternrefTable0(ret[0]);
209
- }
210
212
  /**
211
213
  * @param {QueryCompilerParams} params
212
214
  */
@@ -232,6 +234,19 @@ export class QueryCompiler {
232
234
  }
233
235
  return takeFromExternrefTable0(ret[0]);
234
236
  }
237
+ /**
238
+ * @param {string} request
239
+ * @returns {any}
240
+ */
241
+ compileBatch(request) {
242
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
235
250
  }
236
251
  if (Symbol.dispose) QueryCompiler.prototype[Symbol.dispose] = QueryCompiler.prototype.free;
237
252
 
@@ -272,6 +287,11 @@ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
272
287
  return ret;
273
288
  };
274
289
 
290
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
291
+ const ret = typeof(arg0) === 'function';
292
+ return ret;
293
+ };
294
+
275
295
  export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
276
296
  const val = arg0;
277
297
  const ret = typeof(val) === 'object' && val !== null;
@@ -313,11 +333,30 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
313
333
  throw new Error(getStringFromWasm0(arg0, arg1));
314
334
  };
315
335
 
336
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
337
+ const ret = arg0.call(arg1, arg2);
338
+ return ret;
339
+ }, arguments) };
340
+
341
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
342
+ const ret = arg0.call(arg1);
343
+ return ret;
344
+ }, arguments) };
345
+
346
+ export function __wbg_crypto_805be4ce92f1e370(arg0) {
347
+ const ret = arg0.crypto;
348
+ return ret;
349
+ };
350
+
316
351
  export function __wbg_entries_e171b586f8f6bdbf(arg0) {
317
352
  const ret = Object.entries(arg0);
318
353
  return ret;
319
354
  };
320
355
 
356
+ export function __wbg_getRandomValues_f6a868620c8bab49() { return handleError(function (arg0, arg1) {
357
+ arg0.getRandomValues(arg1);
358
+ }, arguments) };
359
+
321
360
  export function __wbg_getTime_14776bfb48a1bff9(arg0) {
322
361
  const ret = arg0.getTime();
323
362
  return ret;
@@ -360,6 +399,11 @@ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
360
399
  return ret;
361
400
  };
362
401
 
402
+ export function __wbg_keys_b4d27b02ad14f4be(arg0) {
403
+ const ret = Object.keys(arg0);
404
+ return ret;
405
+ };
406
+
363
407
  export function __wbg_length_69bca3cb64fc8748(arg0) {
364
408
  const ret = arg0.length;
365
409
  return ret;
@@ -370,6 +414,11 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
370
414
  return ret;
371
415
  };
372
416
 
417
+ export function __wbg_msCrypto_2ac4d17c4748234a(arg0) {
418
+ const ret = arg0.msCrypto;
419
+ return ret;
420
+ };
421
+
373
422
  export function __wbg_new_0_f9740686d739025c() {
374
423
  const ret = new Date();
375
424
  return ret;
@@ -395,10 +444,49 @@ export function __wbg_new_e17d9f43105b08be() {
395
444
  return ret;
396
445
  };
397
446
 
447
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
448
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
449
+ return ret;
450
+ };
451
+
452
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
453
+ const ret = new Uint8Array(arg0 >>> 0);
454
+ return ret;
455
+ };
456
+
457
+ export function __wbg_node_ecc8306b9857f33d(arg0) {
458
+ const ret = arg0.node;
459
+ return ret;
460
+ };
461
+
462
+ export function __wbg_now_793306c526e2e3b6() {
463
+ const ret = Date.now();
464
+ return ret;
465
+ };
466
+
467
+ export function __wbg_now_b3f7572f6ef3d3a9() { return handleError(function () {
468
+ const ret = Date.now();
469
+ return ret;
470
+ }, arguments) };
471
+
472
+ export function __wbg_process_5cff2739921be718(arg0) {
473
+ const ret = arg0.process;
474
+ return ret;
475
+ };
476
+
398
477
  export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
399
478
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
400
479
  };
401
480
 
481
+ export function __wbg_randomFillSync_d3c85af7e31cf1f8() { return handleError(function (arg0, arg1) {
482
+ arg0.randomFillSync(arg1);
483
+ }, arguments) };
484
+
485
+ export function __wbg_require_0c566c6f2eef6c79() { return handleError(function () {
486
+ const ret = module.require;
487
+ return ret;
488
+ }, arguments) };
489
+
402
490
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
403
491
  arg0[arg1] = arg2;
404
492
  };
@@ -416,6 +504,36 @@ export function __wbg_set_message_82ae475bb413aa5c(arg0, arg1) {
416
504
  global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
417
505
  };
418
506
 
507
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
508
+ const ret = typeof global === 'undefined' ? null : global;
509
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
510
+ };
511
+
512
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
513
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
515
+ };
516
+
517
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
518
+ const ret = typeof self === 'undefined' ? null : self;
519
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
520
+ };
521
+
522
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
523
+ const ret = typeof window === 'undefined' ? null : window;
524
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
525
+ };
526
+
527
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
528
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
529
+ return ret;
530
+ };
531
+
532
+ export function __wbg_versions_a8e5a362e1f16442(arg0) {
533
+ const ret = arg0.versions;
534
+ return ret;
535
+ };
536
+
419
537
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
420
538
  // Cast intrinsic for `Ref(String) -> Externref`.
421
539
  const ret = getStringFromWasm0(arg0, arg1);
@@ -434,6 +552,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
434
552
  return ret;
435
553
  };
436
554
 
555
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
558
+ return ret;
559
+ };
560
+
437
561
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
438
562
  // Cast intrinsic for `F64 -> Externref`.
439
563
  const ret = arg0;
Binary file
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_querycompiler_free: (a: number, b: number) => void;
5
+ export const querycompiler_new: (a: any) => [number, number, number];
5
6
  export const querycompiler_compile: (a: number, b: number, c: number) => [number, number, number];
6
7
  export const querycompiler_compileBatch: (a: number, b: number, c: number) => [number, number, number];
7
- export const querycompiler_new: (a: any) => [number, number, number];
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
10
12
  export const __wbindgen_externrefs: WebAssembly.Table;
11
13
  export const __externref_table_dealloc: (a: number) => void;
12
14
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/query-compiler-wasm",
3
- "version": "7.1.0-6.ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba",
3
+ "version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export interface JsCompileError {
4
- message: string;
5
- code: string | undefined;
6
- meta: Value | undefined;
7
- }
8
-
9
3
  export interface QueryCompilerParams {
10
4
  datamodel: string;
11
5
  provider: AdapterProvider;
@@ -14,10 +8,16 @@ export interface QueryCompilerParams {
14
8
 
15
9
  export type BatchResponse = { type: "multi"; plans: Expression[] } | { type: "compacted"; plan: Expression; arguments: Record<string, ArgumentValue>[]; nestedSelection: string[]; keys: string[]; expectNonEmpty: boolean };
16
10
 
11
+ export interface JsCompileError {
12
+ message: string;
13
+ code: string | undefined;
14
+ meta: Value | undefined;
15
+ }
16
+
17
17
  export class QueryCompiler {
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- compileBatch(request: string): any;
21
20
  constructor(params: QueryCompilerParams);
22
21
  compile(request: string): any;
22
+ compileBatch(request: string): any;
23
23
  }
@@ -166,6 +166,21 @@ function debugString(val) {
166
166
  return className;
167
167
  }
168
168
 
169
+ function addToExternrefTable0(obj) {
170
+ const idx = wasm.__externref_table_alloc();
171
+ wasm.__wbindgen_externrefs.set(idx, obj);
172
+ return idx;
173
+ }
174
+
175
+ function handleError(f, args) {
176
+ try {
177
+ return f.apply(this, args);
178
+ } catch (e) {
179
+ const idx = addToExternrefTable0(e);
180
+ wasm.__wbindgen_exn_store(idx);
181
+ }
182
+ }
183
+
169
184
  function getArrayU8FromWasm0(ptr, len) {
170
185
  ptr = ptr >>> 0;
171
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -194,19 +209,6 @@ export class QueryCompiler {
194
209
  const ptr = this.__destroy_into_raw();
195
210
  wasm.__wbg_querycompiler_free(ptr, 0);
196
211
  }
197
- /**
198
- * @param {string} request
199
- * @returns {any}
200
- */
201
- compileBatch(request) {
202
- const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
205
- if (ret[2]) {
206
- throw takeFromExternrefTable0(ret[1]);
207
- }
208
- return takeFromExternrefTable0(ret[0]);
209
- }
210
212
  /**
211
213
  * @param {QueryCompilerParams} params
212
214
  */
@@ -232,6 +234,19 @@ export class QueryCompiler {
232
234
  }
233
235
  return takeFromExternrefTable0(ret[0]);
234
236
  }
237
+ /**
238
+ * @param {string} request
239
+ * @returns {any}
240
+ */
241
+ compileBatch(request) {
242
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
235
250
  }
236
251
  if (Symbol.dispose) QueryCompiler.prototype[Symbol.dispose] = QueryCompiler.prototype.free;
237
252
 
@@ -272,6 +287,11 @@ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
272
287
  return ret;
273
288
  };
274
289
 
290
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
291
+ const ret = typeof(arg0) === 'function';
292
+ return ret;
293
+ };
294
+
275
295
  export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
276
296
  const val = arg0;
277
297
  const ret = typeof(val) === 'object' && val !== null;
@@ -313,11 +333,30 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
313
333
  throw new Error(getStringFromWasm0(arg0, arg1));
314
334
  };
315
335
 
336
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
337
+ const ret = arg0.call(arg1, arg2);
338
+ return ret;
339
+ }, arguments) };
340
+
341
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
342
+ const ret = arg0.call(arg1);
343
+ return ret;
344
+ }, arguments) };
345
+
346
+ export function __wbg_crypto_805be4ce92f1e370(arg0) {
347
+ const ret = arg0.crypto;
348
+ return ret;
349
+ };
350
+
316
351
  export function __wbg_entries_e171b586f8f6bdbf(arg0) {
317
352
  const ret = Object.entries(arg0);
318
353
  return ret;
319
354
  };
320
355
 
356
+ export function __wbg_getRandomValues_f6a868620c8bab49() { return handleError(function (arg0, arg1) {
357
+ arg0.getRandomValues(arg1);
358
+ }, arguments) };
359
+
321
360
  export function __wbg_getTime_14776bfb48a1bff9(arg0) {
322
361
  const ret = arg0.getTime();
323
362
  return ret;
@@ -360,6 +399,11 @@ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
360
399
  return ret;
361
400
  };
362
401
 
402
+ export function __wbg_keys_b4d27b02ad14f4be(arg0) {
403
+ const ret = Object.keys(arg0);
404
+ return ret;
405
+ };
406
+
363
407
  export function __wbg_length_69bca3cb64fc8748(arg0) {
364
408
  const ret = arg0.length;
365
409
  return ret;
@@ -370,6 +414,11 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
370
414
  return ret;
371
415
  };
372
416
 
417
+ export function __wbg_msCrypto_2ac4d17c4748234a(arg0) {
418
+ const ret = arg0.msCrypto;
419
+ return ret;
420
+ };
421
+
373
422
  export function __wbg_new_0_f9740686d739025c() {
374
423
  const ret = new Date();
375
424
  return ret;
@@ -395,10 +444,49 @@ export function __wbg_new_e17d9f43105b08be() {
395
444
  return ret;
396
445
  };
397
446
 
447
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
448
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
449
+ return ret;
450
+ };
451
+
452
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
453
+ const ret = new Uint8Array(arg0 >>> 0);
454
+ return ret;
455
+ };
456
+
457
+ export function __wbg_node_ecc8306b9857f33d(arg0) {
458
+ const ret = arg0.node;
459
+ return ret;
460
+ };
461
+
462
+ export function __wbg_now_793306c526e2e3b6() {
463
+ const ret = Date.now();
464
+ return ret;
465
+ };
466
+
467
+ export function __wbg_now_b3f7572f6ef3d3a9() { return handleError(function () {
468
+ const ret = Date.now();
469
+ return ret;
470
+ }, arguments) };
471
+
472
+ export function __wbg_process_5cff2739921be718(arg0) {
473
+ const ret = arg0.process;
474
+ return ret;
475
+ };
476
+
398
477
  export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
399
478
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
400
479
  };
401
480
 
481
+ export function __wbg_randomFillSync_d3c85af7e31cf1f8() { return handleError(function (arg0, arg1) {
482
+ arg0.randomFillSync(arg1);
483
+ }, arguments) };
484
+
485
+ export function __wbg_require_0c566c6f2eef6c79() { return handleError(function () {
486
+ const ret = module.require;
487
+ return ret;
488
+ }, arguments) };
489
+
402
490
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
403
491
  arg0[arg1] = arg2;
404
492
  };
@@ -416,6 +504,36 @@ export function __wbg_set_message_82ae475bb413aa5c(arg0, arg1) {
416
504
  global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
417
505
  };
418
506
 
507
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
508
+ const ret = typeof global === 'undefined' ? null : global;
509
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
510
+ };
511
+
512
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
513
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
515
+ };
516
+
517
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
518
+ const ret = typeof self === 'undefined' ? null : self;
519
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
520
+ };
521
+
522
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
523
+ const ret = typeof window === 'undefined' ? null : window;
524
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
525
+ };
526
+
527
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
528
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
529
+ return ret;
530
+ };
531
+
532
+ export function __wbg_versions_a8e5a362e1f16442(arg0) {
533
+ const ret = arg0.versions;
534
+ return ret;
535
+ };
536
+
419
537
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
420
538
  // Cast intrinsic for `Ref(String) -> Externref`.
421
539
  const ret = getStringFromWasm0(arg0, arg1);
@@ -434,6 +552,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
434
552
  return ret;
435
553
  };
436
554
 
555
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
558
+ return ret;
559
+ };
560
+
437
561
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
438
562
  // Cast intrinsic for `F64 -> Externref`.
439
563
  const ret = arg0;
Binary file
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_querycompiler_free: (a: number, b: number) => void;
5
+ export const querycompiler_new: (a: any) => [number, number, number];
5
6
  export const querycompiler_compile: (a: number, b: number, c: number) => [number, number, number];
6
7
  export const querycompiler_compileBatch: (a: number, b: number, c: number) => [number, number, number];
7
- export const querycompiler_new: (a: any) => [number, number, number];
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
10
12
  export const __wbindgen_externrefs: WebAssembly.Table;
11
13
  export const __externref_table_dealloc: (a: number) => void;
12
14
  export const __wbindgen_start: () => void;
@@ -17,7 +17,7 @@ export interface JsCompileError {
17
17
  export class QueryCompiler {
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- compileBatch(request: string): any;
21
20
  constructor(params: QueryCompilerParams);
22
21
  compile(request: string): any;
22
+ compileBatch(request: string): any;
23
23
  }
@@ -166,6 +166,21 @@ function debugString(val) {
166
166
  return className;
167
167
  }
168
168
 
169
+ function addToExternrefTable0(obj) {
170
+ const idx = wasm.__externref_table_alloc();
171
+ wasm.__wbindgen_externrefs.set(idx, obj);
172
+ return idx;
173
+ }
174
+
175
+ function handleError(f, args) {
176
+ try {
177
+ return f.apply(this, args);
178
+ } catch (e) {
179
+ const idx = addToExternrefTable0(e);
180
+ wasm.__wbindgen_exn_store(idx);
181
+ }
182
+ }
183
+
169
184
  function getArrayU8FromWasm0(ptr, len) {
170
185
  ptr = ptr >>> 0;
171
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -194,19 +209,6 @@ export class QueryCompiler {
194
209
  const ptr = this.__destroy_into_raw();
195
210
  wasm.__wbg_querycompiler_free(ptr, 0);
196
211
  }
197
- /**
198
- * @param {string} request
199
- * @returns {any}
200
- */
201
- compileBatch(request) {
202
- const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
205
- if (ret[2]) {
206
- throw takeFromExternrefTable0(ret[1]);
207
- }
208
- return takeFromExternrefTable0(ret[0]);
209
- }
210
212
  /**
211
213
  * @param {QueryCompilerParams} params
212
214
  */
@@ -232,6 +234,19 @@ export class QueryCompiler {
232
234
  }
233
235
  return takeFromExternrefTable0(ret[0]);
234
236
  }
237
+ /**
238
+ * @param {string} request
239
+ * @returns {any}
240
+ */
241
+ compileBatch(request) {
242
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
235
250
  }
236
251
  if (Symbol.dispose) QueryCompiler.prototype[Symbol.dispose] = QueryCompiler.prototype.free;
237
252
 
@@ -272,6 +287,11 @@ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
272
287
  return ret;
273
288
  };
274
289
 
290
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
291
+ const ret = typeof(arg0) === 'function';
292
+ return ret;
293
+ };
294
+
275
295
  export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
276
296
  const val = arg0;
277
297
  const ret = typeof(val) === 'object' && val !== null;
@@ -313,11 +333,30 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
313
333
  throw new Error(getStringFromWasm0(arg0, arg1));
314
334
  };
315
335
 
336
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
337
+ const ret = arg0.call(arg1, arg2);
338
+ return ret;
339
+ }, arguments) };
340
+
341
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
342
+ const ret = arg0.call(arg1);
343
+ return ret;
344
+ }, arguments) };
345
+
346
+ export function __wbg_crypto_805be4ce92f1e370(arg0) {
347
+ const ret = arg0.crypto;
348
+ return ret;
349
+ };
350
+
316
351
  export function __wbg_entries_e171b586f8f6bdbf(arg0) {
317
352
  const ret = Object.entries(arg0);
318
353
  return ret;
319
354
  };
320
355
 
356
+ export function __wbg_getRandomValues_f6a868620c8bab49() { return handleError(function (arg0, arg1) {
357
+ arg0.getRandomValues(arg1);
358
+ }, arguments) };
359
+
321
360
  export function __wbg_getTime_14776bfb48a1bff9(arg0) {
322
361
  const ret = arg0.getTime();
323
362
  return ret;
@@ -360,6 +399,11 @@ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
360
399
  return ret;
361
400
  };
362
401
 
402
+ export function __wbg_keys_b4d27b02ad14f4be(arg0) {
403
+ const ret = Object.keys(arg0);
404
+ return ret;
405
+ };
406
+
363
407
  export function __wbg_length_69bca3cb64fc8748(arg0) {
364
408
  const ret = arg0.length;
365
409
  return ret;
@@ -370,6 +414,11 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
370
414
  return ret;
371
415
  };
372
416
 
417
+ export function __wbg_msCrypto_2ac4d17c4748234a(arg0) {
418
+ const ret = arg0.msCrypto;
419
+ return ret;
420
+ };
421
+
373
422
  export function __wbg_new_0_f9740686d739025c() {
374
423
  const ret = new Date();
375
424
  return ret;
@@ -395,10 +444,49 @@ export function __wbg_new_e17d9f43105b08be() {
395
444
  return ret;
396
445
  };
397
446
 
447
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
448
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
449
+ return ret;
450
+ };
451
+
452
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
453
+ const ret = new Uint8Array(arg0 >>> 0);
454
+ return ret;
455
+ };
456
+
457
+ export function __wbg_node_ecc8306b9857f33d(arg0) {
458
+ const ret = arg0.node;
459
+ return ret;
460
+ };
461
+
462
+ export function __wbg_now_793306c526e2e3b6() {
463
+ const ret = Date.now();
464
+ return ret;
465
+ };
466
+
467
+ export function __wbg_now_b3f7572f6ef3d3a9() { return handleError(function () {
468
+ const ret = Date.now();
469
+ return ret;
470
+ }, arguments) };
471
+
472
+ export function __wbg_process_5cff2739921be718(arg0) {
473
+ const ret = arg0.process;
474
+ return ret;
475
+ };
476
+
398
477
  export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
399
478
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
400
479
  };
401
480
 
481
+ export function __wbg_randomFillSync_d3c85af7e31cf1f8() { return handleError(function (arg0, arg1) {
482
+ arg0.randomFillSync(arg1);
483
+ }, arguments) };
484
+
485
+ export function __wbg_require_0c566c6f2eef6c79() { return handleError(function () {
486
+ const ret = module.require;
487
+ return ret;
488
+ }, arguments) };
489
+
402
490
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
403
491
  arg0[arg1] = arg2;
404
492
  };
@@ -416,6 +504,36 @@ export function __wbg_set_message_82ae475bb413aa5c(arg0, arg1) {
416
504
  global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
417
505
  };
418
506
 
507
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
508
+ const ret = typeof global === 'undefined' ? null : global;
509
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
510
+ };
511
+
512
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
513
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
515
+ };
516
+
517
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
518
+ const ret = typeof self === 'undefined' ? null : self;
519
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
520
+ };
521
+
522
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
523
+ const ret = typeof window === 'undefined' ? null : window;
524
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
525
+ };
526
+
527
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
528
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
529
+ return ret;
530
+ };
531
+
532
+ export function __wbg_versions_a8e5a362e1f16442(arg0) {
533
+ const ret = arg0.versions;
534
+ return ret;
535
+ };
536
+
419
537
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
420
538
  // Cast intrinsic for `Ref(String) -> Externref`.
421
539
  const ret = getStringFromWasm0(arg0, arg1);
@@ -434,6 +552,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
434
552
  return ret;
435
553
  };
436
554
 
555
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
558
+ return ret;
559
+ };
560
+
437
561
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
438
562
  // Cast intrinsic for `F64 -> Externref`.
439
563
  const ret = arg0;
Binary file
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_querycompiler_free: (a: number, b: number) => void;
5
+ export const querycompiler_new: (a: any) => [number, number, number];
5
6
  export const querycompiler_compile: (a: number, b: number, c: number) => [number, number, number];
6
7
  export const querycompiler_compileBatch: (a: number, b: number, c: number) => [number, number, number];
7
- export const querycompiler_new: (a: any) => [number, number, number];
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
10
12
  export const __wbindgen_externrefs: WebAssembly.Table;
11
13
  export const __externref_table_dealloc: (a: number) => void;
12
14
  export const __wbindgen_start: () => void;
@@ -1,11 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export interface JsCompileError {
4
- message: string;
5
- code: string | undefined;
6
- meta: Value | undefined;
7
- }
8
-
9
3
  export interface QueryCompilerParams {
10
4
  datamodel: string;
11
5
  provider: AdapterProvider;
@@ -14,10 +8,16 @@ export interface QueryCompilerParams {
14
8
 
15
9
  export type BatchResponse = { type: "multi"; plans: Expression[] } | { type: "compacted"; plan: Expression; arguments: Record<string, ArgumentValue>[]; nestedSelection: string[]; keys: string[]; expectNonEmpty: boolean };
16
10
 
11
+ export interface JsCompileError {
12
+ message: string;
13
+ code: string | undefined;
14
+ meta: Value | undefined;
15
+ }
16
+
17
17
  export class QueryCompiler {
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- compileBatch(request: string): any;
21
20
  constructor(params: QueryCompilerParams);
22
21
  compile(request: string): any;
22
+ compileBatch(request: string): any;
23
23
  }
@@ -166,6 +166,21 @@ function debugString(val) {
166
166
  return className;
167
167
  }
168
168
 
169
+ function addToExternrefTable0(obj) {
170
+ const idx = wasm.__externref_table_alloc();
171
+ wasm.__wbindgen_externrefs.set(idx, obj);
172
+ return idx;
173
+ }
174
+
175
+ function handleError(f, args) {
176
+ try {
177
+ return f.apply(this, args);
178
+ } catch (e) {
179
+ const idx = addToExternrefTable0(e);
180
+ wasm.__wbindgen_exn_store(idx);
181
+ }
182
+ }
183
+
169
184
  function getArrayU8FromWasm0(ptr, len) {
170
185
  ptr = ptr >>> 0;
171
186
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -194,19 +209,6 @@ export class QueryCompiler {
194
209
  const ptr = this.__destroy_into_raw();
195
210
  wasm.__wbg_querycompiler_free(ptr, 0);
196
211
  }
197
- /**
198
- * @param {string} request
199
- * @returns {any}
200
- */
201
- compileBatch(request) {
202
- const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
203
- const len0 = WASM_VECTOR_LEN;
204
- const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
205
- if (ret[2]) {
206
- throw takeFromExternrefTable0(ret[1]);
207
- }
208
- return takeFromExternrefTable0(ret[0]);
209
- }
210
212
  /**
211
213
  * @param {QueryCompilerParams} params
212
214
  */
@@ -232,6 +234,19 @@ export class QueryCompiler {
232
234
  }
233
235
  return takeFromExternrefTable0(ret[0]);
234
236
  }
237
+ /**
238
+ * @param {string} request
239
+ * @returns {any}
240
+ */
241
+ compileBatch(request) {
242
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len0 = WASM_VECTOR_LEN;
244
+ const ret = wasm.querycompiler_compileBatch(this.__wbg_ptr, ptr0, len0);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ }
235
250
  }
236
251
  if (Symbol.dispose) QueryCompiler.prototype[Symbol.dispose] = QueryCompiler.prototype.free;
237
252
 
@@ -272,6 +287,11 @@ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
272
287
  return ret;
273
288
  };
274
289
 
290
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
291
+ const ret = typeof(arg0) === 'function';
292
+ return ret;
293
+ };
294
+
275
295
  export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
276
296
  const val = arg0;
277
297
  const ret = typeof(val) === 'object' && val !== null;
@@ -313,11 +333,30 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
313
333
  throw new Error(getStringFromWasm0(arg0, arg1));
314
334
  };
315
335
 
336
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
337
+ const ret = arg0.call(arg1, arg2);
338
+ return ret;
339
+ }, arguments) };
340
+
341
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
342
+ const ret = arg0.call(arg1);
343
+ return ret;
344
+ }, arguments) };
345
+
346
+ export function __wbg_crypto_805be4ce92f1e370(arg0) {
347
+ const ret = arg0.crypto;
348
+ return ret;
349
+ };
350
+
316
351
  export function __wbg_entries_e171b586f8f6bdbf(arg0) {
317
352
  const ret = Object.entries(arg0);
318
353
  return ret;
319
354
  };
320
355
 
356
+ export function __wbg_getRandomValues_f6a868620c8bab49() { return handleError(function (arg0, arg1) {
357
+ arg0.getRandomValues(arg1);
358
+ }, arguments) };
359
+
321
360
  export function __wbg_getTime_14776bfb48a1bff9(arg0) {
322
361
  const ret = arg0.getTime();
323
362
  return ret;
@@ -360,6 +399,11 @@ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
360
399
  return ret;
361
400
  };
362
401
 
402
+ export function __wbg_keys_b4d27b02ad14f4be(arg0) {
403
+ const ret = Object.keys(arg0);
404
+ return ret;
405
+ };
406
+
363
407
  export function __wbg_length_69bca3cb64fc8748(arg0) {
364
408
  const ret = arg0.length;
365
409
  return ret;
@@ -370,6 +414,11 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
370
414
  return ret;
371
415
  };
372
416
 
417
+ export function __wbg_msCrypto_2ac4d17c4748234a(arg0) {
418
+ const ret = arg0.msCrypto;
419
+ return ret;
420
+ };
421
+
373
422
  export function __wbg_new_0_f9740686d739025c() {
374
423
  const ret = new Date();
375
424
  return ret;
@@ -395,10 +444,49 @@ export function __wbg_new_e17d9f43105b08be() {
395
444
  return ret;
396
445
  };
397
446
 
447
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
448
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
449
+ return ret;
450
+ };
451
+
452
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
453
+ const ret = new Uint8Array(arg0 >>> 0);
454
+ return ret;
455
+ };
456
+
457
+ export function __wbg_node_ecc8306b9857f33d(arg0) {
458
+ const ret = arg0.node;
459
+ return ret;
460
+ };
461
+
462
+ export function __wbg_now_793306c526e2e3b6() {
463
+ const ret = Date.now();
464
+ return ret;
465
+ };
466
+
467
+ export function __wbg_now_b3f7572f6ef3d3a9() { return handleError(function () {
468
+ const ret = Date.now();
469
+ return ret;
470
+ }, arguments) };
471
+
472
+ export function __wbg_process_5cff2739921be718(arg0) {
473
+ const ret = arg0.process;
474
+ return ret;
475
+ };
476
+
398
477
  export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
399
478
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
400
479
  };
401
480
 
481
+ export function __wbg_randomFillSync_d3c85af7e31cf1f8() { return handleError(function (arg0, arg1) {
482
+ arg0.randomFillSync(arg1);
483
+ }, arguments) };
484
+
485
+ export function __wbg_require_0c566c6f2eef6c79() { return handleError(function () {
486
+ const ret = module.require;
487
+ return ret;
488
+ }, arguments) };
489
+
402
490
  export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
403
491
  arg0[arg1] = arg2;
404
492
  };
@@ -416,6 +504,36 @@ export function __wbg_set_message_82ae475bb413aa5c(arg0, arg1) {
416
504
  global.PRISMA_WASM_PANIC_REGISTRY.set_message(getStringFromWasm0(arg0, arg1));
417
505
  };
418
506
 
507
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
508
+ const ret = typeof global === 'undefined' ? null : global;
509
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
510
+ };
511
+
512
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
513
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
514
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
515
+ };
516
+
517
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
518
+ const ret = typeof self === 'undefined' ? null : self;
519
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
520
+ };
521
+
522
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
523
+ const ret = typeof window === 'undefined' ? null : window;
524
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
525
+ };
526
+
527
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
528
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
529
+ return ret;
530
+ };
531
+
532
+ export function __wbg_versions_a8e5a362e1f16442(arg0) {
533
+ const ret = arg0.versions;
534
+ return ret;
535
+ };
536
+
419
537
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
420
538
  // Cast intrinsic for `Ref(String) -> Externref`.
421
539
  const ret = getStringFromWasm0(arg0, arg1);
@@ -434,6 +552,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
434
552
  return ret;
435
553
  };
436
554
 
555
+ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
558
+ return ret;
559
+ };
560
+
437
561
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
438
562
  // Cast intrinsic for `F64 -> Externref`.
439
563
  const ret = arg0;
Binary file
@@ -2,11 +2,13 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_querycompiler_free: (a: number, b: number) => void;
5
+ export const querycompiler_new: (a: any) => [number, number, number];
5
6
  export const querycompiler_compile: (a: number, b: number, c: number) => [number, number, number];
6
7
  export const querycompiler_compileBatch: (a: number, b: number, c: number) => [number, number, number];
7
- export const querycompiler_new: (a: any) => [number, number, number];
8
8
  export const __wbindgen_malloc: (a: number, b: number) => number;
9
9
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
10
12
  export const __wbindgen_externrefs: WebAssembly.Table;
11
13
  export const __externref_table_dealloc: (a: number) => void;
12
14
  export const __wbindgen_start: () => void;