@quereus/quereus 4.11.0 → 4.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/type-inference.d.ts +12 -6
- package/dist/src/common/type-inference.d.ts.map +1 -1
- package/dist/src/common/type-inference.js +12 -24
- package/dist/src/common/type-inference.js.map +1 -1
- package/dist/src/core/database-assertions.d.ts.map +1 -1
- package/dist/src/core/database-assertions.js +7 -5
- package/dist/src/core/database-assertions.js.map +1 -1
- package/dist/src/core/database-events.d.ts +4 -3
- package/dist/src/core/database-events.d.ts.map +1 -1
- package/dist/src/core/database-events.js +4 -3
- package/dist/src/core/database-events.js.map +1 -1
- package/dist/src/core/database-materialized-views-analysis.d.ts +1 -3
- package/dist/src/core/database-materialized-views-analysis.d.ts.map +1 -1
- package/dist/src/core/database-materialized-views-analysis.js +1 -11
- package/dist/src/core/database-materialized-views-analysis.js.map +1 -1
- package/dist/src/core/database-materialized-views-plan-builders.d.ts.map +1 -1
- package/dist/src/core/database-materialized-views-plan-builders.js +12 -10
- package/dist/src/core/database-materialized-views-plan-builders.js.map +1 -1
- package/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +13 -2
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/core/derived-row-validator.d.ts.map +1 -1
- package/dist/src/core/derived-row-validator.js +14 -2
- package/dist/src/core/derived-row-validator.js.map +1 -1
- package/dist/src/core/param.d.ts +9 -0
- package/dist/src/core/param.d.ts.map +1 -1
- package/dist/src/core/param.js +21 -1
- package/dist/src/core/param.js.map +1 -1
- package/dist/src/core/statement.d.ts.map +1 -1
- package/dist/src/core/statement.js +38 -15
- package/dist/src/core/statement.js.map +1 -1
- package/dist/src/func/builtins/aggregate.d.ts.map +1 -1
- package/dist/src/func/builtins/aggregate.js +7 -2
- 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 +27 -11
- package/dist/src/func/builtins/builtin-window-functions.js.map +1 -1
- package/dist/src/func/builtins/datetime.d.ts.map +1 -1
- package/dist/src/func/builtins/datetime.js +8 -3
- package/dist/src/func/builtins/datetime.js.map +1 -1
- package/dist/src/func/builtins/explain.d.ts.map +1 -1
- package/dist/src/func/builtins/explain.js +9 -29
- package/dist/src/func/builtins/explain.js.map +1 -1
- package/dist/src/func/builtins/json-tvf.d.ts.map +1 -1
- package/dist/src/func/builtins/json-tvf.js +14 -7
- package/dist/src/func/builtins/json-tvf.js.map +1 -1
- package/dist/src/func/builtins/return-types.d.ts +29 -0
- package/dist/src/func/builtins/return-types.d.ts.map +1 -1
- package/dist/src/func/builtins/return-types.js +4 -1
- package/dist/src/func/builtins/return-types.js.map +1 -1
- package/dist/src/func/builtins/scalar.d.ts.map +1 -1
- package/dist/src/func/builtins/scalar.js +22 -67
- package/dist/src/func/builtins/scalar.js.map +1 -1
- package/dist/src/func/builtins/schema.d.ts.map +1 -1
- package/dist/src/func/builtins/schema.js +26 -16
- package/dist/src/func/builtins/schema.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/parser/parser.d.ts.map +1 -1
- package/dist/src/parser/parser.js +8 -5
- package/dist/src/parser/parser.js.map +1 -1
- package/dist/src/parser/visitor.d.ts +16 -0
- package/dist/src/parser/visitor.d.ts.map +1 -1
- package/dist/src/parser/visitor.js +16 -0
- package/dist/src/parser/visitor.js.map +1 -1
- package/dist/src/planner/analysis/assertion-plan.d.ts +33 -0
- package/dist/src/planner/analysis/assertion-plan.d.ts.map +1 -0
- package/dist/src/planner/analysis/assertion-plan.js +39 -0
- package/dist/src/planner/analysis/assertion-plan.js.map +1 -0
- package/dist/src/planner/analysis/binary-operator-class.d.ts +55 -0
- package/dist/src/planner/analysis/binary-operator-class.d.ts.map +1 -0
- package/dist/src/planner/analysis/binary-operator-class.js +57 -0
- package/dist/src/planner/analysis/binary-operator-class.js.map +1 -0
- package/dist/src/planner/analysis/binding-extractor.d.ts +9 -3
- package/dist/src/planner/analysis/binding-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/binding-extractor.js +11 -16
- package/dist/src/planner/analysis/binding-extractor.js.map +1 -1
- package/dist/src/planner/analysis/change-scope.d.ts.map +1 -1
- package/dist/src/planner/analysis/change-scope.js +19 -6
- package/dist/src/planner/analysis/change-scope.js.map +1 -1
- package/dist/src/planner/analysis/check-extraction.d.ts +1 -7
- package/dist/src/planner/analysis/check-extraction.d.ts.map +1 -1
- package/dist/src/planner/analysis/check-extraction.js.map +1 -1
- package/dist/src/planner/analysis/comparison-collation.d.ts +17 -0
- package/dist/src/planner/analysis/comparison-collation.d.ts.map +1 -1
- package/dist/src/planner/analysis/comparison-collation.js +17 -5
- package/dist/src/planner/analysis/comparison-collation.js.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.d.ts.map +1 -1
- package/dist/src/planner/analysis/constraint-extractor.js +18 -18
- package/dist/src/planner/analysis/constraint-extractor.js.map +1 -1
- package/dist/src/planner/analysis/coverage-prover.d.ts +11 -7
- package/dist/src/planner/analysis/coverage-prover.d.ts.map +1 -1
- package/dist/src/planner/analysis/coverage-prover.js +11 -7
- package/dist/src/planner/analysis/coverage-prover.js.map +1 -1
- package/dist/src/planner/analysis/equi-correlation.d.ts +1 -1
- package/dist/src/planner/analysis/equi-correlation.js +1 -1
- package/dist/src/planner/analysis/expression-fingerprint.d.ts.map +1 -1
- package/dist/src/planner/analysis/expression-fingerprint.js +0 -2
- package/dist/src/planner/analysis/expression-fingerprint.js.map +1 -1
- package/dist/src/planner/analysis/key-filter.d.ts.map +1 -1
- package/dist/src/planner/analysis/key-filter.js +2 -3
- package/dist/src/planner/analysis/key-filter.js.map +1 -1
- package/dist/src/planner/analysis/relation-key.d.ts +104 -0
- package/dist/src/planner/analysis/relation-key.d.ts.map +1 -0
- package/dist/src/planner/analysis/relation-key.js +121 -0
- package/dist/src/planner/analysis/relation-key.js.map +1 -0
- package/dist/src/planner/analysis/scalar-param-usage.d.ts.map +1 -1
- package/dist/src/planner/analysis/scalar-param-usage.js +12 -4
- package/dist/src/planner/analysis/scalar-param-usage.js.map +1 -1
- package/dist/src/planner/analysis/set-op-type-merge.d.ts +9 -3
- package/dist/src/planner/analysis/set-op-type-merge.d.ts.map +1 -1
- package/dist/src/planner/analysis/set-op-type-merge.js +22 -8
- package/dist/src/planner/analysis/set-op-type-merge.js.map +1 -1
- package/dist/src/planner/building/alter-table.d.ts.map +1 -1
- package/dist/src/planner/building/alter-table.js +31 -23
- package/dist/src/planner/building/alter-table.js.map +1 -1
- package/dist/src/planner/building/analyze.d.ts.map +1 -1
- package/dist/src/planner/building/analyze.js +21 -0
- package/dist/src/planner/building/analyze.js.map +1 -1
- package/dist/src/planner/building/block.d.ts.map +1 -1
- package/dist/src/planner/building/block.js +222 -82
- package/dist/src/planner/building/block.js.map +1 -1
- package/dist/src/planner/building/constraint-builder.d.ts.map +1 -1
- package/dist/src/planner/building/constraint-builder.js +5 -3
- package/dist/src/planner/building/constraint-builder.js.map +1 -1
- package/dist/src/planner/building/delete.js +1 -1
- package/dist/src/planner/building/delete.js.map +1 -1
- package/dist/src/planner/building/expression.d.ts.map +1 -1
- package/dist/src/planner/building/expression.js +11 -3
- package/dist/src/planner/building/expression.js.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.d.ts +16 -6
- package/dist/src/planner/building/foreign-key-builder.d.ts.map +1 -1
- package/dist/src/planner/building/foreign-key-builder.js +43 -20
- package/dist/src/planner/building/foreign-key-builder.js.map +1 -1
- package/dist/src/planner/building/generated-column-scope.d.ts +58 -0
- package/dist/src/planner/building/generated-column-scope.d.ts.map +1 -0
- package/dist/src/planner/building/generated-column-scope.js +117 -0
- package/dist/src/planner/building/generated-column-scope.js.map +1 -0
- package/dist/src/planner/building/insert.d.ts.map +1 -1
- package/dist/src/planner/building/insert.js +20 -28
- package/dist/src/planner/building/insert.js.map +1 -1
- package/dist/src/planner/building/select-aggregates.d.ts +73 -132
- package/dist/src/planner/building/select-aggregates.d.ts.map +1 -1
- package/dist/src/planner/building/select-aggregates.js +405 -81
- package/dist/src/planner/building/select-aggregates.js.map +1 -1
- package/dist/src/planner/building/select-modifiers.d.ts +37 -8
- package/dist/src/planner/building/select-modifiers.d.ts.map +1 -1
- package/dist/src/planner/building/select-modifiers.js +8 -9
- package/dist/src/planner/building/select-modifiers.js.map +1 -1
- package/dist/src/planner/building/select-ordinal.d.ts +6 -0
- package/dist/src/planner/building/select-ordinal.d.ts.map +1 -1
- package/dist/src/planner/building/select-ordinal.js +1 -1
- package/dist/src/planner/building/select-ordinal.js.map +1 -1
- package/dist/src/planner/building/select-window.d.ts +2 -2
- package/dist/src/planner/building/select-window.d.ts.map +1 -1
- package/dist/src/planner/building/select-window.js +82 -101
- 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 +78 -33
- package/dist/src/planner/building/select.js.map +1 -1
- package/dist/src/planner/building/update.d.ts.map +1 -1
- package/dist/src/planner/building/update.js +14 -8
- package/dist/src/planner/building/update.js.map +1 -1
- package/dist/src/planner/building/view-mutation-builder.d.ts.map +1 -1
- package/dist/src/planner/building/view-mutation-builder.js +329 -14
- package/dist/src/planner/building/view-mutation-builder.js.map +1 -1
- package/dist/src/planner/building/with.d.ts +6 -0
- package/dist/src/planner/building/with.d.ts.map +1 -1
- package/dist/src/planner/building/with.js +52 -3
- package/dist/src/planner/building/with.js.map +1 -1
- package/dist/src/planner/cache/correlation-detector.d.ts.map +1 -1
- package/dist/src/planner/cache/correlation-detector.js +44 -17
- package/dist/src/planner/cache/correlation-detector.js.map +1 -1
- package/dist/src/planner/framework/physical-utils.d.ts +6 -0
- package/dist/src/planner/framework/physical-utils.d.ts.map +1 -1
- package/dist/src/planner/framework/physical-utils.js +6 -0
- package/dist/src/planner/framework/physical-utils.js.map +1 -1
- package/dist/src/planner/mutation/lens-enforcement.d.ts +123 -0
- package/dist/src/planner/mutation/lens-enforcement.d.ts.map +1 -1
- package/dist/src/planner/mutation/lens-enforcement.js +362 -5
- package/dist/src/planner/mutation/lens-enforcement.js.map +1 -1
- package/dist/src/planner/mutation/mutation-diagnostic.d.ts +1 -1
- package/dist/src/planner/mutation/mutation-diagnostic.d.ts.map +1 -1
- package/dist/src/planner/mutation/mutation-diagnostic.js.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.d.ts +15 -11
- package/dist/src/planner/nodes/alter-table-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/alter-table-node.js +5 -0
- package/dist/src/planner/nodes/alter-table-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 +7 -0
- package/dist/src/planner/nodes/bloom-join-node.js.map +1 -1
- package/dist/src/planner/nodes/constraint-check-node.d.ts +16 -0
- package/dist/src/planner/nodes/constraint-check-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/constraint-check-node.js.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.d.ts +1 -1
- package/dist/src/planner/nodes/plan-node-type.d.ts.map +1 -1
- package/dist/src/planner/nodes/plan-node-type.js +1 -1
- package/dist/src/planner/nodes/plan-node-type.js.map +1 -1
- package/dist/src/planner/nodes/pragma.d.ts.map +1 -1
- package/dist/src/planner/nodes/pragma.js +5 -2
- package/dist/src/planner/nodes/pragma.js.map +1 -1
- package/dist/src/planner/nodes/reference.d.ts.map +1 -1
- package/dist/src/planner/nodes/reference.js +9 -1
- package/dist/src/planner/nodes/reference.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +117 -91
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/planner/nodes/sequence-node.d.ts +50 -0
- package/dist/src/planner/nodes/sequence-node.d.ts.map +1 -0
- package/dist/src/planner/nodes/sequence-node.js +96 -0
- package/dist/src/planner/nodes/sequence-node.js.map +1 -0
- package/dist/src/planner/nodes/values-node.d.ts +8 -0
- package/dist/src/planner/nodes/values-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/values-node.js +29 -6
- package/dist/src/planner/nodes/values-node.js.map +1 -1
- package/dist/src/planner/nodes/view-mutation-node.d.ts +43 -1
- package/dist/src/planner/nodes/view-mutation-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/view-mutation-node.js +27 -6
- package/dist/src/planner/nodes/view-mutation-node.js.map +1 -1
- package/dist/src/planner/nodes/window-node.d.ts +33 -4
- package/dist/src/planner/nodes/window-node.d.ts.map +1 -1
- package/dist/src/planner/nodes/window-node.js +80 -36
- package/dist/src/planner/nodes/window-node.js.map +1 -1
- package/dist/src/planner/planning-context.d.ts +38 -1
- package/dist/src/planner/planning-context.d.ts.map +1 -1
- package/dist/src/planner/rules/access/rule-key-set-seek.d.ts.map +1 -1
- package/dist/src/planner/rules/access/rule-key-set-seek.js +8 -3
- package/dist/src/planner/rules/access/rule-key-set-seek.js.map +1 -1
- package/dist/src/planner/rules/join/rule-fanout-lookup-join.js +18 -12
- package/dist/src/planner/rules/join/rule-fanout-lookup-join.js.map +1 -1
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.js +4 -3
- package/dist/src/planner/rules/retrieve/rule-grow-retrieve.js.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.d.ts.map +1 -1
- package/dist/src/planner/rules/window/rule-monotonic-window.js +6 -0
- package/dist/src/planner/rules/window/rule-monotonic-window.js.map +1 -1
- package/dist/src/planner/scopes/param.d.ts.map +1 -1
- package/dist/src/planner/scopes/param.js +10 -5
- package/dist/src/planner/scopes/param.js.map +1 -1
- package/dist/src/planner/util/ind-utils.d.ts +25 -8
- package/dist/src/planner/util/ind-utils.d.ts.map +1 -1
- package/dist/src/planner/util/ind-utils.js +53 -10
- package/dist/src/planner/util/ind-utils.js.map +1 -1
- package/dist/src/planner/util/key-utils.d.ts +7 -7
- package/dist/src/planner/util/key-utils.js +9 -9
- package/dist/src/planner/util/key-utils.js.map +1 -1
- package/dist/src/runtime/delta-executor.d.ts.map +1 -1
- package/dist/src/runtime/delta-executor.js +7 -2
- 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 +50 -15
- package/dist/src/runtime/emit/add-constraint.js.map +1 -1
- package/dist/src/runtime/emit/alter-schema-event.d.ts +2 -43
- package/dist/src/runtime/emit/alter-schema-event.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-schema-event.js +2 -53
- package/dist/src/runtime/emit/alter-schema-event.js.map +1 -1
- package/dist/src/runtime/emit/alter-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/alter-table.js +59 -24
- 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 +7 -0
- package/dist/src/runtime/emit/analyze.js.map +1 -1
- package/dist/src/runtime/emit/assertion-rename-helpers.d.ts.map +1 -1
- package/dist/src/runtime/emit/assertion-rename-helpers.js +2 -3
- package/dist/src/runtime/emit/assertion-rename-helpers.js.map +1 -1
- package/dist/src/runtime/emit/binary.d.ts +5 -0
- package/dist/src/runtime/emit/binary.d.ts.map +1 -1
- package/dist/src/runtime/emit/binary.js +22 -22
- 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 +9 -3
- package/dist/src/runtime/emit/block.js.map +1 -1
- package/dist/src/runtime/emit/constraint-check.d.ts.map +1 -1
- package/dist/src/runtime/emit/constraint-check.js +5 -6
- package/dist/src/runtime/emit/constraint-check.js.map +1 -1
- package/dist/src/runtime/emit/create-assertion.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-assertion.js +71 -70
- package/dist/src/runtime/emit/create-assertion.js.map +1 -1
- package/dist/src/runtime/emit/create-index.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-index.js +8 -3
- package/dist/src/runtime/emit/create-index.js.map +1 -1
- package/dist/src/runtime/emit/create-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/create-table.js +20 -10
- 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 +51 -44
- package/dist/src/runtime/emit/create-view.js.map +1 -1
- package/dist/src/runtime/emit/ddl-event-scope.d.ts +71 -0
- package/dist/src/runtime/emit/ddl-event-scope.d.ts.map +1 -0
- package/dist/src/runtime/emit/ddl-event-scope.js +80 -0
- package/dist/src/runtime/emit/ddl-event-scope.js.map +1 -0
- package/dist/src/runtime/emit/dml-executor.d.ts.map +1 -1
- package/dist/src/runtime/emit/dml-executor.js +23 -23
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/drop-assertion.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-assertion.js +23 -17
- package/dist/src/runtime/emit/drop-assertion.js.map +1 -1
- package/dist/src/runtime/emit/drop-index.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-index.js +7 -2
- package/dist/src/runtime/emit/drop-index.js.map +1 -1
- package/dist/src/runtime/emit/drop-table.d.ts.map +1 -1
- package/dist/src/runtime/emit/drop-table.js +16 -10
- 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 +50 -43
- package/dist/src/runtime/emit/drop-view.js.map +1 -1
- package/dist/src/runtime/emit/insert.d.ts.map +1 -1
- package/dist/src/runtime/emit/insert.js +2 -1
- package/dist/src/runtime/emit/insert.js.map +1 -1
- package/dist/src/runtime/emit/materialized-view.d.ts.map +1 -1
- package/dist/src/runtime/emit/materialized-view.js +87 -67
- package/dist/src/runtime/emit/materialized-view.js.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.d.ts +8 -0
- package/dist/src/runtime/emit/schema-declarative.d.ts.map +1 -1
- package/dist/src/runtime/emit/schema-declarative.js +128 -25
- package/dist/src/runtime/emit/schema-declarative.js.map +1 -1
- package/dist/src/runtime/emit/sequence.d.ts +17 -0
- package/dist/src/runtime/emit/sequence.d.ts.map +1 -0
- package/dist/src/runtime/emit/sequence.js +40 -0
- package/dist/src/runtime/emit/sequence.js.map +1 -0
- package/dist/src/runtime/emit/set-object-tags.d.ts.map +1 -1
- package/dist/src/runtime/emit/set-object-tags.js +40 -32
- package/dist/src/runtime/emit/set-object-tags.js.map +1 -1
- package/dist/src/runtime/emit/table-valued-function.d.ts.map +1 -1
- package/dist/src/runtime/emit/table-valued-function.js +3 -2
- package/dist/src/runtime/emit/table-valued-function.js.map +1 -1
- package/dist/src/runtime/emit/update.js +3 -3
- package/dist/src/runtime/emit/update.js.map +1 -1
- package/dist/src/runtime/emit/view-mutation.d.ts.map +1 -1
- package/dist/src/runtime/emit/view-mutation.js +45 -3
- package/dist/src/runtime/emit/view-mutation.js.map +1 -1
- package/dist/src/runtime/foreign-key-actions.d.ts.map +1 -1
- package/dist/src/runtime/foreign-key-actions.js +9 -10
- package/dist/src/runtime/foreign-key-actions.js.map +1 -1
- package/dist/src/runtime/register.d.ts.map +1 -1
- package/dist/src/runtime/register.js +3 -2
- package/dist/src/runtime/register.js.map +1 -1
- package/dist/src/runtime/row-constraints.d.ts +14 -8
- package/dist/src/runtime/row-constraints.d.ts.map +1 -1
- package/dist/src/runtime/row-constraints.js +41 -15
- package/dist/src/runtime/row-constraints.js.map +1 -1
- package/dist/src/runtime/strict-representation.d.ts +11 -6
- package/dist/src/runtime/strict-representation.d.ts.map +1 -1
- package/dist/src/runtime/strict-representation.js +1 -44
- package/dist/src/runtime/strict-representation.js.map +1 -1
- package/dist/src/schema/assertion.d.ts +25 -2
- package/dist/src/schema/assertion.d.ts.map +1 -1
- package/dist/src/schema/assertion.js.map +1 -1
- package/dist/src/schema/catalog-rendering.d.ts +38 -0
- package/dist/src/schema/catalog-rendering.d.ts.map +1 -0
- package/dist/src/schema/catalog-rendering.js +171 -0
- package/dist/src/schema/catalog-rendering.js.map +1 -0
- package/dist/src/schema/catalog.d.ts +69 -3
- package/dist/src/schema/catalog.d.ts.map +1 -1
- package/dist/src/schema/catalog.js +124 -19
- package/dist/src/schema/catalog.js.map +1 -1
- package/dist/src/schema/column-source-resolver.d.ts +9 -5
- package/dist/src/schema/column-source-resolver.d.ts.map +1 -1
- package/dist/src/schema/column-source-resolver.js +9 -5
- package/dist/src/schema/column-source-resolver.js.map +1 -1
- package/dist/src/schema/constraint-builder.d.ts +13 -10
- package/dist/src/schema/constraint-builder.d.ts.map +1 -1
- package/dist/src/schema/constraint-builder.js +45 -17
- package/dist/src/schema/constraint-builder.js.map +1 -1
- package/dist/src/schema/declared-schema-manager.d.ts +50 -0
- package/dist/src/schema/declared-schema-manager.d.ts.map +1 -1
- package/dist/src/schema/declared-schema-manager.js +52 -0
- package/dist/src/schema/declared-schema-manager.js.map +1 -1
- package/dist/src/schema/expr-scope/frame.d.ts +65 -0
- package/dist/src/schema/expr-scope/frame.d.ts.map +1 -0
- package/dist/src/schema/expr-scope/frame.js +104 -0
- package/dist/src/schema/expr-scope/frame.js.map +1 -0
- package/dist/src/schema/expr-scope/walk.d.ts +40 -0
- package/dist/src/schema/expr-scope/walk.d.ts.map +1 -0
- package/dist/src/schema/expr-scope/walk.js +260 -0
- package/dist/src/schema/expr-scope/walk.js.map +1 -0
- package/dist/src/schema/generated-column-refs.d.ts +41 -0
- package/dist/src/schema/generated-column-refs.d.ts.map +1 -0
- package/dist/src/schema/generated-column-refs.js +124 -0
- package/dist/src/schema/generated-column-refs.js.map +1 -0
- package/dist/src/schema/lens-ack.d.ts.map +1 -1
- package/dist/src/schema/lens-ack.js +5 -2
- package/dist/src/schema/lens-ack.js.map +1 -1
- package/dist/src/schema/lens-compiler.d.ts.map +1 -1
- package/dist/src/schema/lens-compiler.js +9 -1
- package/dist/src/schema/lens-compiler.js.map +1 -1
- package/dist/src/schema/lens-prover.d.ts +7 -2
- package/dist/src/schema/lens-prover.d.ts.map +1 -1
- package/dist/src/schema/lens-prover.js +105 -11
- package/dist/src/schema/lens-prover.js.map +1 -1
- package/dist/src/schema/lens.d.ts +12 -0
- package/dist/src/schema/lens.d.ts.map +1 -1
- package/dist/src/schema/lens.js +10 -0
- package/dist/src/schema/lens.js.map +1 -1
- package/dist/src/schema/manager.d.ts +35 -1
- package/dist/src/schema/manager.d.ts.map +1 -1
- package/dist/src/schema/manager.js +125 -26
- package/dist/src/schema/manager.js.map +1 -1
- package/dist/src/schema/rename/self-qualifier-strip.d.ts +16 -10
- package/dist/src/schema/rename/self-qualifier-strip.d.ts.map +1 -1
- package/dist/src/schema/rename/self-qualifier-strip.js +30 -213
- package/dist/src/schema/rename/self-qualifier-strip.js.map +1 -1
- package/dist/src/schema/rename-rewriter.d.ts +4 -3
- package/dist/src/schema/rename-rewriter.d.ts.map +1 -1
- package/dist/src/schema/rename-rewriter.js +4 -3
- package/dist/src/schema/rename-rewriter.js.map +1 -1
- package/dist/src/schema/schema-differ.d.ts +54 -6
- package/dist/src/schema/schema-differ.d.ts.map +1 -1
- package/dist/src/schema/schema-differ.js +108 -42
- package/dist/src/schema/schema-differ.js.map +1 -1
- package/dist/src/schema/schema-hasher.d.ts +12 -0
- package/dist/src/schema/schema-hasher.d.ts.map +1 -1
- package/dist/src/schema/schema-hasher.js +28 -10
- package/dist/src/schema/schema-hasher.js.map +1 -1
- package/dist/src/schema/table.d.ts +74 -19
- package/dist/src/schema/table.d.ts.map +1 -1
- package/dist/src/schema/table.js +133 -71
- package/dist/src/schema/table.js.map +1 -1
- package/dist/src/types/comparison-coercion.d.ts +5 -1
- package/dist/src/types/comparison-coercion.d.ts.map +1 -1
- package/dist/src/types/comparison-coercion.js +21 -5
- package/dist/src/types/comparison-coercion.js.map +1 -1
- package/dist/src/types/representation.d.ts +65 -0
- package/dist/src/types/representation.d.ts.map +1 -0
- package/dist/src/types/representation.js +63 -0
- package/dist/src/types/representation.js.map +1 -0
- package/dist/src/types/validation.d.ts +76 -22
- package/dist/src/types/validation.d.ts.map +1 -1
- package/dist/src/types/validation.js +110 -31
- package/dist/src/types/validation.js.map +1 -1
- package/dist/src/vtab/best-access-plan.d.ts +10 -0
- package/dist/src/vtab/best-access-plan.d.ts.map +1 -1
- package/dist/src/vtab/best-access-plan.js +16 -0
- package/dist/src/vtab/best-access-plan.js.map +1 -1
- package/dist/src/vtab/capabilities.d.ts +72 -4
- package/dist/src/vtab/capabilities.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.d.ts.map +1 -1
- package/dist/src/vtab/memory/layer/manager.js +17 -13
- package/dist/src/vtab/memory/layer/manager.js.map +1 -1
- package/dist/src/vtab/module.d.ts +13 -7
- package/dist/src/vtab/module.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/src/planner/nodes/array-index-node.d.ts +0 -22
- package/dist/src/planner/nodes/array-index-node.d.ts.map +0 -1
- package/dist/src/planner/nodes/array-index-node.js +0 -41
- package/dist/src/planner/nodes/array-index-node.js.map +0 -1
- package/dist/src/runtime/emit/array-index.d.ts +0 -5
- package/dist/src/runtime/emit/array-index.d.ts.map +0 -1
- package/dist/src/runtime/emit/array-index.js +0 -22
- package/dist/src/runtime/emit/array-index.js.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { PhysicalType } from './logical-type.js';
|
|
2
|
+
const INTEGER_CONFORMS = value => typeof value === 'bigint' || (typeof value === 'number' && Number.isSafeInteger(value));
|
|
3
|
+
const REAL_CONFORMS = value => typeof value === 'number';
|
|
4
|
+
/** REAL's physical type plus `bigint` — see the NUMERIC note on {@link buildConformanceCheck}. */
|
|
5
|
+
const NUMERIC_CONFORMS = value => typeof value === 'number' || typeof value === 'bigint';
|
|
6
|
+
const TEXT_CONFORMS = value => typeof value === 'string';
|
|
7
|
+
const BLOB_CONFORMS = value => value instanceof Uint8Array;
|
|
8
|
+
const BOOLEAN_CONFORMS = value => typeof value === 'boolean';
|
|
9
|
+
/**
|
|
10
|
+
* Mirrors `JSON_TYPE.validate`: a native object/array (a blob is not one), or a JSON
|
|
11
|
+
* scalar — a JSON string scalar is physically a plain `string`, a JSON number scalar a
|
|
12
|
+
* plain `number`.
|
|
13
|
+
*/
|
|
14
|
+
const OBJECT_CONFORMS = value => (typeof value === 'object' && !(value instanceof Uint8Array))
|
|
15
|
+
|| typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
16
|
+
/**
|
|
17
|
+
* Pre-select the R2 arm for a declared type once, for a caller that will test many values
|
|
18
|
+
* against it (the write-path guard, per row). Returns `undefined` when the type imposes no
|
|
19
|
+
* R2 constraint at all — `PhysicalType.NULL` (`ANY` / `NULL`) and any unrecognized
|
|
20
|
+
* plugin physical code — so such a caller can skip the check entirely rather than call a
|
|
21
|
+
* closure that always returns true.
|
|
22
|
+
*
|
|
23
|
+
* Keyed on `physicalType` rather than the type's identity so plugin-registered types are
|
|
24
|
+
* covered too. Two arms need the type NAME as well:
|
|
25
|
+
*
|
|
26
|
+
* - **NUMERIC** shares REAL's `physicalType` (see the NOTE on `NUMERIC_TYPE` in
|
|
27
|
+
* `types/builtin-types.ts`) but its value space includes `bigint`.
|
|
28
|
+
* NOTE: matched by NAME, not by identity against the `NUMERIC_TYPE` singleton the way
|
|
29
|
+
* `isSeekKeySpaceNumeric` matches, because the surrounding switch is deliberately keyed
|
|
30
|
+
* on `physicalType` so plugin-registered types are covered. The cost is that a
|
|
31
|
+
* plugin-registered REAL-physical type *named* `NUMERIC` would silently inherit
|
|
32
|
+
* bigint admission. No such type exists in tree; if one is ever registered, give
|
|
33
|
+
* `LogicalType` an explicit "admits bigint" property and switch on that instead.
|
|
34
|
+
* - **`ANY`/NULL** (`PhysicalType.NULL`) impose no R2 constraint at all — an `ANY`
|
|
35
|
+
* position may legitimately hold any storage class.
|
|
36
|
+
*
|
|
37
|
+
* TIMESTAMP needs no special case: it declares `physicalType` INTEGER because it IS an
|
|
38
|
+
* integer instant, so it takes INTEGER's rule. The string temporals (DATE / TIME /
|
|
39
|
+
* DATETIME / TIMESPAN) declare TEXT and take TEXT's — R2 must not demand a `Temporal`
|
|
40
|
+
* object for them.
|
|
41
|
+
*/
|
|
42
|
+
export function buildConformanceCheck(type) {
|
|
43
|
+
switch (type.physicalType) {
|
|
44
|
+
case PhysicalType.INTEGER: return INTEGER_CONFORMS;
|
|
45
|
+
case PhysicalType.REAL: return type.name === 'NUMERIC' ? NUMERIC_CONFORMS : REAL_CONFORMS;
|
|
46
|
+
case PhysicalType.TEXT: return TEXT_CONFORMS;
|
|
47
|
+
case PhysicalType.BLOB: return BLOB_CONFORMS;
|
|
48
|
+
case PhysicalType.BOOLEAN: return BOOLEAN_CONFORMS;
|
|
49
|
+
case PhysicalType.OBJECT: return OBJECT_CONFORMS;
|
|
50
|
+
default: return undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* R2 for one non-null value that has already passed R1 (canonical numeric form): does the
|
|
55
|
+
* value inhabit `type`'s JS value space? A type with no R2 constraint admits everything.
|
|
56
|
+
*
|
|
57
|
+
* One-shot form of {@link buildConformanceCheck} — same arms, no closure retained.
|
|
58
|
+
*/
|
|
59
|
+
export function conformsToType(value, type) {
|
|
60
|
+
const check = buildConformanceCheck(type);
|
|
61
|
+
return check === undefined || check(value);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=representation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"representation.js","sourceRoot":"","sources":["../../../src/types/representation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AAiCnE,MAAM,gBAAgB,GAAqB,KAAK,CAAC,EAAE,CAClD,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC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AC,MAAM,CAAC,CAAC,OAAO,eAAe,CAAC;QACjD,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC;IAC3B,CAAC;AACF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAA8B,EAAE,IAAkB;IAChF,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC1C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -48,28 +48,82 @@ export declare function validateAndParse(value: SqlValue, type: LogicalType, col
|
|
|
48
48
|
*/
|
|
49
49
|
export declare function coerceRowToSchema(row: Row, columns: readonly ColumnSchema[], label: string): Row;
|
|
50
50
|
/**
|
|
51
|
-
* Build the
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
51
|
+
* Build the write-path conversion for ONE cell: the shared decision every DML write site
|
|
52
|
+
* makes about a value on its way into a declared column. Returns `undefined` when there
|
|
53
|
+
* is provably nothing to do, so the caller can skip the cell entirely.
|
|
54
|
+
*
|
|
55
|
+
* Two dispositions, and which one applies is decided at emit/plan time:
|
|
56
|
+
*
|
|
57
|
+
* - **Always convert** — `sourceType` is not (by object identity) `target`, or is
|
|
58
|
+
* `undefined` (unknown provenance). The type registry hands out one shared
|
|
59
|
+
* `LogicalType` instance per type, so a differing object means a differing type.
|
|
60
|
+
* - **Convert only if the value does not already inhabit `target`** — `sourceType` IS
|
|
61
|
+
* `target`. Values reaching such a cell are *claimed* to be in declared form already,
|
|
62
|
+
* and re-converting them would be destructive: JSON's `parse` reads a plain JS string
|
|
63
|
+
* as JSON *source*, so re-converting a stored JSON text value either changes it (the
|
|
64
|
+
* text `9` becomes the number 9) or throws (`abc` is not valid JSON source). But the
|
|
65
|
+
* claim is a static INFERENCE the engine does not otherwise enforce — `sum()` announces
|
|
66
|
+
* REAL and can produce a `bigint`; an untyped positional `?` announces TEXT and can be
|
|
67
|
+
* bound to anything — so it is checked against the value in hand rather than trusted.
|
|
68
|
+
* `conformsToType` (`types/representation.ts`) answers "does this value inhabit this
|
|
69
|
+
* type" — the same predicate
|
|
70
|
+
* the `QUEREUS_REPR_STRICT` checker enforces (rule R2 of docs/types.md § Physical
|
|
71
|
+
* representation), so the guard and the checker cannot drift apart. A value read out of
|
|
72
|
+
* a JSON column — native object/array, or a JSON scalar such as the string `abc` or the
|
|
73
|
+
* number 9 — conforms, so the JSON case that motivates the skip still never re-parses.
|
|
74
|
+
*
|
|
75
|
+
* The guard is a *conjunction*, not a replacement for the identity test: a TEXT-announced
|
|
76
|
+
* expression feeding a DATE column produces a string, which conforms to DATE's TEXT
|
|
77
|
+
* physical type, yet still needs converting so the spelling is canonicalized. The static
|
|
78
|
+
* difference stays the primary trigger.
|
|
79
|
+
*
|
|
80
|
+
* Conversion goes through {@link validateAndParse}, so failures carry the same message
|
|
81
|
+
* text the storage layer used to produce.
|
|
82
|
+
*
|
|
83
|
+
* NOTE: the guard is R2-level — it asks which JS storage class the value is, NOT the
|
|
84
|
+
* target type's own `validate`. So it catches "a number reached a TEXT column" but not
|
|
85
|
+
* "a badly-spelled string reached a DATE column" (a DATE-announced expression producing a
|
|
86
|
+
* non-canonical date string still passes through: a string DOES inhabit DATE's TEXT
|
|
87
|
+
* physical type). That is deliberate — it keeps this predicate identical to the one the
|
|
88
|
+
* strict checker enforces — and the known instance of the spelling hole is the variadic
|
|
89
|
+
* `date`/`time`/`datetime` functions, which declare TEXT for exactly this reason (see the
|
|
90
|
+
* NOTE on `dateFunc` in `func/builtins/datetime.ts` and docs/types.md § Special Types —
|
|
91
|
+
* an accepted tradeoff, not open work). If that class needs closing at this seam,
|
|
92
|
+
* switching the guard to `target.validate` is the change to weigh; JSON survives it
|
|
93
|
+
* (`JSON_TYPE.validate` accepts any string, so a JSON string scalar still passes), but
|
|
94
|
+
* every temporal announcement would then have to be exact or writes would start failing.
|
|
95
|
+
*
|
|
96
|
+
* NOTE: rule R1 (canonical numeric form — a `bigint` only outside the safe-integer range)
|
|
97
|
+
* is deliberately NOT part of the guard, even though the strict checker asserts R1 and R2
|
|
98
|
+
* at the same seam. R1 is upheld where values are BORN (literal lexing, parameter bind,
|
|
99
|
+
* bigint arithmetic — see util/numeric-canonical.ts); silently re-canonicalizing here
|
|
100
|
+
* would repair an upstream contract violation instead of letting `QUEREUS_REPR_STRICT`
|
|
101
|
+
* report the seam that caused it. Consequence, accepted: a safe-range `bigint` from a
|
|
102
|
+
* source announcing INTEGER/NUMERIC still passes the guard and reaches storage as-is.
|
|
103
|
+
* Revisit if such a value is ever observed in storage from an in-tree path — that would
|
|
104
|
+
* mean a birth site is missing its canonicalization, and the fix belongs there.
|
|
105
|
+
*/
|
|
106
|
+
export declare function buildCellCoercion(sourceType: LogicalType | undefined, target: LogicalType, columnName: string): ((value: SqlValue) => SqlValue) | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Build the per-statement conversion step for a DML write. Given the static logical type
|
|
109
|
+
* of the expression producing each cell (index-aligned with `columns`) and the target
|
|
110
|
+
* columns, returns a closure applying {@link buildCellCoercion}'s decision to every cell
|
|
111
|
+
* that needs one — or `undefined` when no cell does (no column needs converting AND none
|
|
112
|
+
* needs guarding), so the caller can skip the per-row work entirely. A row of all-`ANY`
|
|
113
|
+
* columns fed from `ANY` expressions therefore still allocates nothing.
|
|
114
|
+
*
|
|
115
|
+
* The returned closure copies the row ONLY when a cell actually changes, and returns the
|
|
116
|
+
* caller's own row otherwise — so a bulk copy whose cells all conform (`insert into b
|
|
117
|
+
* select * from a` between same-typed tables) still allocates nothing per row, as it did
|
|
118
|
+
* before every constrained column started carrying a guard. Callers must therefore treat
|
|
119
|
+
* the result as the input row unless they own it; both do today (`emitInsert` reads cells
|
|
120
|
+
* out of it, `emitUpdate` hands in a row it just copied). Cells at or beyond the row's
|
|
121
|
+
* length are left for the storage width guard, mirroring {@link coerceRowToSchema}'s
|
|
122
|
+
* map-over-present-cells behavior.
|
|
123
|
+
*
|
|
124
|
+
* NOTE: a guarded cell costs one pre-selected `typeof`/`instanceof` per row where it used
|
|
125
|
+
* to cost nothing. Unmeasured; if it ever shows up in `test/performance-sentinels.spec.ts`,
|
|
126
|
+
* note it there rather than reverting the guard — the skip is unsound without it.
|
|
73
127
|
*/
|
|
74
128
|
export declare function buildRowCoercion(sourceTypes: ReadonlyArray<LogicalType | undefined>, columns: readonly ColumnSchema[]): ((row: Row) => Row) | undefined;
|
|
75
129
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/types/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/types/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD;;;;;;;;;GASG;AACH,w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AW,gBAAgB;IAChC,iEAAiE;IACjE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,QAAQ,CAAC,GAAG,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,WAAW,EAC3B,UAAU,EAAE,MAAM,GAChB,gBAAgB,CAgBlB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAI1E;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CAM5E"}
|
|
@@ -2,6 +2,7 @@ import { StatusCode } from '../common/types.js';
|
|
|
2
2
|
import { QuereusError } from '../common/errors.js';
|
|
3
3
|
import { tryFoldLiteral } from '../parser/utils.js';
|
|
4
4
|
import { inferType } from './registry.js';
|
|
5
|
+
import { buildConformanceCheck } from './representation.js';
|
|
5
6
|
/**
|
|
6
7
|
* Validate a value against a logical type.
|
|
7
8
|
* Throws an error if the value is invalid.
|
|
@@ -84,46 +85,124 @@ export function coerceRowToSchema(row, columns, label) {
|
|
|
84
85
|
return row.map((value, i) => validateAndParse(value, columns[i].logicalType, columns[i].name));
|
|
85
86
|
}
|
|
86
87
|
/**
|
|
87
|
-
* Build the
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
88
|
+
* Build the write-path conversion for ONE cell: the shared decision every DML write site
|
|
89
|
+
* makes about a value on its way into a declared column. Returns `undefined` when there
|
|
90
|
+
* is provably nothing to do, so the caller can skip the cell entirely.
|
|
91
|
+
*
|
|
92
|
+
* Two dispositions, and which one applies is decided at emit/plan time:
|
|
93
|
+
*
|
|
94
|
+
* - **Always convert** — `sourceType` is not (by object identity) `target`, or is
|
|
95
|
+
* `undefined` (unknown provenance). The type registry hands out one shared
|
|
96
|
+
* `LogicalType` instance per type, so a differing object means a differing type.
|
|
97
|
+
* - **Convert only if the value does not already inhabit `target`** — `sourceType` IS
|
|
98
|
+
* `target`. Values reaching such a cell are *claimed* to be in declared form already,
|
|
99
|
+
* and re-converting them would be destructive: JSON's `parse` reads a plain JS string
|
|
100
|
+
* as JSON *source*, so re-converting a stored JSON text value either changes it (the
|
|
101
|
+
* text `9` becomes the number 9) or throws (`abc` is not valid JSON source). But the
|
|
102
|
+
* claim is a static INFERENCE the engine does not otherwise enforce — `sum()` announces
|
|
103
|
+
* REAL and can produce a `bigint`; an untyped positional `?` announces TEXT and can be
|
|
104
|
+
* bound to anything — so it is checked against the value in hand rather than trusted.
|
|
105
|
+
* `conformsToType` (`types/representation.ts`) answers "does this value inhabit this
|
|
106
|
+
* type" — the same predicate
|
|
107
|
+
* the `QUEREUS_REPR_STRICT` checker enforces (rule R2 of docs/types.md § Physical
|
|
108
|
+
* representation), so the guard and the checker cannot drift apart. A value read out of
|
|
109
|
+
* a JSON column — native object/array, or a JSON scalar such as the string `abc` or the
|
|
110
|
+
* number 9 — conforms, so the JSON case that motivates the skip still never re-parses.
|
|
111
|
+
*
|
|
112
|
+
* The guard is a *conjunction*, not a replacement for the identity test: a TEXT-announced
|
|
113
|
+
* expression feeding a DATE column produces a string, which conforms to DATE's TEXT
|
|
114
|
+
* physical type, yet still needs converting so the spelling is canonicalized. The static
|
|
115
|
+
* difference stays the primary trigger.
|
|
116
|
+
*
|
|
117
|
+
* Conversion goes through {@link validateAndParse}, so failures carry the same message
|
|
118
|
+
* text the storage layer used to produce.
|
|
119
|
+
*
|
|
120
|
+
* NOTE: the guard is R2-level — it asks which JS storage class the value is, NOT the
|
|
121
|
+
* target type's own `validate`. So it catches "a number reached a TEXT column" but not
|
|
122
|
+
* "a badly-spelled string reached a DATE column" (a DATE-announced expression producing a
|
|
123
|
+
* non-canonical date string still passes through: a string DOES inhabit DATE's TEXT
|
|
124
|
+
* physical type). That is deliberate — it keeps this predicate identical to the one the
|
|
125
|
+
* strict checker enforces — and the known instance of the spelling hole is the variadic
|
|
126
|
+
* `date`/`time`/`datetime` functions, which declare TEXT for exactly this reason (see the
|
|
127
|
+
* NOTE on `dateFunc` in `func/builtins/datetime.ts` and docs/types.md § Special Types —
|
|
128
|
+
* an accepted tradeoff, not open work). If that class needs closing at this seam,
|
|
129
|
+
* switching the guard to `target.validate` is the change to weigh; JSON survives it
|
|
130
|
+
* (`JSON_TYPE.validate` accepts any string, so a JSON string scalar still passes), but
|
|
131
|
+
* every temporal announcement would then have to be exact or writes would start failing.
|
|
132
|
+
*
|
|
133
|
+
* NOTE: rule R1 (canonical numeric form — a `bigint` only outside the safe-integer range)
|
|
134
|
+
* is deliberately NOT part of the guard, even though the strict checker asserts R1 and R2
|
|
135
|
+
* at the same seam. R1 is upheld where values are BORN (literal lexing, parameter bind,
|
|
136
|
+
* bigint arithmetic — see util/numeric-canonical.ts); silently re-canonicalizing here
|
|
137
|
+
* would repair an upstream contract violation instead of letting `QUEREUS_REPR_STRICT`
|
|
138
|
+
* report the seam that caused it. Consequence, accepted: a safe-range `bigint` from a
|
|
139
|
+
* source announcing INTEGER/NUMERIC still passes the guard and reaches storage as-is.
|
|
140
|
+
* Revisit if such a value is ever observed in storage from an in-tree path — that would
|
|
141
|
+
* mean a birth site is missing its canonicalization, and the fix belongs there.
|
|
142
|
+
*/
|
|
143
|
+
export function buildCellCoercion(sourceType, target, columnName) {
|
|
144
|
+
if (sourceType !== target) {
|
|
145
|
+
return (value) => validateAndParse(value, target, columnName);
|
|
146
|
+
}
|
|
147
|
+
// Identity match: guard rather than skip. A type imposing no value-space constraint
|
|
148
|
+
// (ANY / NULL) has nothing to guard, so that cell really is free.
|
|
149
|
+
const conforms = buildConformanceCheck(target);
|
|
150
|
+
if (conforms === undefined)
|
|
151
|
+
return undefined;
|
|
152
|
+
return (value) => value === null || conforms(value) ? value : validateAndParse(value, target, columnName);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Build the per-statement conversion step for a DML write. Given the static logical type
|
|
156
|
+
* of the expression producing each cell (index-aligned with `columns`) and the target
|
|
157
|
+
* columns, returns a closure applying {@link buildCellCoercion}'s decision to every cell
|
|
158
|
+
* that needs one — or `undefined` when no cell does (no column needs converting AND none
|
|
159
|
+
* needs guarding), so the caller can skip the per-row work entirely. A row of all-`ANY`
|
|
160
|
+
* columns fed from `ANY` expressions therefore still allocates nothing.
|
|
161
|
+
*
|
|
162
|
+
* The returned closure copies the row ONLY when a cell actually changes, and returns the
|
|
163
|
+
* caller's own row otherwise — so a bulk copy whose cells all conform (`insert into b
|
|
164
|
+
* select * from a` between same-typed tables) still allocates nothing per row, as it did
|
|
165
|
+
* before every constrained column started carrying a guard. Callers must therefore treat
|
|
166
|
+
* the result as the input row unless they own it; both do today (`emitInsert` reads cells
|
|
167
|
+
* out of it, `emitUpdate` hands in a row it just copied). Cells at or beyond the row's
|
|
168
|
+
* length are left for the storage width guard, mirroring {@link coerceRowToSchema}'s
|
|
169
|
+
* map-over-present-cells behavior.
|
|
170
|
+
*
|
|
171
|
+
* NOTE: a guarded cell costs one pre-selected `typeof`/`instanceof` per row where it used
|
|
172
|
+
* to cost nothing. Unmeasured; if it ever shows up in `test/performance-sentinels.spec.ts`,
|
|
173
|
+
* note it there rather than reverting the guard — the skip is unsound without it.
|
|
109
174
|
*/
|
|
110
175
|
export function buildRowCoercion(sourceTypes, columns) {
|
|
111
|
-
const
|
|
176
|
+
const indices = [];
|
|
177
|
+
const converters = [];
|
|
112
178
|
for (let i = 0; i < columns.length; i++) {
|
|
113
|
-
|
|
114
|
-
|
|
179
|
+
const convert = buildCellCoercion(sourceTypes[i], columns[i].logicalType, columns[i].name);
|
|
180
|
+
if (convert) {
|
|
181
|
+
indices.push(i);
|
|
182
|
+
converters.push(convert);
|
|
115
183
|
}
|
|
116
184
|
}
|
|
117
|
-
if (
|
|
185
|
+
if (indices.length === 0)
|
|
118
186
|
return undefined;
|
|
119
187
|
return (row) => {
|
|
120
|
-
|
|
121
|
-
for (
|
|
122
|
-
|
|
188
|
+
let out;
|
|
189
|
+
for (let k = 0; k < indices.length; k++) {
|
|
190
|
+
const i = indices[k];
|
|
191
|
+
// Indices ascend, so the first out-of-range one ends the pass.
|
|
192
|
+
if (i >= row.length)
|
|
123
193
|
break;
|
|
124
|
-
|
|
194
|
+
// Each index is visited once, so the copy (if any) still holds the input's cell.
|
|
195
|
+
const original = row[i];
|
|
196
|
+
const converted = converters[k](original);
|
|
197
|
+
// Identity, not equality: a conversion that returns the value it was given
|
|
198
|
+
// changed nothing, and anything else (including a fresh object holding the
|
|
199
|
+
// same content, or NaN) copies — conservative in the safe direction.
|
|
200
|
+
if (converted !== original) {
|
|
201
|
+
out ??= row.slice();
|
|
202
|
+
out[i] = converted;
|
|
203
|
+
}
|
|
125
204
|
}
|
|
126
|
-
return out;
|
|
205
|
+
return out ?? row;
|
|
127
206
|
};
|
|
128
207
|
}
|
|
129
208
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/types/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,M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OAAO,EAAE,IAAI,EAAE,CAAC;IAChF,OAAO;QACN,cAAc;QACd,OAAO,EAAE,CAAC,KAAe,EAAY,EAAE;YACtC,IAAI,CAAC;gBACJ,OAAO,gBAAgB,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;YAC5D,CAAC;YAAC,MAAM,CAAC;gBACR,MAAM,IAAI,YAAY,CACrB,4BAA4B,UAAU,QAAQ,QAAQ,EAAE,EACxD,UAAU,CAAC,QAAQ,CACnB,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAe,EAAE,IAAiB;IAChE,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAe,EAAE,IAAiB;IAC1D,IAAI,CAAC;QACJ,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC"}
|
|
@@ -281,6 +281,16 @@ export declare class AccessPlanBuilder {
|
|
|
281
281
|
* Set the estimated cost of this access plan
|
|
282
282
|
*/
|
|
283
283
|
setCost(cost: number): this;
|
|
284
|
+
/**
|
|
285
|
+
* Add to the cost already set — by a static shape constructor above, or by an
|
|
286
|
+
* earlier {@link setCost}.
|
|
287
|
+
*
|
|
288
|
+
* For a module that pays a per-row term one of the standard shapes does not model:
|
|
289
|
+
* a secondary-index path resolves every index entry to its row in a second store,
|
|
290
|
+
* which {@link eqMatch} / {@link rangeScan} do not charge for. Adding to the shape's
|
|
291
|
+
* cost keeps that module from restating (and drifting from) the shape's own formula.
|
|
292
|
+
*/
|
|
293
|
+
addCost(delta: number): this;
|
|
284
294
|
/**
|
|
285
295
|
* Set the estimated number of rows
|
|
286
296
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"best-access-plan.d.ts","sourceRoot":"","sources":["../../../src/vtab/best-access-plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhJ;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,qDAAqD;IACrD,YAAY,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,KAAK,CAAC,EAAE;QAAE,EAAE,EAAE,IAAI,GAAG,GAAG,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAE,CAAC;IAC5C,KAAK,CAAC,EAAE;QAAE,EAAE,EAAE,IAAI,GAAG,GAAG,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAE,CAAC;CAC5C;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ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;;;;;OAQG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ5B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAKvC;;OAEG;IACH,iBAAiB,CAAC,cAAc,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI;IAK3D;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI;IAKpD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK9B;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKzC;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKrC;;;OAGG;IACH,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IAK1D;;OAEG;IACH,cAAc,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAK1D;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,GAAG,IAAI;IAKtD;;OAEG;IACH,KAAK,IAAI,oBAAoB;CAW7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CA8B9E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,oBAAoB,GAC1B,IAAI,CAwGN"}
|
|
@@ -101,6 +101,22 @@ export class AccessPlanBuilder {
|
|
|
101
101
|
this.result.cost = cost;
|
|
102
102
|
return this;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Add to the cost already set — by a static shape constructor above, or by an
|
|
106
|
+
* earlier {@link setCost}.
|
|
107
|
+
*
|
|
108
|
+
* For a module that pays a per-row term one of the standard shapes does not model:
|
|
109
|
+
* a secondary-index path resolves every index entry to its row in a second store,
|
|
110
|
+
* which {@link eqMatch} / {@link rangeScan} do not charge for. Adding to the shape's
|
|
111
|
+
* cost keeps that module from restating (and drifting from) the shape's own formula.
|
|
112
|
+
*/
|
|
113
|
+
addCost(delta) {
|
|
114
|
+
if (this.result.cost === undefined) {
|
|
115
|
+
quereusError('addCost requires a cost to have been set first', StatusCode.INTERNAL);
|
|
116
|
+
}
|
|
117
|
+
this.result.cost += delta;
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
104
120
|
/**
|
|
105
121
|
* Set the estimated number of rows
|
|
106
122
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"best-access-plan.js","sourceRoot":"","sources":["../../../src/vtab/best-access-plan.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAA2B,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAwB,MAAM,uBAAuB,CAAC;AAuFtF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,oBAAoB,CAAC,CAAsB;IAC1D,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG;QAAE,OAAO,CAAC,CAAC;IAC3B,IAAI,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;QACnB,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC;YAClC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;QACrE,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAK,CAAC,CAAC,KAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjE,OAAQ,CAAC,CAAC,KAAm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AED,wDAAwD;IACxD,IAAI,MAAM,CAAC,iBAAiB,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrD,YAAY,CACX,kDAAkD,EAClD,UAAU,CAAC,MAAM,CACjB,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -88,10 +88,69 @@ export interface ModuleCapabilities {
|
|
|
88
88
|
*/
|
|
89
89
|
permitsGrandfatheredCheckViolators?: boolean;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* `
|
|
94
|
-
*
|
|
91
|
+
* Module may carry a row whose declared foreign-key value matches no row in
|
|
92
|
+
* the referenced parent table (an "orphan"). Typical sources: `ALTER TABLE …
|
|
93
|
+
* ADD CONSTRAINT … FOREIGN KEY` succeeding against non-conforming rows and
|
|
94
|
+
* grandfathering them, or a replicated backend deleting a parent row through
|
|
95
|
+
* a path the engine never sees.
|
|
96
|
+
*
|
|
97
|
+
* Default/absent ⇒ the planner treats every declared FK as a hard inclusion
|
|
98
|
+
* dependency (`child.fk ⊆ parent.pk`): `lookupCoveringFK` and
|
|
99
|
+
* `seedTableForeignKeyInds` (`planner/util/ind-utils.ts`) produce the
|
|
100
|
+
* existence claim consumed by INNER join elimination, semi/anti-join FK
|
|
101
|
+
* folds, the fan-out lookup join's `atMostOne-inner` mode, and the coverage
|
|
102
|
+
* prover's no-row-loss obligation.
|
|
103
|
+
*
|
|
104
|
+
* When true, both producers return the empty answer whenever this module owns
|
|
105
|
+
* the child OR the parent side of the FK, so no consumer can conclude
|
|
106
|
+
* existence (≥1 parent match) from the declaration. The at-most-one claim
|
|
107
|
+
* (`checkFkPkAlignment`) is unaffected — it follows from the parent's key
|
|
108
|
+
* being unique, not from inclusion — so LEFT/RIGHT join elimination,
|
|
109
|
+
* `atMostOne-left` fan-out, and key-preservation FDs survive. Write-time FK
|
|
110
|
+
* enforcement is likewise unchanged. Native modules (memory, store) leave
|
|
111
|
+
* this off, so their behavior — and Quereus's own conformance suite — is
|
|
112
|
+
* unchanged. See invariant OPT-059.
|
|
113
|
+
*/
|
|
114
|
+
permitsOrphanedForeignKeyRows?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Module may carry a row that lacks a value for a currently-declared NOT NULL
|
|
117
|
+
* column (a "grandfathered" NULL) — the third member of the grandfathering
|
|
118
|
+
* family alongside `permitsGrandfatheredCheckViolators` and
|
|
119
|
+
* `permitsOrphanedForeignKeyRows`. Typical sources: `ALTER TABLE … ADD COLUMN
|
|
120
|
+
* <NOT NULL>` / `… SET NOT NULL` succeeding against existing rows and
|
|
121
|
+
* declaring NOT NULL on the new schema only (forward writes enforced), or a
|
|
122
|
+
* replicated backend admitting a row from a peer whose older schema epoch
|
|
123
|
+
* never had the column.
|
|
124
|
+
*
|
|
125
|
+
* Default/absent ⇒ the lens prover treats a `not null` logical column whose
|
|
126
|
+
* basis-derived expression is nullable (and that has no total default) as the
|
|
127
|
+
* deploy-blocking error `lens.nullability-mismatch` — sound for a declarant
|
|
128
|
+
* that can actually promise totality.
|
|
129
|
+
*
|
|
130
|
+
* When true (checked against every basis table the compiled body reads —
|
|
131
|
+
* mixed-module bodies stay strict), that diagnostic is demoted to a
|
|
132
|
+
* non-blocking warning-severity advisory: still emitted, surfaced in the
|
|
133
|
+
* deploy report and `quereus_lens_advisories`, and ack-governable
|
|
134
|
+
* (`quereus.lens.ack.nullability-mismatch`), but it no longer blocks the
|
|
135
|
+
* deploy. Reads through the lens may then yield NULL in a declared NOT NULL
|
|
136
|
+
* column for grandfathered rows. This flag changes NOTHING about writes: it
|
|
137
|
+
* neither adds nor removes enforcement. Note that a logical column's NOT NULL
|
|
138
|
+
* is not attached to the basis write by the lens enforcement rewrite in the
|
|
139
|
+
* first place (`planner/mutation/lens-enforcement.ts
|
|
140
|
+
* collectLensRowLocalConstraints` rewrites CHECK obligations only), so a write
|
|
141
|
+
* through a deployed lens is NOT-NULL-enforced only to the extent the BASIS
|
|
142
|
+
* columns it decomposes onto declare it — do not read this flag's advisory as
|
|
143
|
+
* a promise that forward writes are guarded. Native modules (memory, store)
|
|
144
|
+
* leave this off, so their behavior — and Quereus's own conformance suite — is
|
|
145
|
+
* unchanged.
|
|
146
|
+
*/
|
|
147
|
+
permitsGrandfatheredNotNullViolators?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Declares how this module's DDL behaves inside a transaction — the fifth LIVE
|
|
150
|
+
* capability gate alongside `delegatesNotNullBackfill`,
|
|
151
|
+
* `permitsGrandfatheredCheckViolators`, `permitsOrphanedForeignKeyRows`, and
|
|
152
|
+
* `permitsGrandfatheredNotNullViolators`.
|
|
153
|
+
* See {@link DdlTransactionality} for the three tiers.
|
|
95
154
|
*
|
|
96
155
|
* Default/absent ⇒ `'non-transactional'`. A module must EXPLICITLY claim
|
|
97
156
|
* `'transactional'`; assuming the clean semantics by default would let every
|
|
@@ -104,6 +163,15 @@ export interface ModuleCapabilities {
|
|
|
104
163
|
*/
|
|
105
164
|
ddlTransactionality?: DdlTransactionality;
|
|
106
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* The slice of a vtab module a planner-side capability gate consults.
|
|
168
|
+
* Structural, so planner/analysis modules needn't depend on `vtab/module.ts` —
|
|
169
|
+
* shared by `planner/analysis/check-extraction.ts` and
|
|
170
|
+
* `planner/util/ind-utils.ts`.
|
|
171
|
+
*/
|
|
172
|
+
export interface CapabilityProvider {
|
|
173
|
+
getCapabilities?(): ModuleCapabilities;
|
|
174
|
+
}
|
|
107
175
|
/**
|
|
108
176
|
* Extended interface for tables that can be wrapped by the isolation layer.
|
|
109
177
|
* Provides key extraction and comparison functions needed for merge operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../src/vtab/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0B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