@quereus/quereus 3.2.1 → 4.0.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/README.md +7 -0
- package/dist/src/common/datatype.d.ts +12 -0
- package/dist/src/common/datatype.d.ts.map +1 -1
- package/dist/src/common/datatype.js.map +1 -1
- package/dist/src/common/types.d.ts +24 -0
- package/dist/src/common/types.d.ts.map +1 -1
- package/dist/src/common/types.js.map +1 -1
- package/dist/src/core/database-assertions.d.ts +37 -9
- package/dist/src/core/database-assertions.d.ts.map +1 -1
- package/dist/src/core/database-assertions.js +62 -106
- package/dist/src/core/database-assertions.js.map +1 -1
- package/dist/src/core/database-events.d.ts +163 -0
- package/dist/src/core/database-events.d.ts.map +1 -1
- package/dist/src/core/database-events.js +235 -21
- package/dist/src/core/database-events.js.map +1 -1
- package/dist/src/core/database-external-changes.d.ts +28 -0
- package/dist/src/core/database-external-changes.d.ts.map +1 -0
- package/dist/src/core/database-external-changes.js +242 -0
- package/dist/src/core/database-external-changes.js.map +1 -0
- package/dist/src/core/database-internal.d.ts +50 -1
- package/dist/src/core/database-internal.d.ts.map +1 -1
- package/dist/src/core/database-materialized-views.d.ts +1253 -0
- package/dist/src/core/database-materialized-views.d.ts.map +1 -0
- package/dist/src/core/database-materialized-views.js +3064 -0
- package/dist/src/core/database-materialized-views.js.map +1 -0
- package/dist/src/core/database-options.d.ts +4 -0
- package/dist/src/core/database-options.d.ts.map +1 -1
- package/dist/src/core/database-options.js +10 -0
- package/dist/src/core/database-options.js.map +1 -1
- package/dist/src/core/database-transaction.d.ts +19 -3
- package/dist/src/core/database-transaction.d.ts.map +1 -1
- package/dist/src/core/database-transaction.js +30 -3
- package/dist/src/core/database-transaction.js.map +1 -1
- package/dist/src/core/database-watchers.d.ts +19 -0
- package/dist/src/core/database-watchers.d.ts.map +1 -1
- package/dist/src/core/database-watchers.js +63 -3
- package/dist/src/core/database-watchers.js.map +1 -1
- package/dist/src/core/database.d.ts +203 -11
- package/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +493 -29
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/core/derived-row-validator.d.ts +137 -0
- package/dist/src/core/derived-row-validator.d.ts.map +1 -0
- package/dist/src/core/derived-row-validator.js +314 -0
- package/dist/src/core/derived-row-validator.js.map +1 -0
- package/dist/src/core/statement.d.ts.map +1 -1
- package/dist/src/core/statement.js +30 -9
- package/dist/src/core/statement.js.map +1 -1
- package/dist/src/emit/ast-stringify.d.ts +135 -1
- package/dist/src/emit/ast-stringify.d.ts.map +1 -1
- package/dist/src/emit/ast-stringify.js +795 -120
- package/dist/src/emit/ast-stringify.js.map +1 -1
- package/dist/src/func/builtins/aggregate.d.ts.map +1 -1
- package/dist/src/func/builtins/aggregate.js +11 -10
- package/dist/src/func/builtins/aggregate.js.map +1 -1
- package/dist/src/func/builtins/builtin-window-functions.d.ts.map +1 -1
- package/dist/src/func/builtins/builtin-window-functions.js +32 -0
- package/dist/src/func/builtins/builtin-window-functions.js.map +1 -1
- package/dist/src/func/builtins/explain.d.ts +3 -0
- package/dist/src/func/builtins/explain.d.ts.map +1 -1
- package/dist/src/func/builtins/explain.js +229 -0
- package/dist/src/func/builtins/explain.js.map +1 -1
- package/dist/src/func/builtins/index.d.ts.map +1 -1
- package/dist/src/func/builtins/index.js +10 -2
- package/dist/src/func/builtins/index.js.map +1 -1
- package/dist/src/func/builtins/json.d.ts.map +1 -1
- package/dist/src/func/builtins/json.js +3 -2
- package/dist/src/func/builtins/json.js.map +1 -1
- package/dist/src/func/builtins/mutation.d.ts +2 -0
- package/dist/src/func/builtins/mutation.d.ts.map +1 -0
- package/dist/src/func/builtins/mutation.js +53 -0
- package/dist/src/func/builtins/mutation.js.map +1 -0
- package/dist/src/func/builtins/schema.d.ts +2 -0
- package/dist/src/func/builtins/schema.d.ts.map +1 -1
- package/dist/src/func/builtins/schema.js +713 -26
- package/dist/src/func/builtins/schema.js.map +1 -1
- package/dist/src/func/builtins/string.js +1 -1
- package/dist/src/func/builtins/string.js.map +1 -1
- package/dist/src/func/registration.d.ts +9 -0
- package/dist/src/func/registration.d.ts.map +1 -1
- package/dist/src/func/registration.js +4 -0
- package/dist/src/func/registration.js.map +1 -1
- package/dist/src/index.d.ts +25 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +27 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/parser/ast.d.ts +353 -21
- package/dist/src/parser/ast.d.ts.map +1 -1
- package/dist/src/parser/index.d.ts +14 -1
- package/dist/src/parser/index.d.ts.map +1 -1
- package/dist/src/parser/index.js +19 -0
- package/dist/src/parser/index.js.map +1 -1
- package/dist/src/parser/lexer.d.ts +9 -0
- package/dist/src/parser/lexer.d.ts.map +1 -1
- package/dist/src/parser/lexer.js +9 -0
- package/dist/src/parser/lexer.js.map +1 -1
- package/dist/src/parser/parser.d.ts +277 -8
- package/dist/src/parser/parser.d.ts.map +1 -1
- package/dist/src/parser/parser.js +1393 -471
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/parser/visitor.d.ts.map +1 -1
- package/dist/src/parser/visitor.js +12 -8
- package/dist/src/parser/visitor.js.map +1 -1
- package/dist/src/planner/analysis/assertion-classifier.d.ts.map +1 -1
- package/dist/src/planner/analysis/assertion-classifier.js +4 -0
- package/dist/src/planner/analysis/assertion-classifier.js.map +1 -1
- package/dist/src/planner/analysis/assertion-hoist-cache.d.ts.map +1 -1
- package/dist/src/planner/analysis/assertion-hoist-cache.js +8 -4
- package/dist/src/planner/analysis/assertion-hoist-cache.js.map +1 -1
- package/dist/src/planner/analysis/authored-inverse.d.ts +22 -0
- package/dist/src/planner/analysis/authored-inverse.d.ts.map +1 -0
- package/dist/src/planner/analysis/authored-inverse.js +267 -0
- package/dist/src/planner/analysis/authored-inverse.js.map +1 -0
- package/dist/src/planner/analysis/binding-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/binding-extractor.js +9 -6
- package/dist/src/planner/analysis/binding-extractor.js.map +1 -1
- package/dist/src/planner/analysis/change-scope.d.ts +34 -4
- package/dist/src/planner/analysis/change-scope.d.ts.map +1 -1
- package/dist/src/planner/analysis/change-scope.js +115 -7
- package/dist/src/planner/analysis/change-scope.js.map +1 -1
- package/dist/src/planner/analysis/check-extraction.d.ts +36 -2
- package/dist/src/planner/analysis/check-extraction.d.ts.map +1 -1
- package/dist/src/planner/analysis/check-extraction.js +174 -46
- package/dist/src/planner/analysis/check-extraction.js.map +1 -1
- package/dist/src/planner/analysis/coarsened-key.d.ts +109 -0
- package/dist/src/planner/analysis/coarsened-key.d.ts.map +1 -0
- package/dist/src/planner/analysis/coarsened-key.js +228 -0
- package/dist/src/planner/analysis/coarsened-key.js.map +1 -0
- package/dist/src/planner/analysis/comparison-collation.d.ts +216 -0
- package/dist/src/planner/analysis/comparison-collation.d.ts.map +1 -0
- package/dist/src/planner/analysis/comparison-collation.js +341 -0
- package/dist/src/planner/analysis/comparison-collation.js.map +1 -0
- package/dist/src/planner/analysis/constraint-extractor.d.ts +13 -1
- package/dist/src/planner/analysis/constraint-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.js +220 -21
- package/dist/src/planner/analysis/constraint-extractor.js.map +1 -1
- package/dist/src/planner/analysis/coverage-prover.d.ts +321 -0
- package/dist/src/planner/analysis/coverage-prover.d.ts.map +1 -0
- package/dist/src/planner/analysis/coverage-prover.js +1038 -0
- package/dist/src/planner/analysis/coverage-prover.js.map +1 -0
- package/dist/src/planner/analysis/key-filter.d.ts +22 -0
- package/dist/src/planner/analysis/key-filter.d.ts.map +1 -0
- package/dist/src/planner/analysis/key-filter.js +105 -0
- package/dist/src/planner/analysis/key-filter.js.map +1 -0
- package/dist/src/planner/analysis/partial-unique-extraction.d.ts +36 -1
- package/dist/src/planner/analysis/partial-unique-extraction.d.ts.map +1 -1
- package/dist/src/planner/analysis/partial-unique-extraction.js +148 -22
- package/dist/src/planner/analysis/partial-unique-extraction.js.map +1 -1
- package/dist/src/planner/analysis/predicate-normalizer.d.ts.map +1 -1
- package/dist/src/planner/analysis/predicate-normalizer.js +30 -1
- package/dist/src/planner/analysis/predicate-normalizer.js.map +1 -1
- package/dist/src/planner/analysis/predicate-shape.d.ts +36 -1
- package/dist/src/planner/analysis/predicate-shape.d.ts.map +1 -1
- package/dist/src/planner/analysis/predicate-shape.js +51 -13
- package/dist/src/planner/analysis/predicate-shape.js.map +1 -1
- package/dist/src/planner/analysis/query-rewrite-matcher.d.ts +314 -0
- package/dist/src/planner/analysis/query-rewrite-matcher.d.ts.map +1 -0
- package/dist/src/planner/analysis/query-rewrite-matcher.js +1081 -0
- package/dist/src/planner/analysis/query-rewrite-matcher.js.map +1 -0
- package/dist/src/planner/analysis/scalar-invertibility.d.ts +92 -0
- package/dist/src/planner/analysis/scalar-invertibility.d.ts.map +1 -0
- package/dist/src/planner/analysis/scalar-invertibility.js +129 -0
- package/dist/src/planner/analysis/scalar-invertibility.js.map +1 -0
- package/dist/src/planner/analysis/update-lineage.d.ts +196 -0
- package/dist/src/planner/analysis/update-lineage.d.ts.map +1 -0
- package/dist/src/planner/analysis/update-lineage.js +322 -0
- package/dist/src/planner/analysis/update-lineage.js.map +1 -0
- package/dist/src/planner/analysis/view-complement.d.ts +42 -0
- package/dist/src/planner/analysis/view-complement.d.ts.map +1 -0
- package/dist/src/planner/analysis/view-complement.js +54 -0
- package/dist/src/planner/analysis/view-complement.js.map +1 -0
- package/dist/src/planner/building/alter-table.d.ts +1 -1
- package/dist/src/planner/building/alter-table.d.ts.map +1 -1
- package/dist/src/planner/building/alter-table.js +211 -2
- package/dist/src/planner/building/alter-table.js.map +1 -1
- package/dist/src/planner/building/block.d.ts.map +1 -1
- package/dist/src/planner/building/block.js +18 -1
- package/dist/src/planner/building/block.js.map +1 -1
- package/dist/src/planner/building/constraint-builder.d.ts +33 -5
- package/dist/src/planner/building/constraint-builder.d.ts.map +1 -1
- package/dist/src/planner/building/constraint-builder.js +63 -28
- package/dist/src/planner/building/constraint-builder.js.map +1 -1
- package/dist/src/planner/building/create-view.d.ts +9 -0
- package/dist/src/planner/building/create-view.d.ts.map +1 -1
- package/dist/src/planner/building/create-view.js +41 -12
- package/dist/src/planner/building/create-view.js.map +1 -1
- package/dist/src/planner/building/ddl.d.ts.map +1 -1
- package/dist/src/planner/building/ddl.js +94 -0
- package/dist/src/planner/building/ddl.js.map +1 -1
- package/dist/src/planner/building/declare-schema.d.ts +1 -0
- package/dist/src/planner/building/declare-schema.d.ts.map +1 -1
- package/dist/src/planner/building/declare-schema.js +4 -1
- package/dist/src/planner/building/declare-schema.js.map +1 -1
- package/dist/src/planner/building/default-scope.d.ts +26 -0
- package/dist/src/planner/building/default-scope.d.ts.map +1 -0
- package/dist/src/planner/building/default-scope.js +41 -0
- package/dist/src/planner/building/default-scope.js.map +1 -0
- package/dist/src/planner/building/delete.d.ts +19 -1
- package/dist/src/planner/building/delete.d.ts.map +1 -1
- package/dist/src/planner/building/delete.js +116 -34
- package/dist/src/planner/building/delete.js.map +1 -1
- package/dist/src/planner/building/dml-target.d.ts +118 -0
- package/dist/src/planner/building/dml-target.d.ts.map +1 -0
- package/dist/src/planner/building/dml-target.js +282 -0
- package/dist/src/planner/building/dml-target.js.map +1 -0
- package/dist/src/planner/building/drop-index.d.ts.map +1 -1
- package/dist/src/planner/building/drop-index.js +4 -1
- package/dist/src/planner/building/drop-index.js.map +1 -1
- package/dist/src/planner/building/drop-view.d.ts.map +1 -1
- package/dist/src/planner/building/drop-view.js +4 -2
- package/dist/src/planner/building/drop-view.js.map +1 -1
- package/dist/src/planner/building/expression.d.ts.map +1 -1
- package/dist/src/planner/building/expression.js +60 -21
- package/dist/src/planner/building/expression.js.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.d.ts +30 -0
- package/dist/src/planner/building/foreign-key-builder.d.ts.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.js +160 -129
- package/dist/src/planner/building/foreign-key-builder.js.map +1 -1
- package/dist/src/planner/building/insert.d.ts +45 -2
- package/dist/src/planner/building/insert.d.ts.map +1 -1
- package/dist/src/planner/building/insert.js +257 -88
- package/dist/src/planner/building/insert.js.map +1 -1
- package/dist/src/planner/building/lens-auxiliary-access.d.ts +22 -0
- package/dist/src/planner/building/lens-auxiliary-access.d.ts.map +1 -0
- package/dist/src/planner/building/lens-auxiliary-access.js +132 -0
- package/dist/src/planner/building/lens-auxiliary-access.js.map +1 -0
- package/dist/src/planner/building/materialized-view.d.ts +16 -0
- package/dist/src/planner/building/materialized-view.d.ts.map +1 -0
- package/dist/src/planner/building/materialized-view.js +57 -0
- package/dist/src/planner/building/materialized-view.js.map +1 -0
- package/dist/src/planner/building/returning-star.d.ts +32 -0
- package/dist/src/planner/building/returning-star.d.ts.map +1 -0
- package/dist/src/planner/building/returning-star.js +45 -0
- package/dist/src/planner/building/returning-star.js.map +1 -0
- package/dist/src/planner/building/select-aggregates.d.ts.map +1 -1
- package/dist/src/planner/building/select-aggregates.js +51 -13
- package/dist/src/planner/building/select-aggregates.js.map +1 -1
- package/dist/src/planner/building/select-compound.d.ts.map +1 -1
- package/dist/src/planner/building/select-compound.js +84 -11
- package/dist/src/planner/building/select-compound.js.map +1 -1
- package/dist/src/planner/building/select-context.d.ts +10 -2
- package/dist/src/planner/building/select-context.d.ts.map +1 -1
- package/dist/src/planner/building/select-context.js +7 -1
- package/dist/src/planner/building/select-context.js.map +1 -1
- package/dist/src/planner/building/select-modifiers.js +6 -0
- package/dist/src/planner/building/select-modifiers.js.map +1 -1
- package/dist/src/planner/building/select-ordinal.d.ts +18 -0
- package/dist/src/planner/building/select-ordinal.d.ts.map +1 -1
- package/dist/src/planner/building/select-ordinal.js +30 -0
- package/dist/src/planner/building/select-ordinal.js.map +1 -1
- package/dist/src/planner/building/select-projections.d.ts +8 -2
- package/dist/src/planner/building/select-projections.d.ts.map +1 -1
- package/dist/src/planner/building/select-projections.js +26 -4
- package/dist/src/planner/building/select-projections.js.map +1 -1
- package/dist/src/planner/building/select-window.d.ts.map +1 -1
- package/dist/src/planner/building/select-window.js +8 -5
- package/dist/src/planner/building/select-window.js.map +1 -1
- package/dist/src/planner/building/select.d.ts.map +1 -1
- package/dist/src/planner/building/select.js +164 -59
- package/dist/src/planner/building/select.js.map +1 -1
- package/dist/src/planner/building/set-object-tags.d.ts +7 -0
- package/dist/src/planner/building/set-object-tags.d.ts.map +1 -0
- package/dist/src/planner/building/set-object-tags.js +38 -0
- package/dist/src/planner/building/set-object-tags.js.map +1 -0
- package/dist/src/planner/building/tag-diagnostics.d.ts +27 -0
- package/dist/src/planner/building/tag-diagnostics.d.ts.map +1 -0
- package/dist/src/planner/building/tag-diagnostics.js +37 -0
- package/dist/src/planner/building/tag-diagnostics.js.map +1 -0
- package/dist/src/planner/building/update.d.ts +18 -1
- package/dist/src/planner/building/update.d.ts.map +1 -1
- package/dist/src/planner/building/update.js +134 -58
- package/dist/src/planner/building/update.js.map +1 -1
- package/dist/src/planner/building/view-mutation-builder.d.ts +15 -0
- package/dist/src/planner/building/view-mutation-builder.d.ts.map +1 -0
- package/dist/src/planner/building/view-mutation-builder.js +1158 -0
- package/dist/src/planner/building/view-mutation-builder.js.map +1 -0
- package/dist/src/planner/building/with.d.ts +11 -0
- package/dist/src/planner/building/with.d.ts.map +1 -1
- package/dist/src/planner/building/with.js +48 -10
- package/dist/src/planner/building/with.js.map +1 -1
- package/dist/src/planner/cost/index.d.ts +83 -0
- package/dist/src/planner/cost/index.d.ts.map +1 -1
- package/dist/src/planner/cost/index.js +114 -0
- package/dist/src/planner/cost/index.js.map +1 -1
- package/dist/src/planner/framework/characteristics.d.ts +38 -4
- package/dist/src/planner/framework/characteristics.d.ts.map +1 -1
- package/dist/src/planner/framework/characteristics.js +50 -6
- package/dist/src/planner/framework/characteristics.js.map +1 -1
- package/dist/src/planner/framework/pass.d.ts.map +1 -1
- package/dist/src/planner/framework/pass.js +2 -1
- package/dist/src/planner/framework/pass.js.map +1 -1
- package/dist/src/planner/framework/physical-utils.d.ts.map +1 -1
- package/dist/src/planner/framework/physical-utils.js +7 -1
- package/dist/src/planner/framework/physical-utils.js.map +1 -1
- package/dist/src/planner/framework/registry.d.ts +39 -1
- package/dist/src/planner/framework/registry.d.ts.map +1 -1
- package/dist/src/planner/framework/registry.js +18 -2
- package/dist/src/planner/framework/registry.js.map +1 -1
- package/dist/src/planner/mutation/backward-body.d.ts +131 -0
- package/dist/src/planner/mutation/backward-body.d.ts.map +1 -0
- package/dist/src/planner/mutation/backward-body.js +135 -0
- package/dist/src/planner/mutation/backward-body.js.map +1 -0
- package/dist/src/planner/mutation/cte-flatten.d.ts +17 -0
- package/dist/src/planner/mutation/cte-flatten.d.ts.map +1 -0
- package/dist/src/planner/mutation/cte-flatten.js +364 -0
- package/dist/src/planner/mutation/cte-flatten.js.map +1 -0
- package/dist/src/planner/mutation/decomposition.d.ts +273 -0
- package/dist/src/planner/mutation/decomposition.d.ts.map +1 -0
- package/dist/src/planner/mutation/decomposition.js +1719 -0
- package/dist/src/planner/mutation/decomposition.js.map +1 -0
- package/dist/src/planner/mutation/lens-enforcement.d.ts +165 -0
- package/dist/src/planner/mutation/lens-enforcement.d.ts.map +1 -0
- package/dist/src/planner/mutation/lens-enforcement.js +745 -0
- package/dist/src/planner/mutation/lens-enforcement.js.map +1 -0
- package/dist/src/planner/mutation/multi-source.d.ts +568 -0
- package/dist/src/planner/mutation/multi-source.d.ts.map +1 -0
- package/dist/src/planner/mutation/multi-source.js +2915 -0
- package/dist/src/planner/mutation/multi-source.js.map +1 -0
- package/dist/src/planner/mutation/mutation-diagnostic.d.ts +37 -0
- package/dist/src/planner/mutation/mutation-diagnostic.d.ts.map +1 -0
- package/dist/src/planner/mutation/mutation-diagnostic.js +24 -0
- package/dist/src/planner/mutation/mutation-diagnostic.js.map +1 -0
- package/dist/src/planner/mutation/mutation-tags.d.ts +33 -0
- package/dist/src/planner/mutation/mutation-tags.d.ts.map +1 -0
- package/dist/src/planner/mutation/mutation-tags.js +31 -0
- package/dist/src/planner/mutation/mutation-tags.js.map +1 -0
- package/dist/src/planner/mutation/propagate.d.ts +97 -0
- package/dist/src/planner/mutation/propagate.d.ts.map +1 -0
- package/dist/src/planner/mutation/propagate.js +220 -0
- package/dist/src/planner/mutation/propagate.js.map +1 -0
- package/dist/src/planner/mutation/scope-transform.d.ts +181 -0
- package/dist/src/planner/mutation/scope-transform.d.ts.map +1 -0
- package/dist/src/planner/mutation/scope-transform.js +574 -0
- package/dist/src/planner/mutation/scope-transform.js.map +1 -0
- package/dist/src/planner/mutation/set-op.d.ts +242 -0
- package/dist/src/planner/mutation/set-op.d.ts.map +1 -0
- package/dist/src/planner/mutation/set-op.js +1687 -0
- package/dist/src/planner/mutation/set-op.js.map +1 -0
- package/dist/src/planner/mutation/single-source.d.ts +261 -0
- package/dist/src/planner/mutation/single-source.d.ts.map +1 -0
- package/dist/src/planner/mutation/single-source.js +1096 -0
- package/dist/src/planner/mutation/single-source.js.map +1 -0
- package/dist/src/planner/nodes/aggregate-node.d.ts +6 -4
- package/dist/src/planner/nodes/aggregate-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/aggregate-node.js +11 -9
- package/dist/src/planner/nodes/aggregate-node.js.map +1 -1
- package/dist/src/planner/nodes/alias-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/alias-node.js +5 -1
- package/dist/src/planner/nodes/alias-node.js.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.d.ts +124 -1
- package/dist/src/planner/nodes/alter-table-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.js +27 -0
- package/dist/src/planner/nodes/alter-table-node.js.map +1 -1
- package/dist/src/planner/nodes/analyze-node.d.ts +2 -1
- package/dist/src/planner/nodes/analyze-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/analyze-node.js +21 -1
- package/dist/src/planner/nodes/analyze-node.js.map +1 -1
- package/dist/src/planner/nodes/asserted-keys-node.d.ts +43 -0
- package/dist/src/planner/nodes/asserted-keys-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/asserted-keys-node.js +99 -0
- package/dist/src/planner/nodes/asserted-keys-node.js.map +1 -0
- package/dist/src/planner/nodes/async-gather-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/async-gather-node.js +33 -8
- package/dist/src/planner/nodes/async-gather-node.js.map +1 -1
- package/dist/src/planner/nodes/bloom-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/bloom-join-node.js +2 -1
- package/dist/src/planner/nodes/bloom-join-node.js.map +1 -1
- package/dist/src/planner/nodes/create-view-node.d.ts +7 -2
- package/dist/src/planner/nodes/create-view-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/create-view-node.js +4 -1
- package/dist/src/planner/nodes/create-view-node.js.map +1 -1
- package/dist/src/planner/nodes/declarative-schema.d.ts +13 -1
- package/dist/src/planner/nodes/declarative-schema.d.ts.map +1 -1
- package/dist/src/planner/nodes/declarative-schema.js +32 -0
- package/dist/src/planner/nodes/declarative-schema.js.map +1 -1
- package/dist/src/planner/nodes/distinct-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/distinct-node.js +2 -0
- package/dist/src/planner/nodes/distinct-node.js.map +1 -1
- package/dist/src/planner/nodes/dml-executor-node.d.ts +29 -1
- package/dist/src/planner/nodes/dml-executor-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/dml-executor-node.js +27 -3
- package/dist/src/planner/nodes/dml-executor-node.js.map +1 -1
- package/dist/src/planner/nodes/eager-prefetch-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/eager-prefetch-node.js +2 -0
- package/dist/src/planner/nodes/eager-prefetch-node.js.map +1 -1
- package/dist/src/planner/nodes/envelope-scan-node.d.ts +42 -0
- package/dist/src/planner/nodes/envelope-scan-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/envelope-scan-node.js +62 -0
- package/dist/src/planner/nodes/envelope-scan-node.js.map +1 -0
- package/dist/src/planner/nodes/fanout-lookup-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/fanout-lookup-join-node.js +11 -1
- package/dist/src/planner/nodes/fanout-lookup-join-node.js.map +1 -1
- package/dist/src/planner/nodes/filter.d.ts.map +1 -1
- package/dist/src/planner/nodes/filter.js +63 -13
- package/dist/src/planner/nodes/filter.js.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/hash-aggregate.js +6 -16
- package/dist/src/planner/nodes/hash-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/join-node.d.ts +41 -1
- package/dist/src/planner/nodes/join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-node.js +78 -8
- package/dist/src/planner/nodes/join-node.js.map +1 -1
- package/dist/src/planner/nodes/join-utils.d.ts +33 -6
- package/dist/src/planner/nodes/join-utils.d.ts.map +1 -1
- package/dist/src/planner/nodes/join-utils.js +131 -10
- package/dist/src/planner/nodes/join-utils.js.map +1 -1
- package/dist/src/planner/nodes/lens-auxiliary-access-node.d.ts +104 -0
- package/dist/src/planner/nodes/lens-auxiliary-access-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/lens-auxiliary-access-node.js +91 -0
- package/dist/src/planner/nodes/lens-auxiliary-access-node.js.map +1 -0
- package/dist/src/planner/nodes/limit-offset.d.ts +12 -0
- package/dist/src/planner/nodes/limit-offset.d.ts.map +1 -1
- package/dist/src/planner/nodes/limit-offset.js +52 -3
- package/dist/src/planner/nodes/limit-offset.js.map +1 -1
- package/dist/src/planner/nodes/materialized-view-nodes.d.ts +69 -0
- package/dist/src/planner/nodes/materialized-view-nodes.d.ts.map +1 -0
- package/dist/src/planner/nodes/materialized-view-nodes.js +111 -0
- package/dist/src/planner/nodes/materialized-view-nodes.js.map +1 -0
- package/dist/src/planner/nodes/merge-join-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/merge-join-node.js +2 -1
- package/dist/src/planner/nodes/merge-join-node.js.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/ordinal-slice-node.js +2 -0
- package/dist/src/planner/nodes/ordinal-slice-node.js.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.d.ts +9 -0
- package/dist/src/planner/nodes/plan-node-type.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.js +9 -0
- package/dist/src/planner/nodes/plan-node-type.js.map +1 -1
- package/dist/src/planner/nodes/plan-node.d.ts +265 -5
- package/dist/src/planner/nodes/plan-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node.js.map +1 -1
- package/dist/src/planner/nodes/pragma.d.ts +2 -1
- package/dist/src/planner/nodes/pragma.d.ts.map +1 -1
- package/dist/src/planner/nodes/pragma.js +12 -0
- package/dist/src/planner/nodes/pragma.js.map +1 -1
- package/dist/src/planner/nodes/project-node.d.ts +14 -1
- package/dist/src/planner/nodes/project-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/project-node.js +103 -16
- package/dist/src/planner/nodes/project-node.js.map +1 -1
- package/dist/src/planner/nodes/reference.d.ts.map +1 -1
- package/dist/src/planner/nodes/reference.js +63 -30
- package/dist/src/planner/nodes/reference.js.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/retrieve-node.js +7 -0
- package/dist/src/planner/nodes/retrieve-node.js.map +1 -1
- package/dist/src/planner/nodes/returning-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/returning-node.js +10 -3
- package/dist/src/planner/nodes/returning-node.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts +20 -0
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +71 -14
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/planner/nodes/set-object-tags-node.d.ts +39 -0
- package/dist/src/planner/nodes/set-object-tags-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/set-object-tags-node.js +41 -0
- package/dist/src/planner/nodes/set-object-tags-node.js.map +1 -0
- package/dist/src/planner/nodes/set-operation-node.d.ts +123 -1
- package/dist/src/planner/nodes/set-operation-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/set-operation-node.js +302 -18
- package/dist/src/planner/nodes/set-operation-node.js.map +1 -1
- package/dist/src/planner/nodes/single-row.d.ts.map +1 -1
- package/dist/src/planner/nodes/single-row.js +3 -0
- package/dist/src/planner/nodes/single-row.js.map +1 -1
- package/dist/src/planner/nodes/sort.d.ts.map +1 -1
- package/dist/src/planner/nodes/sort.js +8 -7
- package/dist/src/planner/nodes/sort.js.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.d.ts.map +1 -1
- package/dist/src/planner/nodes/stream-aggregate.js +8 -23
- package/dist/src/planner/nodes/stream-aggregate.js.map +1 -1
- package/dist/src/planner/nodes/subquery.d.ts +2 -0
- package/dist/src/planner/nodes/subquery.d.ts.map +1 -1
- package/dist/src/planner/nodes/subquery.js +18 -2
- package/dist/src/planner/nodes/subquery.js.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.d.ts.map +1 -1
- package/dist/src/planner/nodes/table-access-nodes.js +23 -3
- package/dist/src/planner/nodes/table-access-nodes.js.map +1 -1
- package/dist/src/planner/nodes/table-function-call.js +6 -0
- package/dist/src/planner/nodes/table-function-call.js.map +1 -1
- package/dist/src/planner/nodes/values-node.d.ts +3 -1
- package/dist/src/planner/nodes/values-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/values-node.js +26 -0
- package/dist/src/planner/nodes/values-node.js.map +1 -1
- package/dist/src/planner/nodes/view-mutation-node.d.ts +259 -0
- package/dist/src/planner/nodes/view-mutation-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/view-mutation-node.js +273 -0
- package/dist/src/planner/nodes/view-mutation-node.js.map +1 -0
- package/dist/src/planner/nodes/window-function.d.ts +17 -1
- package/dist/src/planner/nodes/window-function.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-function.js +15 -1
- package/dist/src/planner/nodes/window-function.js.map +1 -1
- package/dist/src/planner/nodes/window-node.js +3 -3
- package/dist/src/planner/nodes/window-node.js.map +1 -1
- package/dist/src/planner/optimizer.d.ts.map +1 -1
- package/dist/src/planner/optimizer.js +372 -39
- package/dist/src/planner/optimizer.js.map +1 -1
- package/dist/src/planner/planning-context.d.ts +1 -1
- package/dist/src/planner/planning-context.d.ts.map +1 -1
- package/dist/src/planner/rules/access/lens-access-form-matcher.d.ts +70 -0
- package/dist/src/planner/rules/access/lens-access-form-matcher.d.ts.map +1 -0
- package/dist/src/planner/rules/access/lens-access-form-matcher.js +156 -0
- package/dist/src/planner/rules/access/lens-access-form-matcher.js.map +1 -0
- package/dist/src/planner/rules/access/rule-lens-auxiliary-access.d.ts +31 -0
- package/dist/src/planner/rules/access/rule-lens-auxiliary-access.d.ts.map +1 -0
- package/dist/src/planner/rules/access/rule-lens-auxiliary-access.js +176 -0
- package/dist/src/planner/rules/access/rule-lens-auxiliary-access.js.map +1 -0
- package/dist/src/planner/rules/access/rule-select-access-path.d.ts.map +1 -1
- package/dist/src/planner/rules/access/rule-select-access-path.js +435 -37
- package/dist/src/planner/rules/access/rule-select-access-path.js.map +1 -1
- package/dist/src/planner/rules/aggregate/rule-aggregate-streaming.d.ts.map +1 -1
- package/dist/src/planner/rules/aggregate/rule-aggregate-streaming.js +8 -27
- package/dist/src/planner/rules/aggregate/rule-aggregate-streaming.js.map +1 -1
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.d.ts +9 -3
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.d.ts.map +1 -1
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.js +56 -5
- package/dist/src/planner/rules/aggregate/rule-groupby-fd-simplification.js.map +1 -1
- package/dist/src/planner/rules/cache/rule-materialized-view-rewrite.d.ts +39 -0
- package/dist/src/planner/rules/cache/rule-materialized-view-rewrite.d.ts.map +1 -0
- package/dist/src/planner/rules/cache/rule-materialized-view-rewrite.js +616 -0
- package/dist/src/planner/rules/cache/rule-materialized-view-rewrite.js.map +1 -0
- package/dist/src/planner/rules/cache/rule-scalar-cse.d.ts.map +1 -1
- package/dist/src/planner/rules/cache/rule-scalar-cse.js +8 -1
- package/dist/src/planner/rules/cache/rule-scalar-cse.js.map +1 -1
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.d.ts +8 -7
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.d.ts.map +1 -1
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.js +14 -21
- package/dist/src/planner/rules/distinct/rule-distinct-elimination.js.map +1 -1
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts +36 -0
- package/dist/src/planner/rules/join/equi-pair-extractor.d.ts.map +1 -1
- package/dist/src/planner/rules/join/equi-pair-extractor.js +42 -5
- package/dist/src/planner/rules/join/equi-pair-extractor.js.map +1 -1
- package/dist/src/planner/rules/join/rule-fanout-batched-outer.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-fanout-batched-outer.js +10 -0
- package/dist/src/planner/rules/join/rule-fanout-batched-outer.js.map +1 -1
- package/dist/src/planner/rules/join/rule-fanout-lookup-join.js +25 -9
- package/dist/src/planner/rules/join/rule-fanout-lookup-join.js.map +1 -1
- package/dist/src/planner/rules/join/rule-inner-join-existence-recovery.d.ts +130 -0
- package/dist/src/planner/rules/join/rule-inner-join-existence-recovery.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-inner-join-existence-recovery.js +206 -0
- package/dist/src/planner/rules/join/rule-inner-join-existence-recovery.js.map +1 -0
- package/dist/src/planner/rules/join/rule-join-elimination.d.ts +67 -14
- package/dist/src/planner/rules/join/rule-join-elimination.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-join-elimination.js +81 -25
- package/dist/src/planner/rules/join/rule-join-elimination.js.map +1 -1
- package/dist/src/planner/rules/join/rule-join-existence-pruning.d.ts +84 -0
- package/dist/src/planner/rules/join/rule-join-existence-pruning.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-join-existence-pruning.js +138 -0
- package/dist/src/planner/rules/join/rule-join-existence-pruning.js.map +1 -0
- package/dist/src/planner/rules/join/rule-join-greedy-commute.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-join-greedy-commute.js +19 -1
- package/dist/src/planner/rules/join/rule-join-greedy-commute.js.map +1 -1
- package/dist/src/planner/rules/join/rule-join-physical-selection.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-join-physical-selection.js +14 -2
- package/dist/src/planner/rules/join/rule-join-physical-selection.js.map +1 -1
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.js +5 -2
- package/dist/src/planner/rules/join/rule-lateral-top1-asof.js.map +1 -1
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js +4 -0
- package/dist/src/planner/rules/join/rule-monotonic-merge-join.js.map +1 -1
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.d.ts.map +1 -1
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.js +10 -0
- package/dist/src/planner/rules/join/rule-quickpick-enumeration.js.map +1 -1
- package/dist/src/planner/rules/join/rule-semijoin-existence-recovery.d.ts +286 -0
- package/dist/src/planner/rules/join/rule-semijoin-existence-recovery.d.ts.map +1 -0
- package/dist/src/planner/rules/join/rule-semijoin-existence-recovery.js +548 -0
- package/dist/src/planner/rules/join/rule-semijoin-existence-recovery.js.map +1 -0
- package/dist/src/planner/rules/parallel/rule-async-gather-union-all.d.ts.map +1 -1
- package/dist/src/planner/rules/parallel/rule-async-gather-union-all.js +9 -1
- package/dist/src/planner/rules/parallel/rule-async-gather-union-all.js.map +1 -1
- package/dist/src/planner/rules/parallel/rule-async-gather-zip-by-key.d.ts.map +1 -1
- package/dist/src/planner/rules/parallel/rule-async-gather-zip-by-key.js +7 -0
- package/dist/src/planner/rules/parallel/rule-async-gather-zip-by-key.js.map +1 -1
- package/dist/src/planner/rules/parallel/rule-eager-prefetch-probe.d.ts.map +1 -1
- package/dist/src/planner/rules/parallel/rule-eager-prefetch-probe.js +10 -1
- package/dist/src/planner/rules/parallel/rule-eager-prefetch-probe.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.js +10 -1
- package/dist/src/planner/rules/predicate/rule-aggregate-predicate-pushdown.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.js +18 -0
- package/dist/src/planner/rules/predicate/rule-empty-relation-folding.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.js +7 -0
- package/dist/src/planner/rules/predicate/rule-filter-contradiction.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.d.ts.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js +9 -0
- package/dist/src/planner/rules/predicate/rule-predicate-inference-equivalence.js.map +1 -1
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.js +13 -3
- package/dist/src/planner/rules/predicate/rule-predicate-pushdown.js.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.js +2 -2
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.js.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-projection-pruning.d.ts.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-projection-pruning.js +14 -0
- package/dist/src/planner/rules/retrieve/rule-projection-pruning.js.map +1 -1
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.d.ts +16 -0
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.d.ts.map +1 -1
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.js +47 -4
- package/dist/src/planner/rules/sort/rule-orderby-fd-pruning.js.map +1 -1
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js +8 -0
- package/dist/src/planner/rules/subquery/rule-anti-join-fk-empty.js.map +1 -1
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js +7 -0
- package/dist/src/planner/rules/subquery/rule-semi-join-fk-trivial.js.map +1 -1
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.d.ts.map +1 -1
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js +12 -0
- package/dist/src/planner/rules/subquery/rule-subquery-decorrelation.js.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.js +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.js.map +1 -1
- package/dist/src/planner/type-utils.d.ts +14 -0
- package/dist/src/planner/type-utils.d.ts.map +1 -1
- package/dist/src/planner/type-utils.js +66 -21
- package/dist/src/planner/type-utils.js.map +1 -1
- package/dist/src/planner/util/fd-utils.d.ts +228 -36
- package/dist/src/planner/util/fd-utils.d.ts.map +1 -1
- package/dist/src/planner/util/fd-utils.js +501 -84
- package/dist/src/planner/util/fd-utils.js.map +1 -1
- package/dist/src/planner/util/ind-utils.d.ts +27 -1
- package/dist/src/planner/util/ind-utils.d.ts.map +1 -1
- package/dist/src/planner/util/ind-utils.js +80 -6
- package/dist/src/planner/util/ind-utils.js.map +1 -1
- package/dist/src/planner/util/key-utils.d.ts +26 -3
- package/dist/src/planner/util/key-utils.d.ts.map +1 -1
- package/dist/src/planner/util/key-utils.js +182 -33
- package/dist/src/planner/util/key-utils.js.map +1 -1
- package/dist/src/planner/util/set-op-wrapper.d.ts +37 -0
- package/dist/src/planner/util/set-op-wrapper.d.ts.map +1 -0
- package/dist/src/planner/util/set-op-wrapper.js +82 -0
- package/dist/src/planner/util/set-op-wrapper.js.map +1 -0
- package/dist/src/planner/validation/plan-validator.d.ts.map +1 -1
- package/dist/src/planner/validation/plan-validator.js +1 -0
- package/dist/src/planner/validation/plan-validator.js.map +1 -1
- package/dist/src/runtime/context-helpers.d.ts +13 -1
- package/dist/src/runtime/context-helpers.d.ts.map +1 -1
- package/dist/src/runtime/context-helpers.js +7 -1
- package/dist/src/runtime/context-helpers.js.map +1 -1
- package/dist/src/runtime/delta-executor.d.ts +30 -1
- package/dist/src/runtime/delta-executor.d.ts.map +1 -1
- package/dist/src/runtime/delta-executor.js +38 -4
- package/dist/src/runtime/delta-executor.js.map +1 -1
- package/dist/src/runtime/emit/add-constraint.d.ts.map +1 -1
- package/dist/src/runtime/emit/add-constraint.js +38 -5
- package/dist/src/runtime/emit/add-constraint.js.map +1 -1
- package/dist/src/runtime/emit/aggregate.d.ts.map +1 -1
- package/dist/src/runtime/emit/aggregate.js +10 -8
- package/dist/src/runtime/emit/aggregate.js.map +1 -1
- package/dist/src/runtime/emit/alter-table.d.ts +1 -1
- package/dist/src/runtime/emit/alter-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-table.js +664 -108
- package/dist/src/runtime/emit/alter-table.js.map +1 -1
- package/dist/src/runtime/emit/analyze.d.ts.map +1 -1
- package/dist/src/runtime/emit/analyze.js +2 -1
- package/dist/src/runtime/emit/analyze.js.map +1 -1
- package/dist/src/runtime/emit/asof-scan.d.ts.map +1 -1
- package/dist/src/runtime/emit/asof-scan.js +24 -9
- package/dist/src/runtime/emit/asof-scan.js.map +1 -1
- package/dist/src/runtime/emit/asserted-keys.d.ts +13 -0
- package/dist/src/runtime/emit/asserted-keys.d.ts.map +1 -0
- package/dist/src/runtime/emit/asserted-keys.js +13 -0
- package/dist/src/runtime/emit/asserted-keys.js.map +1 -0
- package/dist/src/runtime/emit/between.d.ts.map +1 -1
- package/dist/src/runtime/emit/between.js +24 -19
- package/dist/src/runtime/emit/between.js.map +1 -1
- package/dist/src/runtime/emit/binary.d.ts.map +1 -1
- package/dist/src/runtime/emit/binary.js +24 -36
- package/dist/src/runtime/emit/binary.js.map +1 -1
- package/dist/src/runtime/emit/block.d.ts.map +1 -1
- package/dist/src/runtime/emit/block.js +11 -2
- package/dist/src/runtime/emit/block.js.map +1 -1
- package/dist/src/runtime/emit/bloom-join.d.ts.map +1 -1
- package/dist/src/runtime/emit/bloom-join.js +12 -4
- package/dist/src/runtime/emit/bloom-join.js.map +1 -1
- package/dist/src/runtime/emit/constraint-check.d.ts.map +1 -1
- package/dist/src/runtime/emit/constraint-check.js +50 -1
- package/dist/src/runtime/emit/constraint-check.js.map +1 -1
- package/dist/src/runtime/emit/create-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-table.js +8 -0
- package/dist/src/runtime/emit/create-table.js.map +1 -1
- package/dist/src/runtime/emit/create-view.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-view.js +16 -1
- package/dist/src/runtime/emit/create-view.js.map +1 -1
- package/dist/src/runtime/emit/delete.d.ts.map +1 -1
- package/dist/src/runtime/emit/delete.js +15 -5
- package/dist/src/runtime/emit/delete.js.map +1 -1
- package/dist/src/runtime/emit/dml-executor.d.ts +27 -0
- package/dist/src/runtime/emit/dml-executor.d.ts.map +1 -1
- package/dist/src/runtime/emit/dml-executor.js +413 -193
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/drop-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-table.js +10 -0
- package/dist/src/runtime/emit/drop-table.js.map +1 -1
- package/dist/src/runtime/emit/drop-view.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-view.js +17 -0
- package/dist/src/runtime/emit/drop-view.js.map +1 -1
- package/dist/src/runtime/emit/envelope-scan.d.ts +13 -0
- package/dist/src/runtime/emit/envelope-scan.d.ts.map +1 -0
- package/dist/src/runtime/emit/envelope-scan.js +22 -0
- package/dist/src/runtime/emit/envelope-scan.js.map +1 -0
- package/dist/src/runtime/emit/join.d.ts +10 -2
- package/dist/src/runtime/emit/join.d.ts.map +1 -1
- package/dist/src/runtime/emit/join.js +128 -38
- package/dist/src/runtime/emit/join.js.map +1 -1
- package/dist/src/runtime/emit/lens-auxiliary-access.d.ts +16 -0
- package/dist/src/runtime/emit/lens-auxiliary-access.d.ts.map +1 -0
- package/dist/src/runtime/emit/lens-auxiliary-access.js +16 -0
- package/dist/src/runtime/emit/lens-auxiliary-access.js.map +1 -0
- package/dist/src/runtime/emit/materialized-view-helpers.d.ts +640 -0
- package/dist/src/runtime/emit/materialized-view-helpers.d.ts.map +1 -0
- package/dist/src/runtime/emit/materialized-view-helpers.js +2576 -0
- package/dist/src/runtime/emit/materialized-view-helpers.js.map +1 -0
- package/dist/src/runtime/emit/materialized-view.d.ts +31 -0
- package/dist/src/runtime/emit/materialized-view.d.ts.map +1 -0
- package/dist/src/runtime/emit/materialized-view.js +187 -0
- package/dist/src/runtime/emit/materialized-view.js.map +1 -0
- package/dist/src/runtime/emit/merge-join.d.ts.map +1 -1
- package/dist/src/runtime/emit/merge-join.js +19 -5
- package/dist/src/runtime/emit/merge-join.js.map +1 -1
- package/dist/src/runtime/emit/project.d.ts.map +1 -1
- package/dist/src/runtime/emit/project.js +10 -5
- package/dist/src/runtime/emit/project.js.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.d.ts +1 -0
- package/dist/src/runtime/emit/schema-declarative.d.ts.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.js +101 -5
- package/dist/src/runtime/emit/schema-declarative.js.map +1 -1
- package/dist/src/runtime/emit/set-object-tags.d.ts +16 -0
- package/dist/src/runtime/emit/set-object-tags.d.ts.map +1 -0
- package/dist/src/runtime/emit/set-object-tags.js +57 -0
- package/dist/src/runtime/emit/set-object-tags.js.map +1 -0
- package/dist/src/runtime/emit/set-operation.d.ts.map +1 -1
- package/dist/src/runtime/emit/set-operation.js +140 -24
- package/dist/src/runtime/emit/set-operation.js.map +1 -1
- package/dist/src/runtime/emit/subquery.d.ts.map +1 -1
- package/dist/src/runtime/emit/subquery.js +110 -5
- package/dist/src/runtime/emit/subquery.js.map +1 -1
- package/dist/src/runtime/emit/unary.d.ts.map +1 -1
- package/dist/src/runtime/emit/unary.js +34 -6
- package/dist/src/runtime/emit/unary.js.map +1 -1
- package/dist/src/runtime/emit/view-mutation.d.ts +70 -0
- package/dist/src/runtime/emit/view-mutation.d.ts.map +1 -0
- package/dist/src/runtime/emit/view-mutation.js +299 -0
- package/dist/src/runtime/emit/view-mutation.js.map +1 -0
- package/dist/src/runtime/emit/window.js +29 -5
- package/dist/src/runtime/emit/window.js.map +1 -1
- package/dist/src/runtime/foreign-key-actions.d.ts +66 -3
- package/dist/src/runtime/foreign-key-actions.d.ts.map +1 -1
- package/dist/src/runtime/foreign-key-actions.js +580 -172
- package/dist/src/runtime/foreign-key-actions.js.map +1 -1
- package/dist/src/runtime/parallel-driver.d.ts +4 -1
- package/dist/src/runtime/parallel-driver.d.ts.map +1 -1
- package/dist/src/runtime/parallel-driver.js +5 -1
- package/dist/src/runtime/parallel-driver.js.map +1 -1
- package/dist/src/runtime/register.d.ts.map +1 -1
- package/dist/src/runtime/register.js +17 -1
- package/dist/src/runtime/register.js.map +1 -1
- package/dist/src/runtime/types.d.ts +10 -0
- package/dist/src/runtime/types.d.ts.map +1 -1
- package/dist/src/runtime/types.js.map +1 -1
- package/dist/src/schema/basis-backfill.d.ts +63 -0
- package/dist/src/schema/basis-backfill.d.ts.map +1 -0
- package/dist/src/schema/basis-backfill.js +161 -0
- package/dist/src/schema/basis-backfill.js.map +1 -0
- package/dist/src/schema/catalog.d.ts +115 -1
- package/dist/src/schema/catalog.d.ts.map +1 -1
- package/dist/src/schema/catalog.js +249 -22
- package/dist/src/schema/catalog.js.map +1 -1
- package/dist/src/schema/change-events.d.ts +42 -1
- package/dist/src/schema/change-events.d.ts.map +1 -1
- package/dist/src/schema/change-events.js.map +1 -1
- package/dist/src/schema/column.d.ts +16 -0
- package/dist/src/schema/column.d.ts.map +1 -1
- package/dist/src/schema/column.js.map +1 -1
- package/dist/src/schema/constraint-builder.d.ts +182 -0
- package/dist/src/schema/constraint-builder.d.ts.map +1 -0
- package/dist/src/schema/constraint-builder.js +424 -0
- package/dist/src/schema/constraint-builder.js.map +1 -0
- package/dist/src/schema/ddl-generator.d.ts +86 -1
- package/dist/src/schema/ddl-generator.d.ts.map +1 -1
- package/dist/src/schema/ddl-generator.js +316 -20
- package/dist/src/schema/ddl-generator.js.map +1 -1
- package/dist/src/schema/declared-schema-manager.d.ts +51 -0
- package/dist/src/schema/declared-schema-manager.d.ts.map +1 -1
- package/dist/src/schema/declared-schema-manager.js +61 -0
- package/dist/src/schema/declared-schema-manager.js.map +1 -1
- package/dist/src/schema/derivation.d.ts +106 -0
- package/dist/src/schema/derivation.d.ts.map +1 -0
- package/dist/src/schema/derivation.js +25 -0
- package/dist/src/schema/derivation.js.map +1 -0
- package/dist/src/schema/function.d.ts +13 -0
- package/dist/src/schema/function.d.ts.map +1 -1
- package/dist/src/schema/function.js.map +1 -1
- package/dist/src/schema/lens-ack.d.ts +90 -0
- package/dist/src/schema/lens-ack.d.ts.map +1 -0
- package/dist/src/schema/lens-ack.js +361 -0
- package/dist/src/schema/lens-ack.js.map +1 -0
- package/dist/src/schema/lens-compiler.d.ts +62 -0
- package/dist/src/schema/lens-compiler.d.ts.map +1 -0
- package/dist/src/schema/lens-compiler.js +1594 -0
- package/dist/src/schema/lens-compiler.js.map +1 -0
- package/dist/src/schema/lens-fk-discovery.d.ts +175 -0
- package/dist/src/schema/lens-fk-discovery.d.ts.map +1 -0
- package/dist/src/schema/lens-fk-discovery.js +336 -0
- package/dist/src/schema/lens-fk-discovery.js.map +1 -0
- package/dist/src/schema/lens-prover.d.ts +336 -0
- package/dist/src/schema/lens-prover.d.ts.map +1 -0
- package/dist/src/schema/lens-prover.js +1988 -0
- package/dist/src/schema/lens-prover.js.map +1 -0
- package/dist/src/schema/lens.d.ts +254 -0
- package/dist/src/schema/lens.d.ts.map +1 -0
- package/dist/src/schema/lens.js +21 -0
- package/dist/src/schema/lens.js.map +1 -0
- package/dist/src/schema/manager.d.ts +676 -18
- package/dist/src/schema/manager.d.ts.map +1 -1
- package/dist/src/schema/manager.js +1573 -238
- package/dist/src/schema/manager.js.map +1 -1
- package/dist/src/schema/mapping-advertisement-tags.d.ts +39 -0
- package/dist/src/schema/mapping-advertisement-tags.d.ts.map +1 -0
- package/dist/src/schema/mapping-advertisement-tags.js +216 -0
- package/dist/src/schema/mapping-advertisement-tags.js.map +1 -0
- package/dist/src/schema/rename-rewriter.d.ts +45 -4
- package/dist/src/schema/rename-rewriter.d.ts.map +1 -1
- package/dist/src/schema/rename-rewriter.js +412 -19
- package/dist/src/schema/rename-rewriter.js.map +1 -1
- package/dist/src/schema/reserved-tags-policy.d.ts +32 -0
- package/dist/src/schema/reserved-tags-policy.d.ts.map +1 -0
- package/dist/src/schema/reserved-tags-policy.js +34 -0
- package/dist/src/schema/reserved-tags-policy.js.map +1 -0
- package/dist/src/schema/reserved-tags.d.ts +170 -0
- package/dist/src/schema/reserved-tags.d.ts.map +1 -0
- package/dist/src/schema/reserved-tags.js +507 -0
- package/dist/src/schema/reserved-tags.js.map +1 -0
- package/dist/src/schema/schema-differ.d.ts +158 -2
- package/dist/src/schema/schema-differ.d.ts.map +1 -1
- package/dist/src/schema/schema-differ.js +1460 -78
- package/dist/src/schema/schema-differ.js.map +1 -1
- package/dist/src/schema/schema-hasher.d.ts +8 -3
- package/dist/src/schema/schema-hasher.d.ts.map +1 -1
- package/dist/src/schema/schema-hasher.js +22 -2
- package/dist/src/schema/schema-hasher.js.map +1 -1
- package/dist/src/schema/schema.d.ts +25 -1
- package/dist/src/schema/schema.d.ts.map +1 -1
- package/dist/src/schema/schema.js +36 -2
- package/dist/src/schema/schema.js.map +1 -1
- package/dist/src/schema/table.d.ts +259 -10
- package/dist/src/schema/table.d.ts.map +1 -1
- package/dist/src/schema/table.js +309 -26
- package/dist/src/schema/table.js.map +1 -1
- package/dist/src/schema/unique-enforcement.d.ts +78 -0
- package/dist/src/schema/unique-enforcement.d.ts.map +1 -0
- package/dist/src/schema/unique-enforcement.js +93 -0
- package/dist/src/schema/unique-enforcement.js.map +1 -0
- package/dist/src/schema/view.d.ts +83 -2
- package/dist/src/schema/view.d.ts.map +1 -1
- package/dist/src/schema/view.js +67 -1
- package/dist/src/schema/view.js.map +1 -1
- package/dist/src/schema/window-function.d.ts +9 -1
- package/dist/src/schema/window-function.d.ts.map +1 -1
- package/dist/src/schema/window-function.js.map +1 -1
- package/dist/src/types/temporal-types.d.ts.map +1 -1
- package/dist/src/types/temporal-types.js +71 -36
- package/dist/src/types/temporal-types.js.map +1 -1
- package/dist/src/util/comparison.d.ts +24 -0
- package/dist/src/util/comparison.d.ts.map +1 -1
- package/dist/src/util/comparison.js +34 -0
- package/dist/src/util/comparison.js.map +1 -1
- package/dist/src/util/mutation-statement.d.ts.map +1 -1
- package/dist/src/util/mutation-statement.js +4 -1
- package/dist/src/util/mutation-statement.js.map +1 -1
- package/dist/src/util/serialization.d.ts +9 -0
- package/dist/src/util/serialization.d.ts.map +1 -1
- package/dist/src/util/serialization.js +26 -0
- package/dist/src/util/serialization.js.map +1 -1
- package/dist/src/vtab/backing-host.d.ts +286 -0
- package/dist/src/vtab/backing-host.d.ts.map +1 -0
- package/dist/src/vtab/backing-host.js +118 -0
- package/dist/src/vtab/backing-host.js.map +1 -0
- package/dist/src/vtab/best-access-plan.d.ts +21 -0
- package/dist/src/vtab/best-access-plan.d.ts.map +1 -1
- package/dist/src/vtab/best-access-plan.js.map +1 -1
- package/dist/src/vtab/capabilities.d.ts +5 -5
- package/dist/src/vtab/capabilities.d.ts.map +1 -1
- package/dist/src/vtab/mapping-advertisement.d.ts +163 -0
- package/dist/src/vtab/mapping-advertisement.d.ts.map +1 -0
- package/dist/src/vtab/mapping-advertisement.js +2 -0
- package/dist/src/vtab/mapping-advertisement.js.map +1 -0
- package/dist/src/vtab/memory/index.d.ts +64 -4
- package/dist/src/vtab/memory/index.d.ts.map +1 -1
- package/dist/src/vtab/memory/index.js +119 -12
- package/dist/src/vtab/memory/index.js.map +1 -1
- package/dist/src/vtab/memory/layer/base.d.ts +38 -1
- package/dist/src/vtab/memory/layer/base.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/base.js +112 -24
- package/dist/src/vtab/memory/layer/base.js.map +1 -1
- package/dist/src/vtab/memory/layer/manager.d.ts +291 -4
- package/dist/src/vtab/memory/layer/manager.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.js +1050 -91
- package/dist/src/vtab/memory/layer/manager.js.map +1 -1
- package/dist/src/vtab/memory/layer/plan-filter.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/plan-filter.js +35 -6
- package/dist/src/vtab/memory/layer/plan-filter.js.map +1 -1
- package/dist/src/vtab/memory/layer/scan-layer.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/scan-layer.js +66 -14
- package/dist/src/vtab/memory/layer/scan-layer.js.map +1 -1
- package/dist/src/vtab/memory/layer/scan-plan.d.ts +14 -0
- package/dist/src/vtab/memory/layer/scan-plan.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/scan-plan.js +27 -4
- package/dist/src/vtab/memory/layer/scan-plan.js.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/transaction.js +5 -1
- package/dist/src/vtab/memory/layer/transaction.js.map +1 -1
- package/dist/src/vtab/memory/module.d.ts +17 -0
- package/dist/src/vtab/memory/module.d.ts.map +1 -1
- package/dist/src/vtab/memory/module.js +82 -3
- package/dist/src/vtab/memory/module.js.map +1 -1
- package/dist/src/vtab/memory/table.d.ts.map +1 -1
- package/dist/src/vtab/memory/table.js +15 -5
- package/dist/src/vtab/memory/table.js.map +1 -1
- package/dist/src/vtab/memory/types.d.ts +20 -2
- package/dist/src/vtab/memory/types.d.ts.map +1 -1
- package/dist/src/vtab/memory/utils/predicate.d.ts.map +1 -1
- package/dist/src/vtab/memory/utils/predicate.js +46 -24
- package/dist/src/vtab/memory/utils/predicate.js.map +1 -1
- package/dist/src/vtab/memory/utils/primary-key-encode.d.ts +31 -0
- package/dist/src/vtab/memory/utils/primary-key-encode.d.ts.map +1 -0
- package/dist/src/vtab/memory/utils/primary-key-encode.js +101 -0
- package/dist/src/vtab/memory/utils/primary-key-encode.js.map +1 -0
- package/dist/src/vtab/memory/utils/primary-key.d.ts +8 -0
- package/dist/src/vtab/memory/utils/primary-key.d.ts.map +1 -1
- package/dist/src/vtab/memory/utils/primary-key.js +12 -5
- package/dist/src/vtab/memory/utils/primary-key.js.map +1 -1
- package/dist/src/vtab/module.d.ts +203 -4
- package/dist/src/vtab/module.d.ts.map +1 -1
- package/dist/src/vtab/table.d.ts +9 -0
- package/dist/src/vtab/table.d.ts.map +1 -1
- package/dist/src/vtab/table.js.map +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import type { Database } from '../../core/database.js';
|
|
2
|
+
import { QuereusError } from '../../common/errors.js';
|
|
3
|
+
import { type Row, type SqlValue } from '../../common/types.js';
|
|
4
|
+
import type * as AST from '../../parser/ast.js';
|
|
5
|
+
import type { RelationalPlanNode } from '../../planner/nodes/plan-node.js';
|
|
6
|
+
import type { ColumnSchema } from '../../schema/column.js';
|
|
7
|
+
import { type TableSchema } from '../../schema/table.js';
|
|
8
|
+
import type { CoarsenedKeyInfo } from '../../schema/view.js';
|
|
9
|
+
import { computeBodyHash } from '../../schema/view.js';
|
|
10
|
+
import { type MaintainedTableSchema } from '../../schema/derivation.js';
|
|
11
|
+
import type { Schema } from '../../schema/schema.js';
|
|
12
|
+
import type { ResolveColumnInSource } from '../../schema/rename-rewriter.js';
|
|
13
|
+
import type { BackingHost } from '../../vtab/backing-host.js';
|
|
14
|
+
export { computeBodyHash };
|
|
15
|
+
/**
|
|
16
|
+
* Purpose-built diagnostic for a bag (duplicate-producing) materialized-view
|
|
17
|
+
* body. A v1 materialized view is a *keyed* derived relation: its body must
|
|
18
|
+
* produce a **set** (no duplicate rows under the backing-table key). This
|
|
19
|
+
* replaces the raw `UNIQUE constraint failed: <backing table> PK` message —
|
|
20
|
+
* which named a hidden implementation detail — with one that names the MV and
|
|
21
|
+
* explains the contract. Raised at create (loud, immediate) or at the next
|
|
22
|
+
* refresh if a duplicate-free body later becomes duplicate-producing.
|
|
23
|
+
*/
|
|
24
|
+
export declare function materializedViewNotASetError(schemaName: string, viewName: string): QuereusError;
|
|
25
|
+
/** Backing-table column/PK/ordering shape derived from the optimized body relation. */
|
|
26
|
+
export interface BackingShape {
|
|
27
|
+
columns: ColumnSchema[];
|
|
28
|
+
primaryKey: ReadonlyArray<{
|
|
29
|
+
index: number;
|
|
30
|
+
desc: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
ordering?: ReadonlyArray<{
|
|
33
|
+
index: number;
|
|
34
|
+
desc: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/** Qualified (lowercased `schema.table`) source tables the body reads. */
|
|
37
|
+
sourceTables: string[];
|
|
38
|
+
/** Present when `primaryKey` is a **collation-coarsened lineage key** — the body
|
|
39
|
+
* has no provable key and the backing identity was derived from source-key
|
|
40
|
+
* lineage with at least one collation-weakened column (the parallel-migration
|
|
41
|
+
* shape — `deriveCoarsenedBackingKey`). Drives the create-time key-coarsening
|
|
42
|
+
* warning and the MV-record stamp. Absent when `keysOf` proved a key, when the
|
|
43
|
+
* lineage key does not coarsen, or when no key was derivable at all (the
|
|
44
|
+
* all-columns fallback; such a body is rejected at registration). */
|
|
45
|
+
coarsenedKey?: CoarsenedKeyInfo;
|
|
46
|
+
/** All minimal candidate keys proved by `keysOf` for the body root, as sorted
|
|
47
|
+
* column-index arrays. Present only when `keysOf` returned at least one key
|
|
48
|
+
* (i.e., not the coarsened-lineage or all-columns path). Used by
|
|
49
|
+
* `tryRecompileMaterializedViewLive` to check if the existing backing PK is
|
|
50
|
+
* still a superkey after a body-irrelevant constraint change. */
|
|
51
|
+
allProvedKeys?: ReadonlyArray<ReadonlyArray<number>>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Builds + optimizes the materialized-view body and derives the backing table's
|
|
55
|
+
* column list, primary key, body ordering, and source-table dependencies.
|
|
56
|
+
*
|
|
57
|
+
* Columns and types come straight from the optimized relation's
|
|
58
|
+
* {@link RelationalPlanNode.getType}; the PK is the first usable key from
|
|
59
|
+
* `keysOf` (all-columns fallback when none — such an MV is incremental-ineligible
|
|
60
|
+
* until Phase 2). Re-planning here is cheap relative to materialization and keeps
|
|
61
|
+
* the create/refresh emitters free of optimizer plumbing.
|
|
62
|
+
*/
|
|
63
|
+
export declare function deriveBackingShape(db: Database, bodySql: string, explicitColumns: ReadonlyArray<string> | undefined): BackingShape;
|
|
64
|
+
/**
|
|
65
|
+
* Computes the backing table's *physical* primary key. When the body carries an
|
|
66
|
+
* `order by`, the ordering columns lead the key so the btree clusters (and scans)
|
|
67
|
+
* in the body's order — "seeding the backing-table ordering" — with the logical
|
|
68
|
+
* key (from `keysOf`) appended as a uniqueness-preserving tiebreaker. Without an
|
|
69
|
+
* `order by`, the physical key is just the logical key.
|
|
70
|
+
*
|
|
71
|
+
* NOTE: this diverges from `TableDerivation.logicalKey`, which keeps the
|
|
72
|
+
* logical `keysOf` identity. The covering ticket replaces this seeding with a
|
|
73
|
+
* proper materialized index.
|
|
74
|
+
*/
|
|
75
|
+
export declare function computeBackingPrimaryKey(shape: BackingShape): ReadonlyArray<{
|
|
76
|
+
index: number;
|
|
77
|
+
desc: boolean;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Constructs the backing-table {@link TableSchema} for a materialized view from a
|
|
81
|
+
* derived {@link BackingShape}, hosted in `moduleName` (default `'memory'`).
|
|
82
|
+
* The capability check here is defense-in-depth — the create builder already
|
|
83
|
+
* gates, but the catalog-import path reaches this without it.
|
|
84
|
+
*/
|
|
85
|
+
export declare function buildBackingTableSchema(db: Database, schemaName: string, backingTableName: string, shape: BackingShape, moduleName?: string, moduleArgs?: Readonly<Record<string, SqlValue>>,
|
|
86
|
+
/** Table-level metadata tags (the MV's `with tags (…)` — top-level on the unified record). */
|
|
87
|
+
tags?: Readonly<Record<string, SqlValue>>): TableSchema;
|
|
88
|
+
/** Runs the body to completion and returns its rows (raw `Row` arrays). Uses the
|
|
89
|
+
* no-transaction-management primitive — the caller is already inside DDL execution. */
|
|
90
|
+
export declare function collectBodyRows(db: Database, bodySql: string): Promise<Row[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Everything needed to materialize an MV — identity, canonical DDL, and the body
|
|
93
|
+
* in both AST and canonical-SQL form. Satisfied by the create plan node
|
|
94
|
+
* (`CreateMaterializedViewNode`) and by a re-parsed catalog entry
|
|
95
|
+
* (`SchemaManager.importMaterializedView`).
|
|
96
|
+
*/
|
|
97
|
+
export interface MaterializeViewDefinition {
|
|
98
|
+
schemaName: string;
|
|
99
|
+
viewName: string;
|
|
100
|
+
/** Body AST — retained on the derivation for refresh, declarative emission, and body-hash. */
|
|
101
|
+
selectAst: AST.QueryExpr;
|
|
102
|
+
/** Canonical SQL of the body alone (re-planned here to derive and fill the backing). */
|
|
103
|
+
bodySql: string;
|
|
104
|
+
/** Explicit column list from `create materialized view mv(a, b) ...`, when present. */
|
|
105
|
+
columns?: ReadonlyArray<string>;
|
|
106
|
+
tags?: Readonly<Record<string, SqlValue>>;
|
|
107
|
+
/** Normalized backing-host module (absent ⇒ memory default — see
|
|
108
|
+
* `normalizeBackingModule` in schema/view.ts). */
|
|
109
|
+
backingModuleName?: string;
|
|
110
|
+
/** Backing-module args; recorded only when non-empty. */
|
|
111
|
+
backingModuleArgs?: Readonly<Record<string, SqlValue>>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Throws the sited declared-column-arity diagnostic when `def`'s explicit column
|
|
115
|
+
* list disagrees with the body's output arity. Build-time creation already
|
|
116
|
+
* validated this (with a build-located diagnostic); this guards the import path —
|
|
117
|
+
* both the refill arm ({@link materializeView}) and the adopt gate check
|
|
118
|
+
* (`SchemaManager.tryAdoptPreExistingBacking`, which must raise it BEFORE the
|
|
119
|
+
* caller drops a durable backing: the entry can never materialize, so dropping
|
|
120
|
+
* would destroy rows for nothing). The refresh path deliberately does NOT share
|
|
121
|
+
* this — it reaches a legitimate mismatch after a source ALTER and has its own
|
|
122
|
+
* "drop and recreate" diagnostic.
|
|
123
|
+
*/
|
|
124
|
+
export declare function assertDeclaredColumnArity(def: MaterializeViewDefinition, shape: BackingShape): void;
|
|
125
|
+
/**
|
|
126
|
+
* The materialize core shared by `emitCreateMaterializedView` and the
|
|
127
|
+
* catalog-import path (`SchemaManager.importMaterializedView`): derive the
|
|
128
|
+
* backing shape from the planned body → create the maintained table under the
|
|
129
|
+
* MV's own name in the declared backing-host module (memory default) → fill it
|
|
130
|
+
* from the body → attach the {@link TableDerivation} → compile + register
|
|
131
|
+
* row-time write-through maintenance. Returns the registered maintained table.
|
|
132
|
+
*
|
|
133
|
+
* Fires `table_added` for the table (it is created like any table) but
|
|
134
|
+
* deliberately does NOT fire `materialized_view_added` — the create emitter
|
|
135
|
+
* notifies after this returns, while import stays silent (a store rehydrating
|
|
136
|
+
* its own catalog must not re-emit persistence events).
|
|
137
|
+
*
|
|
138
|
+
* Rollback-on-throw: a fill failure (including the "must be a set"
|
|
139
|
+
* duplicate-key gate) drops the half-built table; a registration failure (the
|
|
140
|
+
* mandatory row-time eligibility gate runs there) drops the table — derivation
|
|
141
|
+
* and all — either way the schema is left exactly as before the call.
|
|
142
|
+
* Existence/collision checks are the caller's job (the create emitter checks
|
|
143
|
+
* before calling; on import a duplicate surfaces as a table-name conflict).
|
|
144
|
+
*
|
|
145
|
+
* `preDerivedShape` short-circuits the shape derivation for a caller that
|
|
146
|
+
* already planned the body (the import path derives it once for its gates).
|
|
147
|
+
*/
|
|
148
|
+
export declare function materializeView(db: Database, def: MaterializeViewDefinition, preDerivedShape?: BackingShape): Promise<MaintainedTableSchema>;
|
|
149
|
+
/**
|
|
150
|
+
* The adopt-without-refill counterpart of {@link materializeView}: the
|
|
151
|
+
* registration tail without create+fill, for the catalog-import path
|
|
152
|
+
* (`SchemaManager.importMaterializedView`) when a pre-existing durable backing
|
|
153
|
+
* passed every adopt gate (same module, shape match, all sources same-module
|
|
154
|
+
* with upstream maintained tables themselves adopted, caller-attested
|
|
155
|
+
* `trustBackings`). The table's rows are trusted as-is — no body execution.
|
|
156
|
+
*
|
|
157
|
+
* **Backing schema re-stamp.** `preExisting` is a phase-1 DDL round-trip and
|
|
158
|
+
* loses ScalarType fidelity the refill path would carry (the registry-interned
|
|
159
|
+
* logical types survive only by name in DDL). Re-registering the body-derived
|
|
160
|
+
* {@link buildBackingTableSchema} result — shape-verified identical by the
|
|
161
|
+
* caller's `backingShapeMatches` gate — makes post-adopt state equivalent to
|
|
162
|
+
* post-refill state for the row-time plan `registerMaterializedView` binds.
|
|
163
|
+
* Module identity/args come from `def` exactly as the refill path's
|
|
164
|
+
* `buildBackingTableSchema` call does (gate 1 verified the registered module
|
|
165
|
+
* matches); `estimatedRows` carries over from the registered schema (the rows
|
|
166
|
+
* are preserved, so the prior estimate stays truthful). The module-side LIVE
|
|
167
|
+
* table instance still caches the phase-1 schema — the importing host
|
|
168
|
+
* reconciles it after import (the store module's `rehydrateCatalog` runs
|
|
169
|
+
* `StoreTable.updateSchema` over every connected table); reads are unaffected
|
|
170
|
+
* either way since the shapes are identical.
|
|
171
|
+
*
|
|
172
|
+
* Rollback on a registration failure (the mandatory row-time eligibility gate
|
|
173
|
+
* runs there): unlink + detach the derivation + rethrow — the table stays
|
|
174
|
+
* REGISTERED, reverting to its plain (derivation-less) state. Dropping a
|
|
175
|
+
* durable backing on a registration error would destroy the very rows a later
|
|
176
|
+
* retry could adopt; the caller records the throw as a per-entry rehydration
|
|
177
|
+
* error.
|
|
178
|
+
*/
|
|
179
|
+
export declare function adoptMaterializedView(db: Database, def: MaterializeViewDefinition, preExisting: TableSchema, shape: BackingShape): Promise<MaintainedTableSchema>;
|
|
180
|
+
/**
|
|
181
|
+
* The attach core shared by `alter table … set maintained as` (fresh attach and
|
|
182
|
+
* re-attach) and `create table … maintained as` (attach-to-empty, via
|
|
183
|
+
* {@link createMaintainedTable}): verify-by-diff, never trust, never refill
|
|
184
|
+
* wholesale.
|
|
185
|
+
*
|
|
186
|
+
* Sequence — every gate runs BEFORE any catalog or data mutation:
|
|
187
|
+
* 1. backing-host capability (defense-in-depth; the builders gate with a sited
|
|
188
|
+
* error);
|
|
189
|
+
* 2. derive the body's shape (rewrite-suppressed) and run the STRICT
|
|
190
|
+
* declared-shape check ({@link describeAttachShapeMismatch} — names
|
|
191
|
+
* included);
|
|
192
|
+
* 3. cycle / self-reference check over the live derivation graph;
|
|
193
|
+
* 4. evaluate the body once and reject duplicate derived keys (the loud
|
|
194
|
+
* "must be a set" reject);
|
|
195
|
+
* 5. catalog flip (`attachDerivation`) + maintenance registration — the
|
|
196
|
+
* create-time gates (determinism, keyed-or-coarsened body, full-rebuild
|
|
197
|
+
* size threshold) run inside `registerMaterializedView`, before any row is
|
|
198
|
+
* written; a throw restores the prior record (and the prior plan, on
|
|
199
|
+
* re-attach);
|
|
200
|
+
* 6. reconcile-by-diff: one `'replace-all'` op against the table's effective
|
|
201
|
+
* contents through the backing host — collation-aware pairing,
|
|
202
|
+
* byte-faithful identical-row skip, so identical content writes nothing and
|
|
203
|
+
* divergence resolves derived-wins with the minimal genuine
|
|
204
|
+
* {@link BackingRowChange}s. The writes land in the connection's PENDING
|
|
205
|
+
* state, committing/rolling back in lockstep with the statement;
|
|
206
|
+
* 7. covering links (clear the prior body's, stamp the new body's), cascade
|
|
207
|
+
* the genuine changes to consumer maintained tables, fire
|
|
208
|
+
* `materialized_view_added` (fresh) / `materialized_view_modified`
|
|
209
|
+
* (re-attach) so store catalogs re-persist the canonical table-form DDL,
|
|
210
|
+
* and surface the key-coarsening warning exactly as create does.
|
|
211
|
+
*
|
|
212
|
+
* `recordedColumns` is recorded verbatim as `derivation.columns` (the lossless
|
|
213
|
+
* implicit/explicit signal the persist + import paths already use): the authored
|
|
214
|
+
* column names for the explicit forms — `create table … maintained (columns) as`
|
|
215
|
+
* AND the re-attach verb `set maintained (columns) as` — or `undefined` for the
|
|
216
|
+
* implicit forms — `create table … maintained as` (which reshapes its source on
|
|
217
|
+
* reopen) AND the implicit re-attach verb `set maintained as` (which reshapes to
|
|
218
|
+
* follow the body's natural names). When `positionalRename` is set — every
|
|
219
|
+
* explicit form — the body outputs are renamed positionally to `recordedColumns`
|
|
220
|
+
* and the per-column name check is skipped (the authored list is the authoritative
|
|
221
|
+
* output-name vector); otherwise the strict declared-shape check (names included)
|
|
222
|
+
* applies. `buildTableDerivation` hashes `recordedColumns` into `bodyHash`, so
|
|
223
|
+
* live exec and catalog import of the same canonical DDL agree on both the record
|
|
224
|
+
* and the hash — making attach/create → persist → reopen a fixed point.
|
|
225
|
+
*
|
|
226
|
+
* An explicit list whose arity disagrees with the body raises a sited error (the
|
|
227
|
+
* list-vs-body arity guard) before anything is recorded — `deriveBackingShape`
|
|
228
|
+
* sizes the shape to the body, so a surplus/short list would otherwise persist a
|
|
229
|
+
* miscounted `derivation.columns`.
|
|
230
|
+
*
|
|
231
|
+
* **Reshape-on-attach (`allowReshape`).** The verb path (`set maintained [(cols)]
|
|
232
|
+
* as` — manual AND differ-emitted) passes `allowReshape = true`; create and any
|
|
233
|
+
* non-verb caller pass `false` and keep the strict declared-shape error. Two
|
|
234
|
+
* reshape triggers, both reusing the two-phase splice + restore handlers below:
|
|
235
|
+
*
|
|
236
|
+
* - **Implicit call** (no rename list): on a strict-shape mismatch the backing
|
|
237
|
+
* reshapes in place to follow the body's natural names — the same "the body
|
|
238
|
+
* owns an implicit table's shape" contract the refresh reshape and the implicit
|
|
239
|
+
* table form's reopen honor. Now permitted over a prior-EXPLICIT record too:
|
|
240
|
+
* `set maintained as <body>` over an `(a, b)` table abandons the authored list
|
|
241
|
+
* and relabels the backing to the body's names, recording an implicit
|
|
242
|
+
* derivation (the deliberate "go implicit" re-attach).
|
|
243
|
+
* - **Explicit call** (`positionalRename`): a same-arity output-NAME drift
|
|
244
|
+
* `(a, b) → (a, c)` produces no strict mismatch (names are skipped), yet the
|
|
245
|
+
* backing must be relabeled to the recorded names — classified as a reshape.
|
|
246
|
+
* The derived shape carries the TARGET names, so {@link classifyBackingReshape}
|
|
247
|
+
* emits a pure positional RENAME (`b → c`); a renamed PK output column is
|
|
248
|
+
* matched through the rename map (not a key change). A count/type/PK delta is
|
|
249
|
+
* still the strict error, and a reorder/swap (`(a, b) → (b, a)`) classifies as
|
|
250
|
+
* inexpressible.
|
|
251
|
+
*
|
|
252
|
+
* An inexpressible delta (interleave / physical-PK change, or a host module
|
|
253
|
+
* without `alterTable`) raises {@link inexpressibleReshapeError} with the table
|
|
254
|
+
* untouched. An expressible plan splices around the verify-by-diff reconcile —
|
|
255
|
+
* see the sequencing notes inside.
|
|
256
|
+
*/
|
|
257
|
+
export declare function attachMaintainedDerivation(db: Database, table: TableSchema, select: AST.QueryExpr, recordedColumns: ReadonlyArray<string> | undefined, positionalRename?: boolean, allowReshape?: boolean,
|
|
258
|
+
/**
|
|
259
|
+
* When true, a FAILED FRESH attach discards (via {@link VirtualTableModule.discardBackingForAttach})
|
|
260
|
+
* any backing store {@link VirtualTableModule.ensureBackingForAttach} created IN
|
|
261
|
+
* THIS attach. Set by the `set maintained` ATTACH verb ({@link runSetMaintained}),
|
|
262
|
+
* which owns its own backing cleanup. NOT set by `create table … maintained`
|
|
263
|
+
* ({@link createMaintainedTable}) — there the store was created by the prior
|
|
264
|
+
* `createTable(preferBacking)`, and the create path's own `dropTable` cleanup
|
|
265
|
+
* retires it; a discard here would double-drop and strand the catalog entry.
|
|
266
|
+
*/
|
|
267
|
+
discardBackingOnFailure?: boolean): Promise<MaintainedTableSchema>;
|
|
268
|
+
/**
|
|
269
|
+
* Detach a maintained table's derivation — `alter table … drop maintained`.
|
|
270
|
+
* Catalog-only: nothing physical changes. The row-time plan is released, the
|
|
271
|
+
* covering-structure link un-stamped (UNIQUE enforcement falls back to the
|
|
272
|
+
* auto-index), and the registered record swapped for the same table minus the
|
|
273
|
+
* derivation — rows, indexes, module identity, and tags all stay; staleness
|
|
274
|
+
* state lives on the derivation and leaves with it. The table becomes ordinary
|
|
275
|
+
* and user-writable.
|
|
276
|
+
*
|
|
277
|
+
* Fires `materialized_view_removed` ONLY: the maintenance manager releases any
|
|
278
|
+
* remaining plan, store catalogs delete the persisted maintained entry (a
|
|
279
|
+
* store-hosted table's plain bundle is already clause-free), and cached
|
|
280
|
+
* statement plans over the table invalidate (a cached write-through plan
|
|
281
|
+
* compiled against the old derivation must not survive the flip). Deliberately
|
|
282
|
+
* NO `table_modified`: the table's shape and rows are unchanged, so consumer
|
|
283
|
+
* maintained tables reading it stay live — subsequent user writes drive their
|
|
284
|
+
* maintenance exactly like any source write.
|
|
285
|
+
*/
|
|
286
|
+
export declare function detachMaintainedDerivation(db: Database, mv: MaintainedTableSchema): TableSchema;
|
|
287
|
+
/**
|
|
288
|
+
* `create table … maintained as <body>` — the declared-shape authoring form,
|
|
289
|
+
* executed all-or-nothing:
|
|
290
|
+
*
|
|
291
|
+
* - an existing table/view + `if not exists` skips ENTIRELY (never a
|
|
292
|
+
* half-attach); without it, the standard already-exists error — both before
|
|
293
|
+
* the body is planned;
|
|
294
|
+
* - the declared shape is verified against the derived body shape BEFORE any
|
|
295
|
+
* catalog registration ({@link SchemaManager.buildDeclaredTableSchema} builds
|
|
296
|
+
* the schema the CREATE would register, without registering it);
|
|
297
|
+
* - then the table registers through the ordinary `createTable` path (declared
|
|
298
|
+
* constraints and defaults intact) and the shared {@link attachMaintainedDerivation}
|
|
299
|
+
* core runs — attach-to-empty: the reconcile diff against an empty table IS
|
|
300
|
+
* the fill, applied to the connection's pending state so it commits in
|
|
301
|
+
* lockstep with the statement (no `replaceContents` commit-first caveat);
|
|
302
|
+
* - any failure past registration (duplicate derived keys, a maintenance gate)
|
|
303
|
+
* drops the just-created table — the schema is left exactly as before.
|
|
304
|
+
*
|
|
305
|
+
* The attach core re-derives the body AFTER the table registers, so a body that
|
|
306
|
+
* resolves differently once the new name exists (e.g. a same-name reference that
|
|
307
|
+
* becomes a self-reference) is caught by the cycle check and rolled back.
|
|
308
|
+
*/
|
|
309
|
+
export declare function createMaintainedTable(db: Database, stmt: AST.CreateTableStmt): Promise<MaintainedTableSchema | undefined>;
|
|
310
|
+
/**
|
|
311
|
+
* Full-rebuild of a maintained table's contents: re-run the body to completion
|
|
312
|
+
* and swap the table to the recomputed set. The always-correct path the two
|
|
313
|
+
* `refresh materialized view` arms funnel through — the fast (data-only) path
|
|
314
|
+
* (`backingShapeMatches` ⇒ direct `rebuildBacking`) and the reshape arm
|
|
315
|
+
* (`reshapeBackingInPlace`, between its pre- and post-reconcile structural ops).
|
|
316
|
+
* It is used by NOTHING else: create/import (`materializeView`) calls
|
|
317
|
+
* `replaceContents` directly, and the incremental manager's full-rebuild arm
|
|
318
|
+
* (`applyFullRebuild` in `core/database-materialized-views.ts`) does its own
|
|
319
|
+
* `applyMaintenance` + per-delta validation (`validateDerivedChanges`).
|
|
320
|
+
*
|
|
321
|
+
* **Constraint-bearing branch.** When the maintained table declares ≥1 applicable
|
|
322
|
+
* CHECK or (FK-enforcement-on) child-side FK ({@link hasApplicableConstraints}),
|
|
323
|
+
* the swap mirrors the attach core instead of calling `replaceContents`: reject
|
|
324
|
+
* duplicate derived keys ({@link assertRefreshRowsAreSet} — parity with
|
|
325
|
+
* `replaceContents`'s set gate), land the recomputed set in the connection's
|
|
326
|
+
* PENDING layer via `applyMaintenance('replace-all')`, run the eager bulk
|
|
327
|
+
* anti-join / `not (<check>)` scan ({@link validateDeclaredConstraintsOverContents})
|
|
328
|
+
* which throws the maintained-table-attributed CONSTRAINT diagnostic on the first
|
|
329
|
+
* violator BEFORE the swap is committed (the failing statement unwinds and the
|
|
330
|
+
* pending reconcile is discarded by statement-level rollback — the pre-refresh
|
|
331
|
+
* COMMITTED contents stay intact), then `conn.commit()`.
|
|
332
|
+
*
|
|
333
|
+
* The commit is **commit-first parity** and load-bearing two ways: (1)
|
|
334
|
+
* `replaceContents` already swaps committed state (a `begin; refresh; rollback`
|
|
335
|
+
* does NOT undo a refresh today), so committing here preserves that exact
|
|
336
|
+
* observable behavior; (2) on the reshape arm, `reshapeBackingInPlace`'s
|
|
337
|
+
* post-reconcile data-validating ops (retype/recollate/tighten-NOT-NULL) scan
|
|
338
|
+
* COMMITTED contents after this returns, so they must see the rebuilt rows —
|
|
339
|
+
* `replaceContents` gives that implicitly, the pending-layer branch matches it by
|
|
340
|
+
* committing (as the attach reshape path does before its own post-reconcile ops).
|
|
341
|
+
*
|
|
342
|
+
* The real-world trigger is a STALE table: a body-relevant source change released
|
|
343
|
+
* the MV's row-time plan, subsequent source writes drifted unvalidated, and a
|
|
344
|
+
* refresh recomputes that drifted set — so this scan is where a declared CHECK/FK
|
|
345
|
+
* is enforced over rows that never crossed the maintenance boundary. A
|
|
346
|
+
* continuously-maintained table re-derives an already-validated set, so the scan
|
|
347
|
+
* is redundant-but-cheap there.
|
|
348
|
+
*
|
|
349
|
+
* Constraint-less maintained tables and every MV-sugar backing take the untouched
|
|
350
|
+
* `replaceContents` fast path — no connection, no scan, byte-for-byte the prior
|
|
351
|
+
* behavior. The caller is responsible for staleness re-validation when relevant;
|
|
352
|
+
* this helper assumes the derivation body plans. Throws if the table is missing
|
|
353
|
+
* from the catalog.
|
|
354
|
+
*/
|
|
355
|
+
export declare function rebuildBacking(db: Database, mv: MaintainedTableSchema): Promise<void>;
|
|
356
|
+
/**
|
|
357
|
+
* True iff the live backing `TableSchema` is structurally identical to what the
|
|
358
|
+
* derived `shape` would build — so a `refresh` can take the data-only fast path
|
|
359
|
+
* (`rebuildBacking`, preserving the backing identity and warm caches) instead of
|
|
360
|
+
* rebuilding the backing table. Compares, in order:
|
|
361
|
+
* - column **count**;
|
|
362
|
+
* - per column: **name** (case-insensitive — matching the matcher's name compare),
|
|
363
|
+
* **logical type**, **not-null**, **collation**;
|
|
364
|
+
* - the **physical** PK ({@link computeBackingPrimaryKey} vs the backing's
|
|
365
|
+
* `primaryKeyDefinition`, by index + desc + collation, in order).
|
|
366
|
+
*
|
|
367
|
+
* Returns false when a source schema change has shifted the body's output shape
|
|
368
|
+
* (most visibly a `select *` body whose new source column interleaves into the
|
|
369
|
+
* output) — the caller then rebuilds the backing to match the re-planned body.
|
|
370
|
+
*/
|
|
371
|
+
export declare function backingShapeMatches(current: TableSchema, shape: BackingShape): boolean;
|
|
372
|
+
/**
|
|
373
|
+
* True when a `table_modified` event's old→new transition is **body-irrelevant**:
|
|
374
|
+
* same table name and schema, columns pairwise identical in every body-relevant
|
|
375
|
+
* field ({@link bodyRelevantColumnMatches}), and an identical physical primary
|
|
376
|
+
* key. Everything else may differ — `checkConstraints`, `foreignKeys`,
|
|
377
|
+
* `uniqueConstraints`, `indexes`, `statistics`, `estimatedRows`, `tags`,
|
|
378
|
+
* `primaryKeyDefaultConflict`, defaults. A qualifying event cannot change what a
|
|
379
|
+
* dependent body evaluates to, only what it compiles to — see the section note
|
|
380
|
+
* above for why dependents are recompiled rather than skipped.
|
|
381
|
+
*
|
|
382
|
+
* **Reference-equality guard (load-bearing coupling).** The MV manager's
|
|
383
|
+
* `emitBackingInvalidation` fires a synthetic `table_modified` on an MV's own
|
|
384
|
+
* backing with the SAME object as `oldObject` and `newObject` — the event that
|
|
385
|
+
* cascades staleness down MV-over-MV chains. It must classify as body-RELEVANT,
|
|
386
|
+
* hence `oldObject === newObject` short-circuits to false here. Every genuine
|
|
387
|
+
* emitter passes distinct old/new objects. If either side changes, change both
|
|
388
|
+
* (see the matching comment in `emitBackingInvalidation`,
|
|
389
|
+
* core/database-materialized-views.ts).
|
|
390
|
+
*/
|
|
391
|
+
export declare function isBodyIrrelevantTableChange(oldObject: TableSchema, newObject: TableSchema): boolean;
|
|
392
|
+
/**
|
|
393
|
+
* The set of source-column indices (in `qualifiedSource`'s POST-ALTER schema) that a
|
|
394
|
+
* materialized-view body **reads** — directly, through a predicate / join / group /
|
|
395
|
+
* order position, or transitively through a generated column. The disjointness half
|
|
396
|
+
* of the structural-ALTER content-stability gate (see the section note and
|
|
397
|
+
* {@link tryRecompileMaterializedViewLive}): a value-semantics change (type /
|
|
398
|
+
* collation) to a column NOT in this set cannot alter what the body evaluates to.
|
|
399
|
+
*
|
|
400
|
+
* **Why the un-optimized built plan, not `db.getPlan`.** The optimizer can absorb a
|
|
401
|
+
* `where v = 'x'` predicate into an access-method seek key, dropping the explicit
|
|
402
|
+
* {@link ColumnReferenceNode} from the tree — walking the optimized plan would MISS
|
|
403
|
+
* that reference and falsely conclude disjoint (UNSOUND). The un-optimized built plan
|
|
404
|
+
* (`db._buildPlan`) carries every reference explicitly in its projection / filter /
|
|
405
|
+
* join / group / order nodes. Over-approximation is the safe direction: an extra
|
|
406
|
+
* column in the read set only ever causes MORE staleness, never an unsound keep-live.
|
|
407
|
+
*
|
|
408
|
+
* Mechanics: walk the built tree (children AND relations, like {@link collectSourceTables},
|
|
409
|
+
* so nested subqueries / EXISTS / correlated refs are reached) collecting every
|
|
410
|
+
* `ColumnReferenceNode.attributeId`; for every `TableReferenceNode` whose qualified
|
|
411
|
+
* name equals `qualifiedSource` (several for a self-join) map the collected attribute
|
|
412
|
+
* ids back to its column indices via `getAttributes()`; union over occurrences. Then
|
|
413
|
+
* expand the set DOWNWARD through `generatedColumnDependencies` to a fixed point —
|
|
414
|
+
* reading a generated column reads its dependency columns even when the body never
|
|
415
|
+
* names them (safe whether or not the planner inlines generated columns: if it does,
|
|
416
|
+
* the dep already appears as a direct reference and the closure is a no-op; if it
|
|
417
|
+
* does not, the closure is load-bearing).
|
|
418
|
+
*
|
|
419
|
+
* The rewrite is suppressed for the same reason {@link deriveBackingShape} suppresses
|
|
420
|
+
* it. Any exception propagates to {@link tryRecompileMaterializedViewLive}'s try/catch,
|
|
421
|
+
* which treats a failed analysis as "could not prove disjoint" ⇒ stale (the safe
|
|
422
|
+
* default) — it must never be swallowed into a false "disjoint" conclusion.
|
|
423
|
+
*/
|
|
424
|
+
export declare function referencedSourceColumns(db: Database, bodySql: string, qualifiedSource: string): Set<number>;
|
|
425
|
+
/**
|
|
426
|
+
* Recompile a LIVE materialized view's row-time plan in place after a **genuine**
|
|
427
|
+
* source `table_modified` (`oldObject !== newObject` — constraint/stats/tags-only OR
|
|
428
|
+
* structural ADD/DROP/ALTER COLUMN), gated by shape re-derivation and — for a
|
|
429
|
+
* structural value-semantics change — a content-stability proof. The same discipline
|
|
430
|
+
* as {@link restoreUnaffectedMaterializedViews}. Fully synchronous (the schema-change
|
|
431
|
+
* listener is sync; shape derivation, schema lookups, the disjointness analysis, and
|
|
432
|
+
* registration all are). Never throws: logs and returns `false` on any failure, and
|
|
433
|
+
* the caller falls back to the mark-stale path. On success the MV stays live —
|
|
434
|
+
* `stale` untouched, row-time plan rebuilt against the new catalog, no backing
|
|
435
|
+
* invalidation (the backing stays maintained, so cached plans reading it remain
|
|
436
|
+
* correct).
|
|
437
|
+
*
|
|
438
|
+
* **Structural-ALTER soundness (why a recompile is not enough on its own).** For a
|
|
439
|
+
* constraint-only change, re-derived backing-shape identity IMPLIES content identity —
|
|
440
|
+
* a constraint cannot change what stored rows the body evaluates to, only what the
|
|
441
|
+
* body compiles to. For a structural ALTER that argument does NOT carry: shape
|
|
442
|
+
* identity ⇏ content identity. `alter column v set collate nocase` / `set data type`
|
|
443
|
+
* on a column the body reads only in a WHERE / join / group / order position leaves
|
|
444
|
+
* the output shape identical while changing the admitted row set — the backing content
|
|
445
|
+
* diverges from a fresh body evaluation. So the structural keep-live adds a final
|
|
446
|
+
* **content-stability gate** proving the change's value-semantics-changed columns are
|
|
447
|
+
* disjoint from everything the body reads (the {@link valueSemanticsChangedColumns} ∩
|
|
448
|
+
* {@link referencedSourceColumns} proof). That changed set is EMPTY for constraint-only,
|
|
449
|
+
* ADD, DROP, NOT NULL, and DEFAULT changes, so the proof is a no-op there and preserves
|
|
450
|
+
* today's behavior exactly; it does real work only for ALTER COLUMN type/collation.
|
|
451
|
+
*
|
|
452
|
+
* Gates, in order — each failure is a stale fallback:
|
|
453
|
+
* 1. `deriveBackingShape` throws when the body no longer plans against the
|
|
454
|
+
* post-change catalog (e.g. a rename-cascade constraint rewrite observed
|
|
455
|
+
* mid-statement, while a co-source's rename has landed but this MV's body
|
|
456
|
+
* rewrite has not — the rename propagation's own MV loop restores it later).
|
|
457
|
+
* A DROP COLUMN the body references directly throws here too.
|
|
458
|
+
* 2. `sameSourceTables`: the re-planned source set must equal the recorded one.
|
|
459
|
+
* An FK drop can un-eliminate a previously FK/PK-eliminated join (growing
|
|
460
|
+
* the set); a constraint change can let `ruleFilterContradiction` fold a
|
|
461
|
+
* source out of the plan entirely (shrinking it). Either way the record is
|
|
462
|
+
* out of sync with the body's plan — leave it to REFRESH, which re-derives.
|
|
463
|
+
* 3. `backingColumnsStructurallyMatch` + `isBackingPkASuperkeyInShape`: the column
|
|
464
|
+
* structural attributes (type / not-null / collation) must match positionally,
|
|
465
|
+
* AND the live backing's physical PK column set must be a superkey of the
|
|
466
|
+
* re-planned body (some proved minimal key ⊆ backing PK columns). This forces
|
|
467
|
+
* staleness when a dropped UNIQUE un-proves the recorded backing key (`keysOf`
|
|
468
|
+
* falls back to a smaller key or all-columns → no proved key ⊆ old PK). An
|
|
469
|
+
* ADD CONSTRAINT UNIQUE that subsumes the compound key passes: the new minimal
|
|
470
|
+
* key is a subset of the old compound backing PK. A `select *` body over an
|
|
471
|
+
* ADD/DROP COLUMN reshapes its output here ⇒ shape mismatch ⇒ stale. A PROJECTED
|
|
472
|
+
* column whose type/collation changed shifts the output column ⇒ shape mismatch
|
|
473
|
+
* ⇒ stale. Re-registers with the EXISTING backing (PK unchanged) on a pass.
|
|
474
|
+
* 4. Content-stability gate (structural value-semantics ALTER only — see above):
|
|
475
|
+
* if any value-semantics-changed column (type/collation) is read by the body
|
|
476
|
+
* (transitively through generated columns), the backing content is unstable ⇒
|
|
477
|
+
* stale. Empty changed set ⇒ no-op. A failure to build the disjointness analysis
|
|
478
|
+
* propagates to the outer try/catch ⇒ stale (could not prove disjoint).
|
|
479
|
+
* 5. `registerMaterializedView` re-runs arm selection / eligibility / cost
|
|
480
|
+
* gating (`buildMaintenancePlan`) against the new catalog and throws on the
|
|
481
|
+
* create-time gates (non-determinism, bag/no-key floor, full-rebuild
|
|
482
|
+
* pathology against fresh ANALYZE stats — defensible: the alternative is
|
|
483
|
+
* unbounded per-write rebuild cost). Registration is event-silent, so the
|
|
484
|
+
* success path fires no nested schema-change notifications.
|
|
485
|
+
*
|
|
486
|
+
* `oldObject`/`newObject` are the genuine event's distinct schemas. The synthetic
|
|
487
|
+
* backing-invalidation event (same object as old/new) is excluded by the caller's
|
|
488
|
+
* `oldObject !== newObject` guard — it must cascade staleness, never recompile.
|
|
489
|
+
*
|
|
490
|
+
* Deliberately NOT {@link restoreMaterializedViewLive}: that path is async, may
|
|
491
|
+
* rename backing columns, and clears `stale` — the wrong discipline here, where
|
|
492
|
+
* the MV is live throughout and a pre-existing `stale` flag must stay untouched.
|
|
493
|
+
*/
|
|
494
|
+
export declare function tryRecompileMaterializedViewLive(db: Database, mv: MaintainedTableSchema, oldObject: TableSchema, newObject: TableSchema): boolean;
|
|
495
|
+
/**
|
|
496
|
+
* Identity-preserving reshape of a maintained table whose re-derived body shape
|
|
497
|
+
* shifted — the refresh path's replacement for the former drop+recreate. Classify
|
|
498
|
+
* the column delta; an inexpressible delta (interleave / PK-definition change)
|
|
499
|
+
* raises the sited error with the table untouched, an expressible one reshapes in
|
|
500
|
+
* place. The shape-match fast path (`backingShapeMatches` ⇒ data-only
|
|
501
|
+
* `rebuildBacking`) is the caller's and is untouched.
|
|
502
|
+
*/
|
|
503
|
+
export declare function reshapeBacking(db: Database, mv: MaintainedTableSchema, shape: BackingShape): Promise<MaintainedTableSchema>;
|
|
504
|
+
/**
|
|
505
|
+
* Resolves the {@link BackingHost} for a materialized view's backing table via
|
|
506
|
+
* the owning module's backing-host capability (`vtab/backing-host.ts`). INTERNAL
|
|
507
|
+
* when the module lacks the capability or does not know the table — a backing
|
|
508
|
+
* table is engine-created on a capability-checked module, so either is a bug.
|
|
509
|
+
*/
|
|
510
|
+
export declare function resolveBackingHost(db: Database, backingSchema: TableSchema): BackingHost;
|
|
511
|
+
/**
|
|
512
|
+
* Lenient counterpart of {@link resolveBackingHost}: returns the backing host, or
|
|
513
|
+
* `undefined` when the owning module cannot (yet) resolve one — instead of
|
|
514
|
+
* throwing. Used at maintenance-PLAN-BUILD time (the create-time gate registration),
|
|
515
|
+
* where the only use of the host is the host-conditional, default-inert
|
|
516
|
+
* `requiresReplicableDerivations` gate. A module that materializes its durable
|
|
517
|
+
* backing LATE in the attach flow (e.g. lamina's `ensureBackingForAttach`, which
|
|
518
|
+
* runs after the gate registration) has no host yet at plan-build time; the host is
|
|
519
|
+
* resolved for real at the reconcile, and the steady-state maintenance arms
|
|
520
|
+
* re-resolve it per use. Skipping the replicable gate when the host is absent is
|
|
521
|
+
* sound: a host that sets `requiresReplicableDerivations` (the synced-store flavor)
|
|
522
|
+
* always exists by plan-build time, so the gate still binds it — the
|
|
523
|
+
* eager-resolution invariant on {@link BackingHost.requiresReplicableDerivations}.
|
|
524
|
+
*
|
|
525
|
+
* That soundness rests on the invariant being honored, not on prose: a host that
|
|
526
|
+
* BOTH demands replicable derivations AND defers its host to the late seam would
|
|
527
|
+
* skip the gate here unnoticed. The attach core's defensive guard
|
|
528
|
+
* ({@link attachMaintainedDerivation}) re-checks once the late host is in hand and
|
|
529
|
+
* raises a loud INTERNAL error in exactly that case, so this lenient skip can never
|
|
530
|
+
* silently let a non-replicable body through.
|
|
531
|
+
*/
|
|
532
|
+
export declare function tryResolveBackingHost(db: Database, backingSchema: TableSchema): BackingHost | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* Eagerly records the constraint↔structure link when this MV covers a UNIQUE
|
|
535
|
+
* constraint on one of its single source tables. Runs the coverage prover
|
|
536
|
+
* (`coverage-prover.ts`) over the optimized body and, on the first match, stamps
|
|
537
|
+
* the MV's `origin`/`covers` reverse link and the constraint's
|
|
538
|
+
* `coveringStructureName` forward pointer (the source of truth). Informational
|
|
539
|
+
* in this ticket — nothing enforces through the MV's backing table yet.
|
|
540
|
+
*
|
|
541
|
+
* Best-effort and side-effect-bounded: the body has already planned (during
|
|
542
|
+
* shape derivation), so re-planning here is cheap and safe; a non-covering MV
|
|
543
|
+
* simply records nothing.
|
|
544
|
+
*/
|
|
545
|
+
export declare function linkCoveredUniqueConstraints(db: Database, mv: MaintainedTableSchema, bodySql: string): void;
|
|
546
|
+
/**
|
|
547
|
+
* Clears the constraint↔structure link a covering MV established (drop path).
|
|
548
|
+
* Matches on the forward pointer (`coveringStructureName === mv.name`) so it
|
|
549
|
+
* works for unnamed constraints too; no enforcement demotion — physical schemas
|
|
550
|
+
* still enforce via the implicit auto-index.
|
|
551
|
+
*/
|
|
552
|
+
export declare function unlinkCoveredUniqueConstraints(db: Database, mv: MaintainedTableSchema): void;
|
|
553
|
+
/** Re-validates a stale MV's body against the current source schemas. Throws the
|
|
554
|
+
* staleness diagnostic when the body no longer plans. Returns the optimized
|
|
555
|
+
* relational root on success. */
|
|
556
|
+
export declare function revalidateBody(db: Database, mvName: string, bodySql: string): RelationalPlanNode;
|
|
557
|
+
/**
|
|
558
|
+
* Lowercased `schema.name` keys of every MV that is stale *right now*. The rename
|
|
559
|
+
* emitters snapshot this BEFORE the statement's first schema-change notify, so the
|
|
560
|
+
* propagation pass can distinguish "stale from this very rename statement" (safe to
|
|
561
|
+
* clear after a successful in-place rewrite — no DML can interleave within the
|
|
562
|
+
* statement) from "stale from an earlier un-refreshed change" (the backing may
|
|
563
|
+
* already be behind — writes during staleness are not maintained — so only a
|
|
564
|
+
* successful REFRESH may clear it).
|
|
565
|
+
*/
|
|
566
|
+
export declare function snapshotStaleMaterializedViews(db: Database): ReadonlySet<string>;
|
|
567
|
+
/**
|
|
568
|
+
* Rewrites every dependent materialized view in `schema` after a source TABLE
|
|
569
|
+
* RENAME — the MV mirror of the plain-view loop in `propagateTableRenameInSchema`
|
|
570
|
+
* ("MV ≡ faster view"): the caller applies the same same-schema gate, and the body
|
|
571
|
+
* `selectAst` is mutated in place by the same `renameTableInAst` walker. An MV is
|
|
572
|
+
* processed when its body AST changed, its `insert defaults` clause changed (an
|
|
573
|
+
* expr subquery can name the renamed table even when the body doesn't), OR its
|
|
574
|
+
* `sourceTables` carries the old base — the latter catches a body that reads the
|
|
575
|
+
* renamed table *through a plain view* (the view's AST was rewritten by the view
|
|
576
|
+
* loop, but this MV's own AST never names the table while its row-time plan is
|
|
577
|
+
* still keyed under the old base).
|
|
578
|
+
*
|
|
579
|
+
* Per processed MV the derived fields are recomputed on a shallow clone
|
|
580
|
+
* (`sourceTables` re-keyed old→new, `bodyHash`, regenerated `sql`, the `covers`
|
|
581
|
+
* reverse link), then {@link applyMaterializedViewRewrite} re-registers row-time
|
|
582
|
+
* maintenance / preserves pre-existing staleness and fires
|
|
583
|
+
* `materialized_view_modified`. Failures mark the MV stale and propagation
|
|
584
|
+
* continues — best-effort, like the rest of the rename propagation.
|
|
585
|
+
*/
|
|
586
|
+
export declare function propagateTableRenameToMaterializedViews(db: Database, schema: Schema, renamedSchemaName: string, oldName: string, newName: string, preStale: ReadonlySet<string>): Promise<void>;
|
|
587
|
+
/**
|
|
588
|
+
* Rewrites every dependent materialized view in `schema` after a source COLUMN
|
|
589
|
+
* RENAME — the MV mirror of the plain-view loop in `propagateColumnRenameInSchema`
|
|
590
|
+
* (same same-schema gate at the caller, same in-place `renameColumnInAst` walk).
|
|
591
|
+
* The body walk also descends the trailing `with defaults (…)` clause (now on
|
|
592
|
+
* `selectAst.defaults`): the clause target is typically a projected-away NOT NULL
|
|
593
|
+
* column the body never mentions, so its rewrite still flips `bodyChanged` and
|
|
594
|
+
* forces the re-hash / regenerate-DDL / fire-event path. An MV the walk does not
|
|
595
|
+
* touch that the schema-change listener marked stale (an unreferenced-column
|
|
596
|
+
* rename, a `select *` body) is restored by the
|
|
597
|
+
* {@link restoreUnaffectedMaterializedViews} pass the ALTER emitter runs after
|
|
598
|
+
* all per-schema loops. A changed BODY can shift the MV's *exposed output names*
|
|
599
|
+
* (a bare passthrough projection of the renamed column — plain-view parity),
|
|
600
|
+
* which {@link applyMaterializedViewRewrite} carries onto the live backing table.
|
|
601
|
+
*/
|
|
602
|
+
export declare function propagateColumnRenameToMaterializedViews(db: Database, schema: Schema, renamedSchemaName: string, tableName: string, oldCol: string, newCol: string, preStale: ReadonlySet<string>, resolveColumnInSource: ResolveColumnInSource): Promise<void>;
|
|
603
|
+
/**
|
|
604
|
+
* Restores every dependent MV that THIS rename statement marked stale but the
|
|
605
|
+
* rename provably did not affect. Runs once at the end of the table-/column-rename
|
|
606
|
+
* propagation, after all per-schema loops — so every body rewrite, backing-column
|
|
607
|
+
* rename, and cascade event has already fired and the catalog is fully renamed.
|
|
608
|
+
*
|
|
609
|
+
* The schema-change listener marks **every** MV whose `sourceTables` includes a
|
|
610
|
+
* `table_modified` table stale (and detaches its row-time plan), but the rename
|
|
611
|
+
* propagation only restores MVs it processes (changed AST / clause, or — table
|
|
612
|
+
* rename — `sourceTables` carrying the old base). An MV the rename does not touch
|
|
613
|
+
* fell through stale-but-valid: reads silently served the now-unmaintained backing
|
|
614
|
+
* and writes never propagated until a manual REFRESH. Three concrete shapes: a
|
|
615
|
+
* column rename the body never references; a rename whose only effect on another
|
|
616
|
+
* source is a constraint rewrite (e.g. an FK `references` target) firing that
|
|
617
|
+
* source's `table_modified`; and a `select *` body whose output is a pure name
|
|
618
|
+
* shift (the AST is unchanged, so the body rewrite never sees it).
|
|
619
|
+
*
|
|
620
|
+
* Per candidate (`stale` now, not stale at the pre-statement snapshot — a
|
|
621
|
+
* pre-existing flag means the backing may be BEHIND and only REFRESH may clear it):
|
|
622
|
+
* re-derive the backing shape from the body against the renamed catalog; a
|
|
623
|
+
* **structural** mismatch is not a rename no-op → leave stale (REFRESH's
|
|
624
|
+
* shape-mismatch rebuild owns it); otherwise run the shared restore tail —
|
|
625
|
+
* {@link renameShiftedBackingColumns} carries a pure name shift onto the live
|
|
626
|
+
* backing (no-op when names already match; its backing `table_modified`
|
|
627
|
+
* deliberately cascades staleness to chained MVs referencing the old output name),
|
|
628
|
+
* then re-register row-time maintenance and clear `stale`.
|
|
629
|
+
*
|
|
630
|
+
* Deliberately fires NO `materialized_view_modified`: the MV record (AST, hash,
|
|
631
|
+
* sql, sourceTables) is unchanged here — `stale` is runtime state, not persisted.
|
|
632
|
+
* Walks all schemas (the listener marks cross-schema dependents too), in creation
|
|
633
|
+
* order — topological for same-schema MV chains, so a producer restores before its
|
|
634
|
+
* consumer is examined. A chained MV whose body references a renamed-away producer
|
|
635
|
+
* output name fails shape derivation and stays stale (staleness-diagnostic parity
|
|
636
|
+
* with a broken plain-view chain). Best-effort like the rest of the propagation:
|
|
637
|
+
* a per-MV failure logs, leaves that MV stale, and continues.
|
|
638
|
+
*/
|
|
639
|
+
export declare function restoreUnaffectedMaterializedViews(db: Database, preStale: ReadonlySet<string>): Promise<void>;
|
|
640
|
+
//# sourceMappingURL=materialized-view-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"materialized-view-helpers.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/materialized-view-helpers.ts"],"names":[],"mappings":"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"}
|