@prisma/orm-family-sql 0.16.0-dev.36
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/LICENSE +201 -0
- package/README.md +28 -0
- package/dist/ast-BstHjAoG.mjs +325 -0
- package/dist/ast-BstHjAoG.mjs.map +1 -0
- package/dist/ast-DSuzmsWn.d.mts +287 -0
- package/dist/ast-DSuzmsWn.d.mts.map +1 -0
- package/dist/authoring-type-constructors-Blqoa2Ua-DyCmD6mp.mjs +316 -0
- package/dist/authoring-type-constructors-Blqoa2Ua-DyCmD6mp.mjs.map +1 -0
- package/dist/build-contract-DBCz_YSs-DO0wMHai.mjs +778 -0
- package/dist/build-contract-DBCz_YSs-DO0wMHai.mjs.map +1 -0
- package/dist/builder.d.mts +3 -0
- package/dist/builder.mjs +1 -0
- package/dist/builder__runtime.d.mts +42 -0
- package/dist/builder__runtime.d.mts.map +1 -0
- package/dist/builder__runtime.mjs +955 -0
- package/dist/builder__runtime.mjs.map +1 -0
- package/dist/builder__types.d.mts +3 -0
- package/dist/builder__types.mjs +1 -0
- package/dist/canonicalization-hooks-CYnW_sGn.d.mts +10 -0
- package/dist/canonicalization-hooks-CYnW_sGn.d.mts.map +1 -0
- package/dist/canonicalization-hooks-DfIc_lOO.mjs +87 -0
- package/dist/canonicalization-hooks-DfIc_lOO.mjs.map +1 -0
- package/dist/codec-descriptor-registry-BJVJRftS.mjs +96 -0
- package/dist/codec-descriptor-registry-BJVJRftS.mjs.map +1 -0
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts +116 -0
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts.map +1 -0
- package/dist/config-types-47qB33rW.d.mts +21 -0
- package/dist/config-types-47qB33rW.d.mts.map +1 -0
- package/dist/config-types-N7PJc6VN.mjs +65 -0
- package/dist/config-types-N7PJc6VN.mjs.map +1 -0
- package/dist/contract-builder-MvJJrQ-5.d.mts +1306 -0
- package/dist/contract-builder-MvJJrQ-5.d.mts.map +1 -0
- package/dist/contract-builder-YjMQcvZ1.mjs +1615 -0
- package/dist/contract-builder-YjMQcvZ1.mjs.map +1 -0
- package/dist/contract-emitter.d.mts +25 -0
- package/dist/contract-emitter.d.mts.map +1 -0
- package/dist/contract-emitter.mjs +2 -0
- package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs +9 -0
- package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs.map +1 -0
- package/dist/contract-psl.d.mts +65 -0
- package/dist/contract-psl.d.mts.map +1 -0
- package/dist/contract-psl.mjs +2 -0
- package/dist/contract-psl__provider.d.mts +23 -0
- package/dist/contract-psl__provider.d.mts.map +1 -0
- package/dist/contract-psl__provider.mjs +105 -0
- package/dist/contract-psl__provider.mjs.map +1 -0
- package/dist/contract-ts.d.mts +3 -0
- package/dist/contract-ts.mjs +4 -0
- package/dist/contract-ts__config-types.d.mts +2 -0
- package/dist/contract-ts__config-types.mjs +2 -0
- package/dist/contract-ts__contract-builder.d.mts +2 -0
- package/dist/contract-ts__contract-builder.mjs +3 -0
- package/dist/contract-view-BMR5IWk4.mjs +39 -0
- package/dist/contract-view-BMR5IWk4.mjs.map +1 -0
- package/dist/contract-view-BbWQp6r4.d.mts +61 -0
- package/dist/contract-view-BbWQp6r4.d.mts.map +1 -0
- package/dist/contract.d.mts +26 -0
- package/dist/contract.mjs +17 -0
- package/dist/contract__canonicalization-hooks.d.mts +2 -0
- package/dist/contract__canonicalization-hooks.mjs +2 -0
- package/dist/contract__contract-view.d.mts +2 -0
- package/dist/contract__contract-view.mjs +2 -0
- package/dist/contract__entity-handle-lowering-hook.d.mts +2 -0
- package/dist/contract__entity-handle-lowering-hook.mjs +2 -0
- package/dist/contract__entity-kinds.d.mts +2 -0
- package/dist/contract__entity-kinds.mjs +2 -0
- package/dist/contract__factories.d.mts +2 -0
- package/dist/contract__factories.mjs +2 -0
- package/dist/contract__foreign-key-materialization.d.mts +2 -0
- package/dist/contract__foreign-key-materialization.mjs +2 -0
- package/dist/contract__index-naming.d.mts +2 -0
- package/dist/contract__index-naming.mjs +2 -0
- package/dist/contract__index-type-validation.d.mts +2 -0
- package/dist/contract__index-type-validation.mjs +2 -0
- package/dist/contract__index-types.d.mts +3 -0
- package/dist/contract__index-types.mjs +2 -0
- package/dist/contract__pack-types.d.mts +2 -0
- package/dist/contract__pack-types.mjs +1 -0
- package/dist/contract__referential-action-sql.d.mts +2 -0
- package/dist/contract__referential-action-sql.mjs +2 -0
- package/dist/contract__resolve-storage-table.d.mts +2 -0
- package/dist/contract__resolve-storage-table.mjs +2 -0
- package/dist/contract__types.d.mts +11 -0
- package/dist/contract__types.mjs +4 -0
- package/dist/contract__validators.d.mts +2 -0
- package/dist/contract__validators.mjs +3 -0
- package/dist/contract__value-set-derivation-hook.d.mts +2 -0
- package/dist/contract__value-set-derivation-hook.mjs +2 -0
- package/dist/control-B7iS4jv4.mjs +1326 -0
- package/dist/control-B7iS4jv4.mjs.map +1 -0
- package/dist/control-BHmsZudH.d.mts +948 -0
- package/dist/control-BHmsZudH.d.mts.map +1 -0
- package/dist/control-adapter-4y1O8Ps3.d.mts +1 -0
- package/dist/control-adapter-C99J7aEF-C-17lFY8.d.mts +191 -0
- package/dist/control-adapter-C99J7aEF-C-17lFY8.d.mts.map +1 -0
- package/dist/db-DhMsmBS--DKENDi3l.d.mts +365 -0
- package/dist/db-DhMsmBS--DKENDi3l.d.mts.map +1 -0
- package/dist/ddl-types-BMp2bWVS-D1waZJ4n.mjs +153 -0
- package/dist/ddl-types-BMp2bWVS-D1waZJ4n.mjs.map +1 -0
- package/dist/ddl-types-rrMsf77U-DGctYf-T.d.mts +149 -0
- package/dist/ddl-types-rrMsf77U-DGctYf-T.d.mts.map +1 -0
- package/dist/diff-B16bL_IR.mjs +13 -0
- package/dist/diff-B16bL_IR.mjs.map +1 -0
- package/dist/diff-DhlzHOMD.d.mts +104 -0
- package/dist/diff-DhlzHOMD.d.mts.map +1 -0
- package/dist/dist-C_q1_QR9.mjs +9 -0
- package/dist/dist-C_q1_QR9.mjs.map +1 -0
- package/dist/dist-DrScXbhq.mjs +414 -0
- package/dist/dist-DrScXbhq.mjs.map +1 -0
- package/dist/dist-x6jvtkKM.mjs +68 -0
- package/dist/dist-x6jvtkKM.mjs.map +1 -0
- package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts +92 -0
- package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts.map +1 -0
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs +11 -0
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs.map +1 -0
- package/dist/entity-kinds-DKxwKolf-CcsY-iYV.mjs +136 -0
- package/dist/entity-kinds-DKxwKolf-CcsY-iYV.mjs.map +1 -0
- package/dist/entity-kinds-Dh6VH4uK.d.mts +29 -0
- package/dist/entity-kinds-Dh6VH4uK.d.mts.map +1 -0
- package/dist/errors-B5g0xWro-mWH2C07F.mjs +9 -0
- package/dist/errors-B5g0xWro-mWH2C07F.mjs.map +1 -0
- package/dist/errors.d.mts +63 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +2 -0
- package/dist/expression-DIf8F4Mc.d.mts +167 -0
- package/dist/expression-DIf8F4Mc.d.mts.map +1 -0
- package/dist/expression-RUO52bJB.mjs +109 -0
- package/dist/expression-RUO52bJB.mjs.map +1 -0
- package/dist/factories-B7tA4y9D.d.mts +39 -0
- package/dist/factories-B7tA4y9D.d.mts.map +1 -0
- package/dist/factories-CDG9zBxC.mjs +77 -0
- package/dist/factories-CDG9zBxC.mjs.map +1 -0
- package/dist/family.d.mts +13 -0
- package/dist/family.mjs +12 -0
- package/dist/family__control-adapter.d.mts +3 -0
- package/dist/family__control-adapter.mjs +1 -0
- package/dist/family__control.d.mts +4 -0
- package/dist/family__control.mjs +4 -0
- package/dist/family__diff.d.mts +3 -0
- package/dist/family__diff.mjs +3 -0
- package/dist/family__ir.d.mts +2 -0
- package/dist/family__ir.mjs +3 -0
- package/dist/family__migration.d.mts +2 -0
- package/dist/family__migration.mjs +2 -0
- package/dist/family__pack.d.mts +249 -0
- package/dist/family__pack.d.mts.map +1 -0
- package/dist/family__pack.mjs +18 -0
- package/dist/family__pack.mjs.map +1 -0
- package/dist/family__psl-infer.d.mts +2 -0
- package/dist/family__psl-infer.mjs +2 -0
- package/dist/family__runtime.d.mts +3 -0
- package/dist/family__runtime.mjs +3 -0
- package/dist/family__verify.d.mts +2 -0
- package/dist/family__verify.mjs +2 -0
- package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts +85 -0
- package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts.map +1 -0
- package/dist/foreign-key-materialization-Ca-wRbmj.d.mts +65 -0
- package/dist/foreign-key-materialization-Ca-wRbmj.d.mts.map +1 -0
- package/dist/foreign-key-materialization-HI7BIQrG.mjs +72 -0
- package/dist/foreign-key-materialization-HI7BIQrG.mjs.map +1 -0
- package/dist/index-Bb9U36N4.d.mts +511 -0
- package/dist/index-Bb9U36N4.d.mts.map +1 -0
- package/dist/index-BgaTJRxj.d.mts +25 -0
- package/dist/index-BgaTJRxj.d.mts.map +1 -0
- package/dist/index-naming-BZWoh45T.d.mts +62 -0
- package/dist/index-naming-BZWoh45T.d.mts.map +1 -0
- package/dist/index-naming-BoGBcMmI-DiJAr66H.mjs +108 -0
- package/dist/index-naming-BoGBcMmI-DiJAr66H.mjs.map +1 -0
- package/dist/index-type-validation-COH4d78M.mjs +17 -0
- package/dist/index-type-validation-COH4d78M.mjs.map +1 -0
- package/dist/index-type-validation-DN0L2mqm.d.mts +10 -0
- package/dist/index-type-validation-DN0L2mqm.d.mts.map +1 -0
- package/dist/index-types-CNhHgKHi.d.mts +1 -0
- package/dist/index-types-DJQ_xwaE.mjs +40 -0
- package/dist/index-types-DJQ_xwaE.mjs.map +1 -0
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +31 -0
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +1 -0
- package/dist/interpreter-5WgpL-ax-_nqHLUTr.mjs +3526 -0
- package/dist/interpreter-5WgpL-ax-_nqHLUTr.mjs.map +1 -0
- package/dist/ir-B3bKMnGQ.d.mts +123 -0
- package/dist/ir-B3bKMnGQ.d.mts.map +1 -0
- package/dist/ir-I-xciGUH.mjs +36 -0
- package/dist/ir-I-xciGUH.mjs.map +1 -0
- package/dist/lane-query-builder.d.mts +236 -0
- package/dist/lane-query-builder.d.mts.map +1 -0
- package/dist/lane-query-builder.mjs +67 -0
- package/dist/lane-query-builder.mjs.map +1 -0
- package/dist/middleware-B4XbF4d4-tfwBl6mX.d.mts +119 -0
- package/dist/middleware-B4XbF4d4-tfwBl6mX.d.mts.map +1 -0
- package/dist/middleware-ByRsXxxq.d.mts +1 -0
- package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs +80 -0
- package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs.map +1 -0
- package/dist/migration-CK4oePIo.mjs +44 -0
- package/dist/migration-CK4oePIo.mjs.map +1 -0
- package/dist/migration-CW0ZJLxP.d.mts +44 -0
- package/dist/migration-CW0ZJLxP.d.mts.map +1 -0
- package/dist/naming-BwqqVcZy-BgTObIQw.mjs +177 -0
- package/dist/naming-BwqqVcZy-BgTObIQw.mjs.map +1 -0
- package/dist/naming-jLgdauLi-C84G_UHi.d.mts +133 -0
- package/dist/naming-jLgdauLi-C84G_UHi.d.mts.map +1 -0
- package/dist/operations.d.mts +2 -0
- package/dist/operations.mjs +2 -0
- package/dist/orm-client.d.mts +1316 -0
- package/dist/orm-client.d.mts.map +1 -0
- package/dist/orm-client.mjs +4544 -0
- package/dist/orm-client.mjs.map +1 -0
- package/dist/pack-types-BcLTpwbv.d.mts +14 -0
- package/dist/pack-types-BcLTpwbv.d.mts.map +1 -0
- package/dist/plan-BTD8xFfa-Dd_K-A1R.d.mts +45 -0
- package/dist/plan-BTD8xFfa-Dd_K-A1R.d.mts.map +1 -0
- package/dist/plan-CkpcgUaM.mjs +34 -0
- package/dist/plan-CkpcgUaM.mjs.map +1 -0
- package/dist/plan-Cm4jaoNM.d.mts +2 -0
- package/dist/psl-infer-6je61Z6J.d.mts +119 -0
- package/dist/psl-infer-6je61Z6J.d.mts.map +1 -0
- package/dist/psl-infer-DGftl-HW.mjs +362 -0
- package/dist/psl-infer-DGftl-HW.mjs.map +1 -0
- package/dist/query-lane-context-Bz8XJZ45.d.mts +1 -0
- package/dist/query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts +94 -0
- package/dist/query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts.map +1 -0
- package/dist/referential-action-sql-Csd6dA8G.d.mts +12 -0
- package/dist/referential-action-sql-Csd6dA8G.d.mts.map +1 -0
- package/dist/referential-action-sql-DSqkrySN.mjs +17 -0
- package/dist/referential-action-sql-DSqkrySN.mjs.map +1 -0
- package/dist/relational-core.d.mts +13 -0
- package/dist/relational-core.mjs +8 -0
- package/dist/relational-core__ast.d.mts +5 -0
- package/dist/relational-core__ast.mjs +5 -0
- package/dist/relational-core__codec-descriptor-registry.d.mts +39 -0
- package/dist/relational-core__codec-descriptor-registry.d.mts.map +1 -0
- package/dist/relational-core__codec-descriptor-registry.mjs +2 -0
- package/dist/relational-core__contract-free.d.mts +220 -0
- package/dist/relational-core__contract-free.d.mts.map +1 -0
- package/dist/relational-core__contract-free.mjs +393 -0
- package/dist/relational-core__contract-free.mjs.map +1 -0
- package/dist/relational-core__expression.d.mts +2 -0
- package/dist/relational-core__expression.mjs +2 -0
- package/dist/relational-core__middleware.d.mts +3 -0
- package/dist/relational-core__middleware.mjs +2 -0
- package/dist/relational-core__plan.d.mts +4 -0
- package/dist/relational-core__plan.mjs +2 -0
- package/dist/relational-core__query-lane-context.d.mts +3 -0
- package/dist/relational-core__query-lane-context.mjs +1 -0
- package/dist/relational-core__types.d.mts +3 -0
- package/dist/relational-core__types.mjs +1 -0
- package/dist/resolve-storage-table-DUwyRJmP.d.mts +21 -0
- package/dist/resolve-storage-table-DUwyRJmP.d.mts.map +1 -0
- package/dist/resolve-storage-table-DZsfnzeW.mjs +46 -0
- package/dist/resolve-storage-table-DZsfnzeW.mjs.map +1 -0
- package/dist/runtime-DNewRuec.d.mts +46 -0
- package/dist/runtime-DNewRuec.d.mts.map +1 -0
- package/dist/runtime-tIHpGCcG.mjs +55 -0
- package/dist/runtime-tIHpGCcG.mjs.map +1 -0
- package/dist/runtime.d.mts +4 -0
- package/dist/runtime.mjs +1606 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/schema-differ-DpG_gnur-g5_iks8G.d.mts +47 -0
- package/dist/schema-differ-DpG_gnur-g5_iks8G.d.mts.map +1 -0
- package/dist/schema-ir.d.mts +2 -0
- package/dist/schema-ir.mjs +2 -0
- package/dist/schema-ir__naming.d.mts +2 -0
- package/dist/schema-ir__naming.mjs +2 -0
- package/dist/schema-ir__types.d.mts +3 -0
- package/dist/schema-ir__types.mjs +2 -0
- package/dist/schema-verify-vtFZbmGq-BNfTr6fU.mjs +222 -0
- package/dist/schema-verify-vtFZbmGq-BNfTr6fU.mjs.map +1 -0
- package/dist/serialized-index-B96AwqtU-DcqcB4q_.d.mts +26 -0
- package/dist/serialized-index-B96AwqtU-DcqcB4q_.d.mts.map +1 -0
- package/dist/serialized-index-Dp5_EjXD-DMsw8jf3.mjs +64 -0
- package/dist/serialized-index-Dp5_EjXD-DMsw8jf3.mjs.map +1 -0
- package/dist/sql-contract-serializer-2oBWuxTe-B9hzBBv1.mjs +171 -0
- package/dist/sql-contract-serializer-2oBWuxTe-B9hzBBv1.mjs.map +1 -0
- package/dist/sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts +32 -0
- package/dist/sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts.map +1 -0
- package/dist/sql-index-DsI8HAeK-BJsn-jvD.d.mts +72 -0
- package/dist/sql-index-DsI8HAeK-BJsn-jvD.d.mts.map +1 -0
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts +42 -0
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts.map +1 -0
- package/dist/sql-storage-B0QwiTg6-B8DVctJm.d.mts +171 -0
- package/dist/sql-storage-B0QwiTg6-B8DVctJm.d.mts.map +1 -0
- package/dist/storage-table-BBaAmanc-BwR37LMA.d.mts +130 -0
- package/dist/storage-table-BBaAmanc-BwR37LMA.d.mts.map +1 -0
- package/dist/storage-table-_LWDmPfv-DFhU2dML.mjs +277 -0
- package/dist/storage-table-_LWDmPfv-DFhU2dML.mjs.map +1 -0
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts +41 -0
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts.map +1 -0
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs +173 -0
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs.map +1 -0
- package/dist/types-BchwQpmO.d.mts +16 -0
- package/dist/types-BchwQpmO.d.mts.map +1 -0
- package/dist/types-BgkZru_1-H7yfikSQ.mjs +1444 -0
- package/dist/types-BgkZru_1-H7yfikSQ.mjs.map +1 -0
- package/dist/types-CMMQS6aG.mjs +111 -0
- package/dist/types-CMMQS6aG.mjs.map +1 -0
- package/dist/types-CuDrWc5v-ISVXBmBs.d.mts +134 -0
- package/dist/types-CuDrWc5v-ISVXBmBs.d.mts.map +1 -0
- package/dist/types-CvbBw1Jo-3KQdErJY.d.mts +688 -0
- package/dist/types-CvbBw1Jo-3KQdErJY.d.mts.map +1 -0
- package/dist/types-DIBA80mc-wf5wLmON.d.mts +723 -0
- package/dist/types-DIBA80mc-wf5wLmON.d.mts.map +1 -0
- package/dist/types-DMxc5KZa.d.mts +1 -0
- package/dist/types-Dl20lxky-DC_jdA0T.d.mts +247 -0
- package/dist/types-Dl20lxky-DC_jdA0T.d.mts.map +1 -0
- package/dist/types-DmhUVq4u-BpqqjPJx.mjs +719 -0
- package/dist/types-DmhUVq4u-BpqqjPJx.mjs.map +1 -0
- package/dist/types-IqZMLrFC-DtdJNICr.d.mts +426 -0
- package/dist/types-IqZMLrFC-DtdJNICr.d.mts.map +1 -0
- package/dist/types-TvBZ2Ne9.d.mts +1 -0
- package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts +32 -0
- package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts.map +1 -0
- package/dist/util-DQQgv2j1-D6INZaRG.mjs +34 -0
- package/dist/util-DQQgv2j1-D6INZaRG.mjs.map +1 -0
- package/dist/validators-C4PItWnf.mjs +0 -0
- package/dist/validators-C4PItWnf.mjs.map +1 -0
- package/dist/validators-CxeHhHrf.d.mts +206 -0
- package/dist/validators-CxeHhHrf.d.mts.map +1 -0
- package/dist/value-set-derivation-hook-BhgGVtw0.d.mts +35 -0
- package/dist/value-set-derivation-hook-BhgGVtw0.d.mts.map +1 -0
- package/dist/value-set-derivation-hook-Di9JZ0X7.mjs +22 -0
- package/dist/value-set-derivation-hook-Di9JZ0X7.mjs.map +1 -0
- package/dist/verify-E6Dd2vYp-gYwnlhLm.mjs +86 -0
- package/dist/verify-E6Dd2vYp-gYwnlhLm.mjs.map +1 -0
- package/dist/verify-zDRnw0Rn.d.mts +26 -0
- package/dist/verify-zDRnw0Rn.d.mts.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BHmsZudH.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;UAcU;WACC;WACA;WACA;WACA;;KAEN,0BAA0B,YAAY;UACjC;WACC,kBAAkB,cAAc;WAChC,cAAc;WACd,sBAAsB;;UAEvB,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,yBAAyB;;;;;;;;;EAS/L,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,KAAK;aACM,QAAQ;aACR;aACA;aACA;MACP,QAAQ;EACZ,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB;EAC7C,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;;;;cAIzD,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV;aACE;eACE;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;y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MI,sBAAsB;;;;;;;;;;;;;;iBAcnB,iCAAiC;;;;;;;;;;;iBAWjC,+BAA+B,8BAA8B,2BAA2B;WAC9F,SAAS;WACT,YAAY;;WAEZ;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;iBACA;;;;WAIN;aACE;aACA;eACE,SAAS;eACT,YAAY;eACZ;iBACE;mBACE;mBACA;;iBAEF;mBACE;mBACA;;;;;;;;;;;;;;;iBAeF,uCAAuC,8BAA8B,2BAA2B;WACtG,SAAS;WACT,YAAY;;WAEZ;WACA;aACE;aACA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT,YAAY;aACZ;eACE;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;eAIN;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;;;;;;;;;iBAYJ,0BAA0B,8BAA8B,2BAA2B;WACzF,SAAS;WACT,YAAY;;WAEZ;WACA;aACE;aACA;aACA;aACA;;aAEA;aACA;aACA;aACA;;WAEF;aACE,SAAS;aACT,YAAY;aACZ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;eAIN;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA;;;;;;;;;cASP,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-adapter-C99J7aEF-C-17lFY8.mjs";
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { C as SqlControlDriverInstance } from "./types-CuDrWc5v-ISVXBmBs.mjs";
|
|
2
|
+
import "./types-BchwQpmO.mjs";
|
|
3
|
+
import { Q as LoweredStatement, p as AnyQueryAst } from "./types-DIBA80mc-wf5wLmON.mjs";
|
|
4
|
+
import { s as DdlNode } from "./ddl-types-rrMsf77U-DGctYf-T.mjs";
|
|
5
|
+
import { a as LowererContext, y as SqlExecuteRequest } from "./ast-DSuzmsWn.mjs";
|
|
6
|
+
import { v as SqlSchemaIRNode } from "./types-CvbBw1Jo-3KQdErJY.mjs";
|
|
7
|
+
import "./types-TvBZ2Ne9.mjs";
|
|
8
|
+
import { ColumnDefault, ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
9
|
+
import { ControlAdapterInstance, ControlStack } from "@prisma/orm-framework/components/control";
|
|
10
|
+
//#region ../../../2-sql/9-family/dist/control-adapter-C99J7aEF.d.mts
|
|
11
|
+
//#region src/core/diff/sql-schema-diff.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Function type for normalizing raw database default expressions into ColumnDefault.
|
|
14
|
+
* Target-specific implementations handle database dialect differences.
|
|
15
|
+
*/
|
|
16
|
+
type DefaultNormalizer = (rawDefault: string, nativeType: string) => ColumnDefault | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Function type for normalizing schema native types to canonical form for comparison.
|
|
19
|
+
* Target-specific implementations handle dialect-specific type name variations
|
|
20
|
+
* (e.g., Postgres 'varchar' → 'character varying', 'timestamptz' normalization).
|
|
21
|
+
*/
|
|
22
|
+
type NativeTypeNormalizer = (nativeType: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Compares two arrays of strings for equality (order-sensitive).
|
|
25
|
+
*/
|
|
26
|
+
declare function arraysEqual(a: readonly string[], b: readonly string[]): boolean;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/core/control-adapter.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Structural interface for anything that can lower a SQL/DDL AST node to a
|
|
31
|
+
* `LoweredStatement`. `SqlControlAdapter` satisfies this interface; the
|
|
32
|
+
* migration planner and op-factory calls accept `Lowerer` rather than the
|
|
33
|
+
* full `SqlControlAdapter` so they are not coupled to the broader control
|
|
34
|
+
* adapter surface.
|
|
35
|
+
*/
|
|
36
|
+
interface Lowerer {
|
|
37
|
+
lower(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): LoweredStatement;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Extends {@link Lowerer} with async codec-routed DDL lowering. Control
|
|
41
|
+
* adapters implement this; the planner's `CreateTableCall.toOp` and
|
|
42
|
+
* `CreateSchemaCall.toOp` accept it to produce executable DDL statements
|
|
43
|
+
* with literal defaults encoded through their codec.
|
|
44
|
+
*/
|
|
45
|
+
interface ExecuteRequestLowerer extends Lowerer {
|
|
46
|
+
lowerToExecuteRequest(ast: AnyQueryAst | DdlNode, context?: LowererContext<unknown>): Promise<SqlExecuteRequest>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* SQL control adapter interface for control-plane operations.
|
|
50
|
+
* Implemented by target-specific adapters (e.g., Postgres, MySQL).
|
|
51
|
+
*
|
|
52
|
+
* @template TTarget - The target ID (e.g., 'postgres', 'mysql')
|
|
53
|
+
*/
|
|
54
|
+
interface SqlControlAdapter<TTarget extends string = string> extends ControlAdapterInstance<'sql', TTarget>, ExecuteRequestLowerer {
|
|
55
|
+
/**
|
|
56
|
+
* Reads the contract marker for `space` from the database, returning
|
|
57
|
+
* `null` if no marker row exists for that space (or if the marker
|
|
58
|
+
* table itself is missing). Implementations are responsible for the
|
|
59
|
+
* dialect-specific existence probe (e.g. Postgres
|
|
60
|
+
* `information_schema.tables` vs SQLite `sqlite_master`) and parameter
|
|
61
|
+
* placeholders.
|
|
62
|
+
*
|
|
63
|
+
* `space` is required so callers cannot accidentally fall through to
|
|
64
|
+
* the app's marker row when reading per-extension markers.
|
|
65
|
+
*
|
|
66
|
+
* @param driver - ControlDriverInstance for executing queries (target-specific)
|
|
67
|
+
* @param space - Contract space id whose marker row to read (e.g. `'app'`)
|
|
68
|
+
* @returns Resolved marker record, or `null` if not yet stamped.
|
|
69
|
+
*/
|
|
70
|
+
readMarker(driver: SqlControlDriverInstance<TTarget>, space: string): Promise<ContractMarkerRecord | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Reads every marker row from `prisma_contract.marker` (one per
|
|
73
|
+
* contract space) and returns them keyed by `space`. Used by the
|
|
74
|
+
* per-space verifier to detect marker-vs-on-disk drift and orphan
|
|
75
|
+
* marker rows. Returns an empty map when the marker table does not
|
|
76
|
+
* yet exist (fresh database / never-signed project).
|
|
77
|
+
*/
|
|
78
|
+
readAllMarkers(driver: SqlControlDriverInstance<TTarget>): Promise<ReadonlyMap<string, ContractMarkerRecord>>;
|
|
79
|
+
/**
|
|
80
|
+
* Reads the per-migration ledger journal in apply order. When `space` is
|
|
81
|
+
* omitted, returns rows for every space.
|
|
82
|
+
*/
|
|
83
|
+
readLedger(driver: SqlControlDriverInstance<TTarget>, space?: string): Promise<readonly LedgerEntryRecord[]>;
|
|
84
|
+
/**
|
|
85
|
+
* Inserts the initial marker row for `space` (`INSERT` only). Fails when a
|
|
86
|
+
* row for that space already exists. Used by `sign()` so concurrent first-time
|
|
87
|
+
* stamps cannot silently overwrite each other. `updated_at` is DB-side
|
|
88
|
+
* (`now()` / `datetime('now')`). Mirrors `MongoControlAdapter.initMarker`.
|
|
89
|
+
*/
|
|
90
|
+
insertMarker(driver: SqlControlDriverInstance<TTarget>, space: string, destination: {
|
|
91
|
+
readonly storageHash: string;
|
|
92
|
+
readonly profileHash: string;
|
|
93
|
+
readonly invariants?: readonly string[];
|
|
94
|
+
}): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Writes the initial marker row for `space` as an upsert (`INSERT … ON
|
|
97
|
+
* CONFLICT (space) DO UPDATE SET …`), so re-stamping a space overwrites the
|
|
98
|
+
* existing row rather than failing. `updated_at` is stamped with a DB-side
|
|
99
|
+
* time expression (`now()` / `datetime('now')`), never an app-side clock.
|
|
100
|
+
*/
|
|
101
|
+
initMarker(driver: SqlControlDriverInstance<TTarget>, space: string, destination: {
|
|
102
|
+
readonly storageHash: string;
|
|
103
|
+
readonly profileHash: string;
|
|
104
|
+
readonly invariants?: readonly string[];
|
|
105
|
+
}): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Atomically advances the marker row for `space` (compare-and-swap on
|
|
108
|
+
* `core_hash = expectedFrom`). Returns `true` when the swap matched a row,
|
|
109
|
+
* `false` when another process advanced the marker first. `destination.invariants`
|
|
110
|
+
* is written verbatim when supplied (the union/dedupe policy lives upstream)
|
|
111
|
+
* and left untouched when omitted. Mirrors `MongoControlAdapter.updateMarker`.
|
|
112
|
+
*/
|
|
113
|
+
updateMarker(driver: SqlControlDriverInstance<TTarget>, space: string, expectedFrom: string, destination: {
|
|
114
|
+
readonly storageHash: string;
|
|
115
|
+
readonly profileHash: string;
|
|
116
|
+
readonly invariants?: readonly string[];
|
|
117
|
+
}): Promise<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Appends a ledger entry for `space`. Mirrors `MongoControlAdapter.writeLedgerEntry`.
|
|
120
|
+
* The SQL ledger table keys rows by an autoincrement id and partitions reads
|
|
121
|
+
* by `space`, so `entry.edgeId` carries no dedicated column; `from` / `to`
|
|
122
|
+
* land in `origin_core_hash` / `destination_core_hash`.
|
|
123
|
+
*/
|
|
124
|
+
writeLedgerEntry(driver: SqlControlDriverInstance<TTarget>, space: string, entry: {
|
|
125
|
+
readonly edgeId: string;
|
|
126
|
+
readonly from: string;
|
|
127
|
+
readonly to: string;
|
|
128
|
+
readonly migrationName: string;
|
|
129
|
+
readonly migrationHash: string;
|
|
130
|
+
readonly operations: readonly unknown[];
|
|
131
|
+
readonly destinationContractJson?: unknown;
|
|
132
|
+
}): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Introspects a database schema and returns the target's schema-IR node.
|
|
135
|
+
*
|
|
136
|
+
* This is a pure schema discovery operation that queries the database catalog
|
|
137
|
+
* and returns the schema structure without type mapping or contract enrichment.
|
|
138
|
+
* Type mapping and enrichment are handled separately by enrichment helpers.
|
|
139
|
+
*
|
|
140
|
+
* The return type is the family-base `SqlSchemaIRNode` so each target returns
|
|
141
|
+
* its own node shape: SQLite returns a flat `SqlSchemaIR`, Postgres returns a
|
|
142
|
+
* `PostgresDatabaseSchemaNode` tree root. Consumers `ensure` the concrete
|
|
143
|
+
* target type before walking it.
|
|
144
|
+
*
|
|
145
|
+
* @param driver - ControlDriverInstance instance for executing queries (target-specific)
|
|
146
|
+
* @param contract - Optional contract for contract-guided introspection (filtering, optimization)
|
|
147
|
+
* @param schema - Schema name to introspect (defaults to 'public')
|
|
148
|
+
* @returns Promise resolving to the live database schema node
|
|
149
|
+
*/
|
|
150
|
+
introspect(driver: SqlControlDriverInstance<TTarget>, contract?: unknown, schema?: string): Promise<SqlSchemaIRNode>;
|
|
151
|
+
/**
|
|
152
|
+
* Optional target-specific normalizer for raw database default expressions.
|
|
153
|
+
* When provided, schema defaults (raw strings) are normalized before comparison
|
|
154
|
+
* with contract defaults (ColumnDefault objects) during schema verification.
|
|
155
|
+
*/
|
|
156
|
+
readonly normalizeDefault?: DefaultNormalizer;
|
|
157
|
+
/**
|
|
158
|
+
* Optional target-specific normalizer for schema native type names.
|
|
159
|
+
* When provided, schema native types (from introspection) are normalized
|
|
160
|
+
* before comparison with contract native types during schema verification.
|
|
161
|
+
*/
|
|
162
|
+
readonly normalizeNativeType?: NativeTypeNormalizer;
|
|
163
|
+
/**
|
|
164
|
+
* Ordered DDL queries that bootstrap marker/ledger control tables for migration
|
|
165
|
+
* runners. Postgres includes `CREATE SCHEMA`; SQLite does not.
|
|
166
|
+
*/
|
|
167
|
+
bootstrapControlTableQueries(): readonly DdlNode[];
|
|
168
|
+
/**
|
|
169
|
+
* Ordered DDL queries that bootstrap the marker table (and Postgres schema) for
|
|
170
|
+
* `sign` — excludes the ledger table.
|
|
171
|
+
*/
|
|
172
|
+
bootstrapSignMarkerQueries(): readonly DdlNode[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* SQL control adapter descriptor interface.
|
|
176
|
+
* Provides a factory method to create control adapter instances.
|
|
177
|
+
*
|
|
178
|
+
* @template TTarget - The target ID (e.g., 'postgres', 'mysql')
|
|
179
|
+
*/
|
|
180
|
+
interface SqlControlAdapterDescriptor<TTarget extends string = string> {
|
|
181
|
+
/**
|
|
182
|
+
* Creates a SQL control adapter instance for control-plane operations.
|
|
183
|
+
*
|
|
184
|
+
* Receives the assembled `ControlStack` so adapters can read aggregated
|
|
185
|
+
* metadata (codec lookup, extension contributions) when materializing.
|
|
186
|
+
*/
|
|
187
|
+
create(stack: ControlStack<'sql', TTarget>): SqlControlAdapter<TTarget>;
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
export { SqlControlAdapterDescriptor as a, SqlControlAdapter as i, Lowerer as n, arraysEqual as o, NativeTypeNormalizer as r, ExecuteRequestLowerer as t };
|
|
191
|
+
//# sourceMappingURL=control-adapter-C99J7aEF-C-17lFY8.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-adapter-C99J7aEF-C-17lFY8.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control-adapter-C99J7aEF.d.mts"],"mappings":";;;;;;;;;;;;;;;KAUK,qBAAqB,oBAAoB,uBAAuB;;;;;;KAMhE,wBAAwB;;;;iBAIZ,YAAY,sBAAsB;;;;;;;;;;UAUzC;EACR,MAAM,KAAK,cAAc,SAAS,SAAS,0BAA0B;;;;;;;;UAQ7D,8BAA8B;EACtC,sBAAsB,KAAK,cAAc,SAAS,UAAU,0BAA0B,QAAQ;;;;;;;;UAQtF,kBAAkB,yCAAyC,8BAA8B,UAAU;;;;;;;;;;;;;;;;EAgB3G,WAAW,QAAQ,yBAAyB,UAAU,gBAAgB,QAAQ;;;;;;;;EAQ9E,eAAe,QAAQ,yBAAyB,WAAW,QAAQ,oBAAoB;;;;;EAKvF,WAAW,QAAQ,yBAAyB,UAAU,iBAAiB,iBAAiB;;;;;;;EAOxF,aAAa,QAAQ,yBAAyB,UAAU,eAAe;aAC5D;aACA;aACA;MACP;;;;;;;EAOJ,WAAW,QAAQ,yBAAyB,UAAU,eAAe;aAC1D;aACA;aACA;MACP;;;;;;;;EAQJ,aAAa,QAAQ,yBAAyB,UAAU,eAAe,sBAAsB;aAClF;aACA;aACA;MACP;;;;;;;EAOJ,iBAAiB,QAAQ,yBAAyB,UAAU,eAAe;aAChE;aACA;aACA;aACA;aACA;aACA;aACA;MACP;;;;;;;;;;;;;;;;;;EAkBJ,WAAW,QAAQ,yBAAyB,UAAU,oBAAoB,kBAAkB,QAAQ;;;;;;WAM3F,mBAAmB;;;;;;WAMnB,sBAAsB;;;;;EAK/B,yCAAyC;;;;;EAKzC,uCAAuC;;;;;;;;UAQ/B,4BAA4B;;;;;;;EAOpC,OAAO,OAAO,oBAAoB,WAAW,kBAAkB"}
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { a as StorageTable } from "./storage-table-BBaAmanc-BwR37LMA.mjs";
|
|
2
|
+
import { a as ExtractCodecTypes, b as QueryOperationTypesBase, c as ExtractQueryOperationTypes, l as ExtractStorageColumnInputTypes, u as ExtractStorageColumnTypes } from "./types-CuDrWc5v-ISVXBmBs.mjs";
|
|
3
|
+
import { t as StorageColumnMapAt } from "./types-BchwQpmO.mjs";
|
|
4
|
+
import { ft as SelectAst, s as AnyFromSource } from "./types-DIBA80mc-wf5wLmON.mjs";
|
|
5
|
+
import "./ast-DSuzmsWn.mjs";
|
|
6
|
+
import { a as Expression, c as RawSqlTag, d as TraitExpression, n as CodecExpression, r as CodecTypesBase, u as ScopeField } from "./expression-DIf8F4Mc.mjs";
|
|
7
|
+
import { t as SqlQueryPlan } from "./plan-BTD8xFfa-Dd_K-A1R.mjs";
|
|
8
|
+
import "./plan-Cm4jaoNM.mjs";
|
|
9
|
+
import { AnnotationValue, OperationKind, ValidAnnotations } from "@prisma/orm-framework/components/runtime";
|
|
10
|
+
//#region ../../../2-sql/4-lanes/sql-builder/dist/db-DhMsmBS-.d.mts
|
|
11
|
+
//#region src/scope.d.ts
|
|
12
|
+
type GatedMethod<Capabilities, Required, Method> = Capabilities extends Required ? Method : never;
|
|
13
|
+
declare const JoinOuterScope: unique symbol;
|
|
14
|
+
declare const SubqueryMarker: unique symbol;
|
|
15
|
+
type Expand<T> = { [K in keyof T]: T[K]; } & unknown;
|
|
16
|
+
type EmptyRow = Record<never, ScopeField>;
|
|
17
|
+
type ScopeTable = Record<string, ScopeField>;
|
|
18
|
+
type Scope = {
|
|
19
|
+
topLevel: ScopeTable;
|
|
20
|
+
namespaces: Record<string, ScopeTable>;
|
|
21
|
+
};
|
|
22
|
+
type JoinSource<Row extends ScopeTable, Alias extends string> = {
|
|
23
|
+
readonly [JoinOuterScope]: {
|
|
24
|
+
topLevel: Row;
|
|
25
|
+
namespaces: Record<Alias, Row>;
|
|
26
|
+
};
|
|
27
|
+
getJoinOuterScope(): Scope;
|
|
28
|
+
buildAst(): AnyFromSource;
|
|
29
|
+
};
|
|
30
|
+
type DefaultScope<Name extends string, Table extends StorageTable> = {
|
|
31
|
+
topLevel: StorageTableToScopeTable<Table>;
|
|
32
|
+
namespaces: { [K in Name]: StorageTableToScopeTable<Table>; };
|
|
33
|
+
};
|
|
34
|
+
type StorageTableToScopeTable<T extends StorageTable> = { [K in keyof T['columns']]: {
|
|
35
|
+
codecId: T['columns'][K]['codecId'];
|
|
36
|
+
nullable: T['columns'][K]['nullable'];
|
|
37
|
+
} & (T['columns'][K] extends {
|
|
38
|
+
many: true;
|
|
39
|
+
} ? {
|
|
40
|
+
many: true;
|
|
41
|
+
} : Record<never, never>); };
|
|
42
|
+
type MergeScopes<A extends Scope, B extends Scope> = {
|
|
43
|
+
topLevel: Expand<Omit<A['topLevel'], keyof B['topLevel']> & Omit<B['topLevel'], keyof A['topLevel']>>;
|
|
44
|
+
namespaces: Expand<A['namespaces'] & B['namespaces']>;
|
|
45
|
+
};
|
|
46
|
+
type RebindScope<S extends Scope, OldKey extends string, NewKey extends string> = {
|
|
47
|
+
topLevel: S['topLevel'];
|
|
48
|
+
namespaces: Expand<Omit<S['namespaces'], OldKey> & Record<NewKey, S['namespaces'][OldKey]>>;
|
|
49
|
+
};
|
|
50
|
+
type NullableScopeTable<S extends ScopeTable> = { [K in keyof S]: {
|
|
51
|
+
codecId: S[K]['codecId'];
|
|
52
|
+
nullable: true;
|
|
53
|
+
}; };
|
|
54
|
+
type NullableScope<S extends Scope> = {
|
|
55
|
+
topLevel: NullableScopeTable<S['topLevel']>;
|
|
56
|
+
namespaces: { [TableName in keyof S['namespaces']]: NullableScopeTable<S['namespaces'][TableName]>; };
|
|
57
|
+
};
|
|
58
|
+
type Subquery<RowType extends Record<string, ScopeField>> = {
|
|
59
|
+
[SubqueryMarker]: RowType;
|
|
60
|
+
buildAst(): SelectAst;
|
|
61
|
+
getRowFields(): Record<string, ScopeField>;
|
|
62
|
+
};
|
|
63
|
+
type QueryContext = {
|
|
64
|
+
readonly codecTypes: CodecTypesBase;
|
|
65
|
+
readonly capabilities: Record<string, Record<string, boolean>>;
|
|
66
|
+
readonly queryOperationTypes: QueryOperationTypesBase;
|
|
67
|
+
readonly resolvedColumnOutputTypes: Record<string, unknown>;
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/expression.d.ts
|
|
71
|
+
type BooleanCodecType = {
|
|
72
|
+
codecId: 'pg/bool@1';
|
|
73
|
+
nullable: boolean;
|
|
74
|
+
};
|
|
75
|
+
type WithField<Source, Field extends ScopeField, Alias extends string> = Expand<Source & { [K in Alias]: Field; }>;
|
|
76
|
+
type WithFields<Source, FromScope extends ScopeTable, Columns extends readonly (keyof FromScope)[]> = Expand<Source & Pick<FromScope, Columns[number]>>;
|
|
77
|
+
type ExtractScopeFields<T extends Record<string, Expression<ScopeField>>> = { [K in keyof T]: T[K] extends Expression<infer F extends ScopeField> ? F : never; };
|
|
78
|
+
type FieldProxy<AvailableScope extends Scope> = { [K in keyof AvailableScope['topLevel']]: Expression<AvailableScope['topLevel'][K]>; } & { [TableName in keyof AvailableScope['namespaces']]: { [K in keyof AvailableScope['namespaces'][TableName]]: Expression<AvailableScope['namespaces'][TableName][K]>; }; };
|
|
79
|
+
type ExpressionBuilder<AvailableScope extends Scope, QC extends QueryContext> = (fields: FieldProxy<AvailableScope>, fns: Functions<QC>) => Expression<BooleanCodecType>;
|
|
80
|
+
type OrderByDirection = 'asc' | 'desc';
|
|
81
|
+
type OrderByNulls = 'first' | 'last';
|
|
82
|
+
type OrderByOptions = {
|
|
83
|
+
direction?: OrderByDirection;
|
|
84
|
+
nulls?: OrderByNulls;
|
|
85
|
+
};
|
|
86
|
+
type OrderByScope<AvailableScope extends Scope, RowType extends Record<string, ScopeField>> = {
|
|
87
|
+
topLevel: Expand<AvailableScope['topLevel'] & RowType>;
|
|
88
|
+
namespaces: AvailableScope['namespaces'];
|
|
89
|
+
};
|
|
90
|
+
type DeriveExtFunctions<OT extends QueryOperationTypesBase> = { [K in keyof OT]: OT[K]['impl']; };
|
|
91
|
+
type BuiltinFunctions<CT extends Record<string, {
|
|
92
|
+
readonly input: unknown;
|
|
93
|
+
}>> = {
|
|
94
|
+
eq: <CodecId extends string>(a: CodecExpression<CodecId, boolean, CT> | null, b: CodecExpression<CodecId, boolean, CT> | null) => Expression<BooleanCodecType>;
|
|
95
|
+
ne: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT> | null, b: CodecExpression<CodecId, N, CT> | null) => Expression<BooleanCodecType>;
|
|
96
|
+
gt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
|
|
97
|
+
gte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
|
|
98
|
+
lt: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
|
|
99
|
+
lte: <CodecId extends string, N extends boolean>(a: CodecExpression<CodecId, N, CT>, b: CodecExpression<CodecId, N, CT>) => Expression<BooleanCodecType>;
|
|
100
|
+
and: (...ands: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
|
|
101
|
+
or: (...ors: CodecExpression<'pg/bool@1', boolean, CT>[]) => Expression<BooleanCodecType>;
|
|
102
|
+
exists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
|
|
103
|
+
notExists: (subquery: Subquery<Record<string, ScopeField>>) => Expression<BooleanCodecType>;
|
|
104
|
+
in: {
|
|
105
|
+
<CodecId extends string>(expr: Expression<{
|
|
106
|
+
codecId: CodecId;
|
|
107
|
+
nullable: boolean;
|
|
108
|
+
}>, subquery: Subquery<Record<string, {
|
|
109
|
+
codecId: CodecId;
|
|
110
|
+
nullable: boolean;
|
|
111
|
+
}>>): Expression<BooleanCodecType>;
|
|
112
|
+
<CodecId extends string>(expr: Expression<{
|
|
113
|
+
codecId: CodecId;
|
|
114
|
+
nullable: boolean;
|
|
115
|
+
}>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
|
|
116
|
+
};
|
|
117
|
+
notIn: {
|
|
118
|
+
<CodecId extends string>(expr: Expression<{
|
|
119
|
+
codecId: CodecId;
|
|
120
|
+
nullable: boolean;
|
|
121
|
+
}>, subquery: Subquery<Record<string, {
|
|
122
|
+
codecId: CodecId;
|
|
123
|
+
nullable: boolean;
|
|
124
|
+
}>>): Expression<BooleanCodecType>;
|
|
125
|
+
<CodecId extends string>(expr: Expression<{
|
|
126
|
+
codecId: CodecId;
|
|
127
|
+
nullable: boolean;
|
|
128
|
+
}>, values: Array<CodecExpression<CodecId, boolean, CT>>): Expression<BooleanCodecType>;
|
|
129
|
+
};
|
|
130
|
+
readonly raw: RawSqlTag;
|
|
131
|
+
};
|
|
132
|
+
type Functions<QC extends QueryContext> = BuiltinFunctions<QC['codecTypes']> & DeriveExtFunctions<QC['queryOperationTypes']>;
|
|
133
|
+
type CountField = {
|
|
134
|
+
codecId: 'pg/int8@1';
|
|
135
|
+
nullable: false;
|
|
136
|
+
};
|
|
137
|
+
type AggregateOnlyFunctions = {
|
|
138
|
+
count: (expr?: Expression<ScopeField>) => Expression<CountField>;
|
|
139
|
+
sum: <T extends ScopeField>(expr: Expression<T>) => Expression<{
|
|
140
|
+
codecId: T['codecId'];
|
|
141
|
+
nullable: true;
|
|
142
|
+
}>;
|
|
143
|
+
avg: <T extends ScopeField>(expr: Expression<T>) => Expression<{
|
|
144
|
+
codecId: T['codecId'];
|
|
145
|
+
nullable: true;
|
|
146
|
+
}>;
|
|
147
|
+
min: <T extends ScopeField>(expr: Expression<T>) => Expression<{
|
|
148
|
+
codecId: T['codecId'];
|
|
149
|
+
nullable: true;
|
|
150
|
+
}>;
|
|
151
|
+
max: <T extends ScopeField>(expr: Expression<T>) => Expression<{
|
|
152
|
+
codecId: T['codecId'];
|
|
153
|
+
nullable: true;
|
|
154
|
+
}>;
|
|
155
|
+
};
|
|
156
|
+
type AggregateFunctions<QC extends QueryContext> = Functions<QC> & AggregateOnlyFunctions;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/resolve.d.ts
|
|
159
|
+
type ResolveField<F extends ScopeField, CodecTypes extends Record<string, {
|
|
160
|
+
readonly output: unknown;
|
|
161
|
+
}>> = F['codecId'] extends keyof CodecTypes ? F['nullable'] extends true ? CodecTypes[F['codecId']]['output'] | null : CodecTypes[F['codecId']]['output'] : unknown;
|
|
162
|
+
type ApplyNullable<T, F extends ScopeField> = F['nullable'] extends true ? T | null : T;
|
|
163
|
+
type ResolveRow<Row extends Record<string, ScopeField>, CodecTypes extends Record<string, {
|
|
164
|
+
readonly output: unknown;
|
|
165
|
+
}>, PreResolved extends Record<string, unknown> = Record<string, never>> = Expand<{ -readonly [K in keyof Row]: string extends keyof PreResolved ? ResolveField<Row[K], CodecTypes> : K extends keyof PreResolved ? ApplyNullable<NonNullable<PreResolved[K & keyof PreResolved]>, Row[K]> : ResolveField<Row[K], CodecTypes>; }>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/types/mutation-query.d.ts
|
|
168
|
+
type ReturningCapability = {
|
|
169
|
+
sql: {
|
|
170
|
+
returning: true;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
type InsertValues<Table extends StorageTable, CT extends Record<string, {
|
|
174
|
+
readonly input: unknown;
|
|
175
|
+
}>> = { [K in keyof Table['columns']]?: Table['columns'][K]['codecId'] extends keyof CT ? CT[Table['columns'][K]['codecId']]['input'] : unknown; };
|
|
176
|
+
interface InsertQuery<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField>> {
|
|
177
|
+
/**
|
|
178
|
+
* Attach one or more write-typed annotations to this query plan.
|
|
179
|
+
* Annotations declare `applicableTo: ['write']` (or `['read', 'write']`)
|
|
180
|
+
* via `defineAnnotation`; read-only annotations fail to compile here.
|
|
181
|
+
* Annotations are merged into `plan.meta.annotations` at `.build()` time.
|
|
182
|
+
* Chainable in any position; multiple calls compose with last-write-wins
|
|
183
|
+
* on duplicate namespaces.
|
|
184
|
+
*/
|
|
185
|
+
annotate<As extends readonly AnnotationValue<unknown, OperationKind>[]>(...annotations: As & ValidAnnotations<'write', As>): InsertQuery<QC, AvailableScope, RowType>;
|
|
186
|
+
returning: GatedMethod<QC['capabilities'], ReturningCapability, <Columns extends (keyof AvailableScope['topLevel'] & string)[]>(...columns: Columns) => InsertQuery<QC, AvailableScope, WithFields<EmptyRow, AvailableScope['topLevel'], Columns>>>;
|
|
187
|
+
build(): SqlQueryPlan<ResolveRow<RowType, QC['codecTypes'], QC['resolvedColumnOutputTypes']>>;
|
|
188
|
+
}
|
|
189
|
+
interface UpdateQuery<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField>> {
|
|
190
|
+
/**
|
|
191
|
+
* Attach one or more write-typed annotations to this query plan.
|
|
192
|
+
* See `InsertQuery.annotate` for semantics.
|
|
193
|
+
*/
|
|
194
|
+
annotate<As extends readonly AnnotationValue<unknown, OperationKind>[]>(...annotations: As & ValidAnnotations<'write', As>): UpdateQuery<QC, AvailableScope, RowType>;
|
|
195
|
+
where(expr: ExpressionBuilder<AvailableScope, QC>): UpdateQuery<QC, AvailableScope, RowType>;
|
|
196
|
+
returning: GatedMethod<QC['capabilities'], ReturningCapability, <Columns extends (keyof AvailableScope['topLevel'] & string)[]>(...columns: Columns) => UpdateQuery<QC, AvailableScope, WithFields<EmptyRow, AvailableScope['topLevel'], Columns>>>;
|
|
197
|
+
build(): SqlQueryPlan<ResolveRow<RowType, QC['codecTypes'], QC['resolvedColumnOutputTypes']>>;
|
|
198
|
+
}
|
|
199
|
+
interface DeleteQuery<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField>> {
|
|
200
|
+
/**
|
|
201
|
+
* Attach one or more write-typed annotations to this query plan.
|
|
202
|
+
* See `InsertQuery.annotate` for semantics.
|
|
203
|
+
*/
|
|
204
|
+
annotate<As extends readonly AnnotationValue<unknown, OperationKind>[]>(...annotations: As & ValidAnnotations<'write', As>): DeleteQuery<QC, AvailableScope, RowType>;
|
|
205
|
+
where(expr: ExpressionBuilder<AvailableScope, QC>): DeleteQuery<QC, AvailableScope, RowType>;
|
|
206
|
+
returning: GatedMethod<QC['capabilities'], ReturningCapability, <Columns extends (keyof AvailableScope['topLevel'] & string)[]>(...columns: Columns) => DeleteQuery<QC, AvailableScope, WithFields<EmptyRow, AvailableScope['topLevel'], Columns>>>;
|
|
207
|
+
build(): SqlQueryPlan<ResolveRow<RowType, QC['codecTypes'], QC['resolvedColumnOutputTypes']>>;
|
|
208
|
+
}
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/types/joined-tables.d.ts
|
|
211
|
+
interface JoinedTables<QC extends QueryContext, AvailableScope extends Scope> extends WithSelect<QC, AvailableScope, EmptyRow>, WithJoin<QC, AvailableScope, QC['capabilities']> {}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/types/grouped-query.d.ts
|
|
214
|
+
interface GroupedQuery<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField>> extends Subquery<RowType>, WithPagination<QC>, WithDistinct, WithAlias<RowType>, WithBuild<QC, RowType> {
|
|
215
|
+
/**
|
|
216
|
+
* Attach one or more read-typed annotations to this query plan.
|
|
217
|
+
* Annotations declare `applicableTo: ['read']` (or `['read', 'write']`)
|
|
218
|
+
* via `defineAnnotation`; write-only annotations fail to compile here.
|
|
219
|
+
* Annotations are merged into `plan.meta.annotations` at `.build()` time.
|
|
220
|
+
* Chainable in any position; multiple calls compose with last-write-wins
|
|
221
|
+
* on duplicate namespaces.
|
|
222
|
+
*/
|
|
223
|
+
annotate<As extends readonly AnnotationValue<unknown, OperationKind>[]>(...annotations: As & ValidAnnotations<'read', As>): GroupedQuery<QC, AvailableScope, RowType>;
|
|
224
|
+
groupBy(...fields: ((keyof RowType | keyof AvailableScope['topLevel']) & string)[]): GroupedQuery<QC, AvailableScope, RowType>;
|
|
225
|
+
groupBy(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: Functions<QC>) => Expression<ScopeField>): GroupedQuery<QC, AvailableScope, RowType>;
|
|
226
|
+
having(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: AggregateFunctions<QC>) => Expression<BooleanCodecType>): GroupedQuery<QC, AvailableScope, RowType>;
|
|
227
|
+
orderBy(field: (keyof RowType | keyof AvailableScope['topLevel']) & string, options?: OrderByOptions): GroupedQuery<QC, AvailableScope, RowType>;
|
|
228
|
+
orderBy(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: AggregateFunctions<QC>) => Expression<ScopeField>, options?: OrderByOptions): GroupedQuery<QC, AvailableScope, RowType>;
|
|
229
|
+
distinctOn: GatedMethod<QC['capabilities'], {
|
|
230
|
+
postgres: {
|
|
231
|
+
distinctOn: true;
|
|
232
|
+
};
|
|
233
|
+
}, {
|
|
234
|
+
(...fields: ((keyof RowType | keyof AvailableScope['topLevel']) & string)[]): GroupedQuery<QC, AvailableScope, RowType>;
|
|
235
|
+
(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: Functions<QC>) => Expression<ScopeField>): GroupedQuery<QC, AvailableScope, RowType>;
|
|
236
|
+
}>;
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/types/select-query.d.ts
|
|
240
|
+
interface SelectQuery<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField>> extends Subquery<RowType>, WithSelect<QC, AvailableScope, RowType>, WithPagination<QC>, WithDistinct, WithAlias<RowType>, WithBuild<QC, RowType> {
|
|
241
|
+
/**
|
|
242
|
+
* Attach one or more read-typed annotations to this query plan.
|
|
243
|
+
* Annotations declare `applicableTo: ['read']` (or `['read', 'write']`)
|
|
244
|
+
* via `defineAnnotation`; write-only annotations fail to compile here.
|
|
245
|
+
* Annotations are merged into `plan.meta.annotations` at `.build()` time.
|
|
246
|
+
* Chainable in any position; multiple calls compose with last-write-wins
|
|
247
|
+
* on duplicate namespaces.
|
|
248
|
+
*/
|
|
249
|
+
annotate<As extends readonly AnnotationValue<unknown, OperationKind>[]>(...annotations: As & ValidAnnotations<'read', As>): SelectQuery<QC, AvailableScope, RowType>;
|
|
250
|
+
where(expr: ExpressionBuilder<AvailableScope, QC>): SelectQuery<QC, AvailableScope, RowType>;
|
|
251
|
+
orderBy(field: (keyof RowType | keyof AvailableScope['topLevel']) & string, options?: OrderByOptions): SelectQuery<QC, AvailableScope, RowType>;
|
|
252
|
+
orderBy(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: Functions<QC>) => Expression<ScopeField>, options?: OrderByOptions): SelectQuery<QC, AvailableScope, RowType>;
|
|
253
|
+
groupBy(...fields: ((keyof RowType | keyof AvailableScope['topLevel']) & string)[]): GroupedQuery<QC, AvailableScope, RowType>;
|
|
254
|
+
groupBy(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: Functions<QC>) => Expression<ScopeField>): GroupedQuery<QC, AvailableScope, RowType>;
|
|
255
|
+
distinctOn: GatedMethod<QC['capabilities'], {
|
|
256
|
+
postgres: {
|
|
257
|
+
distinctOn: true;
|
|
258
|
+
};
|
|
259
|
+
}, {
|
|
260
|
+
(...fields: ((keyof RowType | keyof AvailableScope['topLevel']) & string)[]): SelectQuery<QC, AvailableScope, RowType>;
|
|
261
|
+
(expr: (fields: FieldProxy<OrderByScope<AvailableScope, RowType>>, fns: Functions<QC>) => Expression<ScopeField>): SelectQuery<QC, AvailableScope, RowType>;
|
|
262
|
+
}>;
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/types/shared.d.ts
|
|
266
|
+
interface LateralBuilder<QC extends QueryContext, ParentScope extends Scope> {
|
|
267
|
+
from<Other extends JoinSource<ScopeTable, string | never>>(other: Other): SelectQuery<QC, MergeScopes<ParentScope, Other[typeof JoinOuterScope]>, EmptyRow>;
|
|
268
|
+
}
|
|
269
|
+
interface WithSelect<QC extends QueryContext, AvailableScope extends Scope, RowType extends Record<string, ScopeField> = EmptyRow> {
|
|
270
|
+
select<Columns extends (keyof AvailableScope['topLevel'] & string)[]>(...columns: Columns): SelectQuery<QC, AvailableScope, WithFields<RowType, AvailableScope['topLevel'], Columns>>;
|
|
271
|
+
select<Alias extends string, Field extends ScopeField>(alias: Alias, expr: (fields: FieldProxy<AvailableScope>, fns: AggregateFunctions<QC>) => Expression<Field>): SelectQuery<QC, AvailableScope, WithField<RowType, Field, Alias>>;
|
|
272
|
+
select<Result extends Record<string, Expression<ScopeField>>>(callback: (fields: FieldProxy<AvailableScope>, fns: AggregateFunctions<QC>) => Result): SelectQuery<QC, AvailableScope, Expand<RowType & ExtractScopeFields<Result>>>;
|
|
273
|
+
}
|
|
274
|
+
interface WithJoin<QC extends QueryContext, AvailableScope extends Scope, Capabilities> {
|
|
275
|
+
innerJoin<Other extends JoinSource<ScopeTable, string | never>>(other: Other, on: ExpressionBuilder<MergeScopes<AvailableScope, Other[typeof JoinOuterScope]>, QC>): JoinedTables<QC, MergeScopes<AvailableScope, Other[typeof JoinOuterScope]>>;
|
|
276
|
+
outerLeftJoin<Other extends JoinSource<ScopeTable, string | never>>(other: Other, on: ExpressionBuilder<MergeScopes<AvailableScope, Other[typeof JoinOuterScope]>, QC>): JoinedTables<QC, MergeScopes<AvailableScope, NullableScope<Other[typeof JoinOuterScope]>>>;
|
|
277
|
+
outerRightJoin<Other extends JoinSource<ScopeTable, string | never>>(other: Other, on: ExpressionBuilder<MergeScopes<AvailableScope, Other[typeof JoinOuterScope]>, QC>): JoinedTables<QC, MergeScopes<NullableScope<AvailableScope>, Other[typeof JoinOuterScope]>>;
|
|
278
|
+
outerFullJoin<Other extends JoinSource<ScopeTable, string | never>>(other: Other, on: ExpressionBuilder<MergeScopes<AvailableScope, Other[typeof JoinOuterScope]>, QC>): JoinedTables<QC, MergeScopes<NullableScope<AvailableScope>, NullableScope<Other[typeof JoinOuterScope]>>>;
|
|
279
|
+
lateralJoin: GatedMethod<Capabilities, {
|
|
280
|
+
sql: {
|
|
281
|
+
lateral: true;
|
|
282
|
+
};
|
|
283
|
+
}, <Alias extends string, LateralRow extends Record<string, ScopeField>>(alias: Alias, builder: (lateral: LateralBuilder<QC, AvailableScope>) => Subquery<LateralRow>) => JoinedTables<QC, MergeScopes<AvailableScope, {
|
|
284
|
+
topLevel: LateralRow;
|
|
285
|
+
namespaces: Record<Alias, LateralRow>;
|
|
286
|
+
}>>>;
|
|
287
|
+
outerLateralJoin: GatedMethod<Capabilities, {
|
|
288
|
+
sql: {
|
|
289
|
+
lateral: true;
|
|
290
|
+
};
|
|
291
|
+
}, <Alias extends string, LateralRow extends Record<string, ScopeField>>(alias: Alias, builder: (lateral: LateralBuilder<QC, AvailableScope>) => Subquery<LateralRow>) => JoinedTables<QC, MergeScopes<AvailableScope, NullableScope<{
|
|
292
|
+
topLevel: LateralRow;
|
|
293
|
+
namespaces: Record<Alias, LateralRow>;
|
|
294
|
+
}>>>>;
|
|
295
|
+
}
|
|
296
|
+
type PaginationValue<QC extends QueryContext> = number | TraitExpression<readonly ['numeric'], false, QC['codecTypes']>;
|
|
297
|
+
interface WithPagination<QC extends QueryContext> {
|
|
298
|
+
limit(count: PaginationValue<QC>): this;
|
|
299
|
+
offset(count: PaginationValue<QC>): this;
|
|
300
|
+
}
|
|
301
|
+
interface WithDistinct {
|
|
302
|
+
distinct(): this;
|
|
303
|
+
}
|
|
304
|
+
interface WithAlias<RowType extends Record<string, ScopeField>> {
|
|
305
|
+
as<Alias extends string>(newAlias: Alias): JoinSource<RowType, Alias>;
|
|
306
|
+
}
|
|
307
|
+
interface WithBuild<QC extends QueryContext, RowType extends Record<string, ScopeField>> {
|
|
308
|
+
build(): SqlQueryPlan<ResolveRow<RowType, QC['codecTypes'], QC['resolvedColumnOutputTypes']>>;
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/types/table-proxy.d.ts
|
|
312
|
+
type ResolvedColumnTypes<C extends TableProxyContract, NsId extends string, TableName extends string, ColMap = StorageColumnMapAt<ExtractStorageColumnTypes<C>, NsId, TableName>, ColumnKeys extends string = [ColMap] extends [never] ? never : keyof ColMap & string> = { readonly [K in ColumnKeys]: ColMap extends Record<K, unknown> ? ColMap[K] : never; };
|
|
313
|
+
type ResolvedInsertValues<C extends TableProxyContract, NsId extends string, Table extends StorageTable, TableName extends string, CT extends Record<string, {
|
|
314
|
+
readonly input: unknown;
|
|
315
|
+
}>> = StorageColumnMapAt<ExtractStorageColumnInputTypes<C>, NsId, TableName> extends (infer ColMap) ? [ColMap] extends [never] ? InsertValues<Table, CT> : { [K in keyof ColMap]?: ColMap[K]; } : InsertValues<Table, CT>;
|
|
316
|
+
type ResolvedUpdateValues<C extends TableProxyContract, NsId extends string, Table extends StorageTable, TableName extends string, CT extends Record<string, {
|
|
317
|
+
readonly input: unknown;
|
|
318
|
+
}>> = ResolvedInsertValues<C, NsId, Table, TableName, CT>;
|
|
319
|
+
type ResolvedUpdateExpressions<Table extends StorageTable> = { [K in keyof Table['columns']]?: Expression<{
|
|
320
|
+
codecId: Table['columns'][K]['codecId'];
|
|
321
|
+
nullable: boolean;
|
|
322
|
+
}>; };
|
|
323
|
+
type ContractToQC<C extends TableProxyContract, NsId extends string = string, Name extends string = string> = {
|
|
324
|
+
readonly codecTypes: ExtractCodecTypes<C>;
|
|
325
|
+
readonly capabilities: C['capabilities'];
|
|
326
|
+
readonly queryOperationTypes: ExtractQueryOperationTypes<C>;
|
|
327
|
+
readonly resolvedColumnOutputTypes: ResolvedColumnTypes<C, NsId, Name>;
|
|
328
|
+
};
|
|
329
|
+
interface TableProxy<C extends TableProxyContract, NsId extends string, Name extends string, Alias extends string = Name, AvailableScope extends Scope = DefaultScope<Name, NamespaceTable<C, NsId, Name>>, QC extends QueryContext = ContractToQC<C, NsId, Name>> extends JoinSource<StorageTableToScopeTable<NamespaceTable<C, NsId, Name>>, Alias>, WithSelect<QC, AvailableScope, EmptyRow>, WithJoin<QC, AvailableScope, C['capabilities']> {
|
|
330
|
+
as<NewAlias extends string>(newAlias: NewAlias): TableProxy<C, NsId, Name, NewAlias, RebindScope<AvailableScope, Alias, NewAlias>, QC>;
|
|
331
|
+
insert(rows: ReadonlyArray<ResolvedInsertValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>>): InsertQuery<QC, AvailableScope, EmptyRow>;
|
|
332
|
+
update(set: ResolvedUpdateValues<C, NsId, NamespaceTable<C, NsId, Name>, Name, QC['codecTypes']>): UpdateQuery<QC, AvailableScope, EmptyRow>;
|
|
333
|
+
update(callback: (fields: FieldProxy<AvailableScope>, fns: Functions<QC>) => ResolvedUpdateExpressions<NamespaceTable<C, NsId, Name>>): UpdateQuery<QC, AvailableScope, EmptyRow>;
|
|
334
|
+
delete(): DeleteQuery<QC, AvailableScope, EmptyRow>;
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/types/db.d.ts
|
|
338
|
+
type CapabilitiesBase = Record<string, Record<string, boolean>>;
|
|
339
|
+
type NamespaceEntries = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
340
|
+
type NamespaceDomain = Readonly<Record<string, {
|
|
341
|
+
readonly models: Readonly<Record<string, unknown>>;
|
|
342
|
+
}>>;
|
|
343
|
+
type TableProxyContract = {
|
|
344
|
+
readonly domain: {
|
|
345
|
+
readonly namespaces: NamespaceDomain;
|
|
346
|
+
};
|
|
347
|
+
readonly storage: {
|
|
348
|
+
readonly namespaces: Readonly<Record<string, {
|
|
349
|
+
readonly entries: NamespaceEntries;
|
|
350
|
+
}>>;
|
|
351
|
+
};
|
|
352
|
+
readonly capabilities: CapabilitiesBase;
|
|
353
|
+
};
|
|
354
|
+
type TablesInNamespace<NS extends {
|
|
355
|
+
readonly entries: NamespaceEntries;
|
|
356
|
+
}> = NS['entries']['table'] extends Readonly<Record<string, StorageTable>> ? NS['entries']['table'] : Readonly<Record<string, StorageTable>>;
|
|
357
|
+
type UnboundTables<C extends TableProxyContract> = { readonly [Name in TableNamesAcrossNamespaces<C>]: TableInAnyNamespace<C, Name>; };
|
|
358
|
+
type TableNamesAcrossNamespaces<C extends TableProxyContract> = { [NSId in keyof C['storage']['namespaces']]: keyof TablesInNamespace<C['storage']['namespaces'][NSId]> & string; }[keyof C['storage']['namespaces']];
|
|
359
|
+
type TableInAnyNamespace<C extends TableProxyContract, Name extends string> = { [NSId in keyof C['storage']['namespaces']]: Name extends keyof TablesInNamespace<C['storage']['namespaces'][NSId]> ? TablesInNamespace<C['storage']['namespaces'][NSId]>[Name] : never; }[keyof C['storage']['namespaces']];
|
|
360
|
+
type NamespaceTable<C extends TableProxyContract, NsId extends string, Name extends string> = TablesInNamespace<C['storage']['namespaces'][NsId]>[Name];
|
|
361
|
+
type Namespace<C extends TableProxyContract, NsId extends string & keyof C['storage']['namespaces']> = { readonly [Name in keyof TablesInNamespace<C['storage']['namespaces'][NsId]> & string]: TableProxy<C, NsId, Name>; };
|
|
362
|
+
type Db<C extends TableProxyContract> = { readonly [Ns in keyof C['storage']['namespaces'] & string]: Namespace<C, Ns>; };
|
|
363
|
+
//#endregion
|
|
364
|
+
export { TableNamesAcrossNamespaces as _, FieldProxy as a, UnboundTables as b, GroupedQuery as c, QueryContext as d, ResolveRow as f, TableInAnyNamespace as g, Subquery as h, DeleteQuery as i, InsertQuery as l, SelectQuery as m, BooleanCodecType as n, Functions as o, Scope as p, Db as r, GatedMethod as s, AggregateFunctions as t, Namespace as u, TableProxy as v, UpdateQuery as x, TableProxyContract as y };
|
|
365
|
+
//# sourceMappingURL=db-DhMsmBS--DKENDi3l.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-DhMsmBS--DKENDi3l.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/sql-builder/dist/db-DhMsmBS-.d.mts"],"mappings":";;;;;;;;;;;KAMK,YAAY,cAAc,UAAU,UAAU,qBAAqB,WAAW;cACrE;cACA;KACT,OAAO,QAAQ,WAAW,IAAI,EAAE;KAChC,WAAW,cAAc;KACzB,aAAa,eAAe;KAC5B;EACH,UAAU;EACV,YAAY,eAAe;;KAExB,WAAW,YAAY,YAAY;YAC5B;IACR,UAAU;IACV,YAAY,OAAO,OAAO;;EAE5B,qBAAqB;EACrB,YAAY;;KAET,aAAa,qBAAqB,cAAc;EACnD,UAAU,yBAAyB;EACnC,eAAe,KAAK,OAAO,yBAAyB;;KAEjD,yBAAyB,UAAU,mBAAqB,WAAW;EACtE,SAAS,aAAa;EACtB,UAAU,aAAa;KACpB,aAAa;EAChB;;EAEA;IACE;KACC,YAAY,UAAU,OAAO,UAAU;EAC1C,UAAU,OAAO,KAAK,qBAAqB,iBAAiB,KAAK,qBAAqB;EACtF,YAAY,OAAO,kBAAkB;;KAElC,YAAY,UAAU,OAAO,uBAAuB;EACvD,UAAU;EACV,YAAY,OAAO,KAAK,iBAAiB,UAAU,OAAO,QAAQ,gBAAgB;;KAE/E,mBAAmB,UAAU,iBAAiB,WAAW;EAC5D,SAAS,EAAE;EACX;;KAEG,cAAc,UAAU;EAC3B,UAAU,mBAAmB;EAC7B,eAAe,mBAAmB,kBAAkB,mBAAmB,gBAAgB;;KAEpF,SAAS,gBAAgB,eAAe;GAC1C,iBAAiB;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