@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.
- package/dist/catalog/descriptors.d.ts +13 -7
- package/dist/client-entry.js +2 -2
- package/dist/client-entry.js.map +4 -4
- package/dist/generated/vgi-client.d.ts +1 -1
- package/dist/index.js +16 -11
- package/dist/index.js.map +5 -5
- package/dist/serve-entry.js +2 -2
- package/dist/serve-entry.js.map +4 -4
- package/dist/worker-cf-entry.js +16 -11
- package/dist/worker-cf-entry.js.map +5 -5
- package/package.json +1 -1
- package/src/catalog/descriptors.ts +13 -7
- package/src/catalog/read-only.ts +22 -14
- package/src/generated/vgi-client.ts +2 -2
- package/src/generated/vgi-protocol-schemas.ts +2 -2
package/dist/worker-cf-entry.js
CHANGED
|
@@ -3175,7 +3175,7 @@ var TableInfoSchema = schema2([
|
|
|
3175
3175
|
field2("cardinality_max", int642(), false),
|
|
3176
3176
|
field2("column_statistics", binary2(), false),
|
|
3177
3177
|
field2("bind_result", binary2(), false),
|
|
3178
|
-
field2("
|
|
3178
|
+
field2("required_filters", list2(field2("item", list2(field2("item", utf82(), true)), true)), false)
|
|
3179
3179
|
]);
|
|
3180
3180
|
var ViewInfoSchema = schema2([
|
|
3181
3181
|
field2("comment", utf82(), true),
|
|
@@ -8058,16 +8058,21 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
8058
8058
|
const uniqueIndices = resolveIndexGroups(colSchema, t.unique);
|
|
8059
8059
|
const pkIndices = resolveIndexGroups(colSchema, t.primaryKey);
|
|
8060
8060
|
const fkBytes = serializeForeignKeys(t.foreignKey, name);
|
|
8061
|
-
const
|
|
8062
|
-
if (
|
|
8061
|
+
const requiredFilters = t.requiredFilters ?? [];
|
|
8062
|
+
if (requiredFilters.length > 0) {
|
|
8063
8063
|
const columnNames = new Set(colSchema.fields.map((f) => f.name));
|
|
8064
|
-
for (const
|
|
8065
|
-
if (!
|
|
8066
|
-
throw new Error(`Table '${t.name}':
|
|
8064
|
+
for (const group of requiredFilters) {
|
|
8065
|
+
if (!group || group.length === 0) {
|
|
8066
|
+
throw new Error(`Table '${t.name}': requiredFilters must not contain empty groups`);
|
|
8067
8067
|
}
|
|
8068
|
-
const
|
|
8069
|
-
|
|
8070
|
-
|
|
8068
|
+
for (const path2 of group) {
|
|
8069
|
+
if (!path2) {
|
|
8070
|
+
throw new Error(`Table '${t.name}': requiredFilters must not contain empty strings`);
|
|
8071
|
+
}
|
|
8072
|
+
const head = path2.split(".", 1)[0];
|
|
8073
|
+
if (!columnNames.has(head)) {
|
|
8074
|
+
throw new Error(`Table '${t.name}': requiredFilters path '${path2}' references ` + `unknown column '${head}'. Available columns: ${[...columnNames].sort().join(", ")}`);
|
|
8075
|
+
}
|
|
8071
8076
|
}
|
|
8072
8077
|
}
|
|
8073
8078
|
}
|
|
@@ -8093,7 +8098,7 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
8093
8098
|
delete_function: null,
|
|
8094
8099
|
cardinality_estimate: t.inlinedCardinality ? Number(t.inlinedCardinality.estimate) : null,
|
|
8095
8100
|
cardinality_max: t.inlinedCardinality ? Number(t.inlinedCardinality.max) : null,
|
|
8096
|
-
|
|
8101
|
+
required_filters: requiredFilters
|
|
8097
8102
|
};
|
|
8098
8103
|
}));
|
|
8099
8104
|
}
|
|
@@ -9369,4 +9374,4 @@ export {
|
|
|
9369
9374
|
Arguments
|
|
9370
9375
|
};
|
|
9371
9376
|
|
|
9372
|
-
//# debugId=
|
|
9377
|
+
//# debugId=520242AE9AD7B67464756E2164756E21
|