@perspective-dev/client 5.7.0 → 5.8.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.
@@ -508,6 +508,33 @@ var GenericSQLVirtualServerModel = class {
508
508
  wasm.__wbindgen_add_to_stack_pointer(16);
509
509
  }
510
510
  }
511
+ /**
512
+ * Returns the SQL relation reference for an entity id.
513
+ * @param {string} entity_id
514
+ * @returns {string}
515
+ */
516
+ quoteEntity(entity_id) {
517
+ try {
518
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
519
+ const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
520
+ const len0 = WASM_VECTOR_LEN;
521
+ wasm.genericsqlvirtualservermodel_quoteEntity(retptr, this.__wbg_ptr, ptr0, len0);
522
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
523
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
524
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
525
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
526
+ if (r3) {
527
+ throw takeObject(r2);
528
+ }
529
+ var v2 = getCachedStringFromWasm0(r0, r1);
530
+ if (r0 !== 0) {
531
+ wasm.__wbindgen_export4(r0, r1, 1);
532
+ }
533
+ return v2;
534
+ } finally {
535
+ wasm.__wbindgen_add_to_stack_pointer(16);
536
+ }
537
+ }
511
538
  /**
512
539
  * Returns the SQL query that plans the view `config` would build and
513
540
  * reports its result columns without materializing it (`split_by` folded
@@ -516,14 +543,15 @@ var GenericSQLVirtualServerModel = class {
516
543
  * @param {string} table_id
517
544
  * @param {any} config
518
545
  * @param {any} schema
546
+ * @param {boolean | null} [unordered]
519
547
  * @returns {string}
520
548
  */
521
- tableDescribe(table_id, config, schema) {
549
+ tableDescribe(table_id, config, schema, unordered) {
522
550
  try {
523
551
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
552
  const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
525
553
  const len0 = WASM_VECTOR_LEN;
526
- wasm.genericsqlvirtualservermodel_tableDescribe(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(config), addHeapObject(schema));
554
+ wasm.genericsqlvirtualservermodel_tableDescribe(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(config), addHeapObject(schema), isLikeNone(unordered) ? 16777215 : unordered ? 1 : 0);
527
555
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
528
556
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
529
557
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -547,16 +575,17 @@ var GenericSQLVirtualServerModel = class {
547
575
  * @param {string} view_id
548
576
  * @param {any} config
549
577
  * @param {any} schema
578
+ * @param {boolean | null} [unordered]
550
579
  * @returns {string}
551
580
  */
552
- tableMakeView(table_id, view_id, config, schema) {
581
+ tableMakeView(table_id, view_id, config, schema, unordered) {
553
582
  try {
554
583
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
555
584
  const ptr0 = passStringToWasm0(table_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
556
585
  const len0 = WASM_VECTOR_LEN;
557
586
  const ptr1 = passStringToWasm0(view_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
558
587
  const len1 = WASM_VECTOR_LEN;
559
- wasm.genericsqlvirtualservermodel_tableMakeView(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(config), addHeapObject(schema));
588
+ wasm.genericsqlvirtualservermodel_tableMakeView(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(config), addHeapObject(schema), isLikeNone(unordered) ? 16777215 : unordered ? 1 : 0);
560
589
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
561
590
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
562
591
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -573,6 +602,34 @@ var GenericSQLVirtualServerModel = class {
573
602
  wasm.__wbindgen_add_to_stack_pointer(16);
574
603
  }
575
604
  }
605
+ /**
606
+ * Returns the entity id of the hosted table at relation path `parts`,
607
+ * each part quoted only when it is not a bare identifier.
608
+ * @param {string[]} parts
609
+ * @returns {string}
610
+ */
611
+ tablePath(parts) {
612
+ try {
613
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
614
+ const ptr0 = passArrayJsValueToWasm0(parts, wasm.__wbindgen_export);
615
+ const len0 = WASM_VECTOR_LEN;
616
+ wasm.genericsqlvirtualservermodel_tablePath(retptr, this.__wbg_ptr, ptr0, len0);
617
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
618
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
619
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
620
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
621
+ if (r3) {
622
+ throw takeObject(r2);
623
+ }
624
+ var v2 = getCachedStringFromWasm0(r0, r1);
625
+ if (r0 !== 0) {
626
+ wasm.__wbindgen_export4(r0, r1, 1);
627
+ }
628
+ return v2;
629
+ } finally {
630
+ wasm.__wbindgen_add_to_stack_pointer(16);
631
+ }
632
+ }
576
633
  /**
577
634
  * Returns the SQL query to describe a table's schema.
578
635
  * @param {string} table_id
@@ -2320,7 +2377,7 @@ function __wbg_get_imports() {
2320
2377
  const a = state0.a;
2321
2378
  state0.a = 0;
2322
2379
  try {
2323
- return __wasm_bindgen_func_elem_13265(a, state0.b, arg02, arg12);
2380
+ return __wasm_bindgen_func_elem_13337(a, state0.b, arg02, arg12);
2324
2381
  } finally {
2325
2382
  state0.a = a;
2326
2383
  }
@@ -2399,7 +2456,7 @@ function __wbg_get_imports() {
2399
2456
  const ret = Promise.resolve(getObject(arg0));
2400
2457
  return addHeapObject(ret);
2401
2458
  },
2402
- __wbg_run_2bb852e2dc558431: function() {
2459
+ __wbg_run_9572f64bdbcca74b: function() {
2403
2460
  return handleError(function(arg0, arg1) {
2404
2461
  const ret = getObject(arg0).run(getObject(arg1));
2405
2462
  return addHeapObject(ret);
@@ -2496,15 +2553,15 @@ function __wbg_get_imports() {
2496
2553
  console.warn(getObject(arg0));
2497
2554
  },
2498
2555
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2499
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1714, __wasm_bindgen_func_elem_2081);
2556
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1738, __wasm_bindgen_func_elem_2108);
2500
2557
  return addHeapObject(ret);
2501
2558
  },
2502
2559
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2503
- const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1714, __wasm_bindgen_func_elem_2082);
2560
+ const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1738, __wasm_bindgen_func_elem_2109);
2504
2561
  return addHeapObject(ret);
2505
2562
  },
2506
2563
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2507
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4747, __wasm_bindgen_func_elem_4749);
2564
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4802, __wasm_bindgen_func_elem_4804);
2508
2565
  return addHeapObject(ret);
2509
2566
  },
2510
2567
  __wbindgen_cast_0000000000000004: function(arg0) {
@@ -2569,18 +2626,18 @@ function __wbg_get_imports() {
2569
2626
  "./perspective-js.wasm_bg.js": import0
2570
2627
  };
2571
2628
  }
2572
- function __wasm_bindgen_func_elem_2082(arg0, arg1) {
2573
- wasm.__wasm_bindgen_func_elem_2082(arg0, arg1);
2629
+ function __wasm_bindgen_func_elem_2109(arg0, arg1) {
2630
+ wasm.__wasm_bindgen_func_elem_2109(arg0, arg1);
2574
2631
  }
2575
- function __wasm_bindgen_func_elem_2081(arg0, arg1) {
2576
- const ret = wasm.__wasm_bindgen_func_elem_2081(arg0, arg1);
2632
+ function __wasm_bindgen_func_elem_2108(arg0, arg1) {
2633
+ const ret = wasm.__wasm_bindgen_func_elem_2108(arg0, arg1);
2577
2634
  return takeObject(ret);
2578
2635
  }
2579
- function __wasm_bindgen_func_elem_4749(arg0, arg1, arg2) {
2580
- wasm.__wasm_bindgen_func_elem_4749(arg0, arg1, addHeapObject(arg2));
2636
+ function __wasm_bindgen_func_elem_4804(arg0, arg1, arg2) {
2637
+ wasm.__wasm_bindgen_func_elem_4804(arg0, arg1, addHeapObject(arg2));
2581
2638
  }
2582
- function __wasm_bindgen_func_elem_13265(arg0, arg1, arg2, arg3) {
2583
- wasm.__wasm_bindgen_func_elem_13265(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2639
+ function __wasm_bindgen_func_elem_13337(arg0, arg1, arg2, arg3) {
2640
+ wasm.__wasm_bindgen_func_elem_13337(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2584
2641
  }
2585
2642
  var ClientFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
2586
2643
  }, unregister: () => {
@@ -2831,6 +2888,15 @@ function passArray8ToWasm0(arg, malloc) {
2831
2888
  WASM_VECTOR_LEN = arg.length;
2832
2889
  return ptr;
2833
2890
  }
2891
+ function passArrayJsValueToWasm0(array, malloc) {
2892
+ const ptr = malloc(array.length * 4, 4) >>> 0;
2893
+ const mem = getDataViewMemory0();
2894
+ for (let i = 0; i < array.length; i++) {
2895
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
2896
+ }
2897
+ WASM_VECTOR_LEN = array.length;
2898
+ return ptr;
2899
+ }
2834
2900
  function passStringToWasm0(arg, malloc, realloc) {
2835
2901
  if (realloc === void 0) {
2836
2902
  const buf = cachedTextEncoder.encode(arg);
@@ -3211,9 +3277,9 @@ async function decode_api_responses(core, ptr, callback) {
3211
3277
  }
3212
3278
  }
3213
3279
 
3214
- // dist/wasm/perspective-migrate-js.js
3215
- var perspective_migrate_js_exports = {};
3216
- __export(perspective_migrate_js_exports, {
3280
+ // dist/wasm/perspective-migrate.js
3281
+ var perspective_migrate_exports = {};
3282
+ __export(perspective_migrate_exports, {
3217
3283
  default: () => __wbg_init2,
3218
3284
  initSync: () => initSync2,
3219
3285
  migrate: () => migrate
@@ -3454,7 +3520,7 @@ function __wbg_get_imports2() {
3454
3520
  };
3455
3521
  return {
3456
3522
  __proto__: null,
3457
- "./perspective-migrate-js.wasm_bg.js": import0
3523
+ "./perspective-migrate.wasm_bg.js": import0
3458
3524
  };
3459
3525
  }
3460
3526
  function addHeapObject2(obj) {
@@ -3700,12 +3766,12 @@ var MigrateLoader = class {
3700
3766
  async migrate(kind, config, from_version) {
3701
3767
  if (this.module === void 0) {
3702
3768
  if (this.source === void 0) {
3703
- throw new Error("Missing perspective-migrate-js.wasm");
3769
+ throw new Error("Missing perspective-migrate.wasm");
3704
3770
  }
3705
3771
  const source = this.source;
3706
3772
  const module = source().then(async (module_or_path) => {
3707
3773
  await __wbg_init2({ module_or_path });
3708
- return perspective_migrate_js_exports;
3774
+ return perspective_migrate_exports;
3709
3775
  });
3710
3776
  this.module = module;
3711
3777
  module.catch(() => {
@@ -4199,7 +4265,7 @@ await __wbg_init({ module_or_path: uncompressed_client_wasm });
4199
4265
  var MIGRATE = new MigrateLoader();
4200
4266
  MIGRATE.register(async () => {
4201
4267
  const buffer = await fs.readFile(
4202
- path.join(__dirname, "../../dist/wasm/perspective-migrate-js.wasm")
4268
+ path.join(__dirname, "../../dist/wasm/perspective-migrate.wasm")
4203
4269
  );
4204
4270
  return await load_wasm_stage_0(buffer.buffer);
4205
4271
  });