@query-farm/vgi 0.17.0 → 0.18.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.
@@ -58,7 +58,7 @@ export interface TableInfo {
58
58
  cardinality_max?: number | null;
59
59
  column_statistics?: Uint8Array | null;
60
60
  bind_result?: Uint8Array | null;
61
- required_field_filter_paths: string[];
61
+ required_filters: string[][];
62
62
  }
63
63
  export interface ViewInfo {
64
64
  comment?: string | null;
package/dist/index.js CHANGED
@@ -5796,7 +5796,7 @@ var TableInfoSchema = schema2([
5796
5796
  field2("cardinality_max", int642(), false),
5797
5797
  field2("column_statistics", binary2(), false),
5798
5798
  field2("bind_result", binary2(), false),
5799
- field2("required_field_filter_paths", list2(field2("item", utf82(), true)), false)
5799
+ field2("required_filters", list2(field2("item", list2(field2("item", utf82(), true)), true)), false)
5800
5800
  ]);
5801
5801
  var ViewInfoSchema = schema2([
5802
5802
  field2("comment", utf82(), true),
@@ -6868,16 +6868,21 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
6868
6868
  const uniqueIndices = resolveIndexGroups(colSchema, t.unique);
6869
6869
  const pkIndices = resolveIndexGroups(colSchema, t.primaryKey);
6870
6870
  const fkBytes = serializeForeignKeys(t.foreignKey, name);
6871
- const requiredFieldFilterPaths = t.requiredFieldFilterPaths ?? [];
6872
- if (requiredFieldFilterPaths.length > 0) {
6871
+ const requiredFilters = t.requiredFilters ?? [];
6872
+ if (requiredFilters.length > 0) {
6873
6873
  const columnNames = new Set(colSchema.fields.map((f) => f.name));
6874
- for (const path2 of requiredFieldFilterPaths) {
6875
- if (!path2) {
6876
- throw new Error(`Table '${t.name}': requiredFieldFilterPaths must not contain empty strings`);
6874
+ for (const group of requiredFilters) {
6875
+ if (!group || group.length === 0) {
6876
+ throw new Error(`Table '${t.name}': requiredFilters must not contain empty groups`);
6877
6877
  }
6878
- const head = path2.split(".", 1)[0];
6879
- if (!columnNames.has(head)) {
6880
- throw new Error(`Table '${t.name}': requiredFieldFilterPaths path '${path2}' references ` + `unknown column '${head}'. Available columns: ${[...columnNames].sort().join(", ")}`);
6878
+ for (const path2 of group) {
6879
+ if (!path2) {
6880
+ throw new Error(`Table '${t.name}': requiredFilters must not contain empty strings`);
6881
+ }
6882
+ const head = path2.split(".", 1)[0];
6883
+ if (!columnNames.has(head)) {
6884
+ throw new Error(`Table '${t.name}': requiredFilters path '${path2}' references ` + `unknown column '${head}'. Available columns: ${[...columnNames].sort().join(", ")}`);
6885
+ }
6881
6886
  }
6882
6887
  }
6883
6888
  }
@@ -6903,7 +6908,7 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
6903
6908
  delete_function: null,
6904
6909
  cardinality_estimate: t.inlinedCardinality ? Number(t.inlinedCardinality.estimate) : null,
6905
6910
  cardinality_max: t.inlinedCardinality ? Number(t.inlinedCardinality.max) : null,
6906
- required_field_filter_paths: requiredFieldFilterPaths
6911
+ required_filters: requiredFilters
6907
6912
  };
6908
6913
  }));
6909
6914
  }
@@ -11691,4 +11696,4 @@ export {
11691
11696
  ArgumentValidationError
11692
11697
  };
11693
11698
 
11694
- //# debugId=0510FF19793B06C764756E2164756E21
11699
+ //# debugId=B98CA527867E993364756E2164756E21