@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,2 @@
|
|
|
1
|
+
import { a as mapDefault, c as toEnumMemberName, d as toModelName, i as inferRelations, l as toEnumName, n as deriveBackRelationFieldName, o as parseRawDefault, r as deriveRelationFieldName, s as pluralize, t as buildChildRelationField, u as toFieldName } from "./psl-infer-DGftl-HW.mjs";
|
|
2
|
+
export { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, mapDefault, parseRawDefault, pluralize, toEnumMemberName, toEnumName, toFieldName, toModelName };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-DUwyRJmP.mjs";
|
|
2
|
+
import { a as timestampNowRuntimeGenerator, i as sqlRuntimeFamilyDescriptor, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-DNewRuec.mjs";
|
|
3
|
+
export { type ResolvedDomainModel, type ResolvedStorageTable, UNBOUND_DOMAIN_NAMESPACE_ID, sqlRuntimeFamilyDescriptor as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
|
+
import { i as timestampNowRuntimeGenerator, n as resolveDomainModel, r as runtime_default, t as UNBOUND_DOMAIN_NAMESPACE_ID } from "./runtime-tIHpGCcG.mjs";
|
|
3
|
+
export { UNBOUND_DOMAIN_NAMESPACE_ID, runtime_default as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { t as SqlNode } from "./sql-node-kEz6YFZo-v2F7delx.mjs";
|
|
2
|
+
import { NamespaceId } from "@prisma/orm-framework/contract/types";
|
|
3
|
+
//#region ../../../2-sql/1-core/contract/dist/foreign-key-BSy9u4O4.d.mts
|
|
4
|
+
//#region src/ir/foreign-key-reference.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Input for a foreign-key reference (one side of a foreign-key declaration).
|
|
7
|
+
*
|
|
8
|
+
* When `spaceId` is absent the reference is local — the referenced table lives
|
|
9
|
+
* in the same contract-space. When `spaceId` is present the reference is
|
|
10
|
+
* cross-space — the referenced table lives in a different contract-space
|
|
11
|
+
* identified by `spaceId`.
|
|
12
|
+
*
|
|
13
|
+
* Presence-based discrimination keeps local FK JSON byte-identical to
|
|
14
|
+
* contracts authored before cross-space support was added.
|
|
15
|
+
*/
|
|
16
|
+
interface ForeignKeyReferenceInput {
|
|
17
|
+
readonly namespaceId: string;
|
|
18
|
+
readonly tableName: string;
|
|
19
|
+
readonly columns: readonly string[];
|
|
20
|
+
readonly spaceId?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SQL Contract IR node for one side (source or target) of a foreign-key
|
|
24
|
+
* declaration. Carries the full coordinate: namespace, table, and columns.
|
|
25
|
+
*
|
|
26
|
+
* Cross-space discrimination is based on `spaceId` presence: absent means
|
|
27
|
+
* local (same contract-space); present means cross-space (the referenced
|
|
28
|
+
* table lives in the contract-space identified by `spaceId`).
|
|
29
|
+
*
|
|
30
|
+
* For local references `spaceId` is absent from JSON, keeping the serialized
|
|
31
|
+
* shape byte-identical to contracts authored before cross-space support was
|
|
32
|
+
* added. For cross-space references `spaceId` appears in JSON so round-trips
|
|
33
|
+
* are lossless.
|
|
34
|
+
*
|
|
35
|
+
* Use `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`
|
|
36
|
+
* as the sentinel `namespaceId` for single-namespace (unbound) references.
|
|
37
|
+
*/
|
|
38
|
+
declare class ForeignKeyReference extends SqlNode {
|
|
39
|
+
readonly namespaceId: NamespaceId;
|
|
40
|
+
readonly tableName: string;
|
|
41
|
+
readonly columns: readonly string[];
|
|
42
|
+
readonly spaceId?: string;
|
|
43
|
+
constructor(input: ForeignKeyReferenceInput);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/ir/foreign-key.d.ts
|
|
47
|
+
type ReferentialAction = 'noAction' | 'restrict' | 'cascade' | 'setNull' | 'setDefault';
|
|
48
|
+
interface ForeignKeyInput {
|
|
49
|
+
readonly source: ForeignKeyReference | ForeignKeyReferenceInput;
|
|
50
|
+
readonly target: ForeignKeyReference | ForeignKeyReferenceInput;
|
|
51
|
+
readonly name?: string;
|
|
52
|
+
readonly onDelete?: ReferentialAction;
|
|
53
|
+
readonly onUpdate?: ReferentialAction;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* SQL Contract IR node for a table-level foreign-key declaration — the
|
|
57
|
+
* referential constraint only (source, target, `onDelete`/`onUpdate`).
|
|
58
|
+
*
|
|
59
|
+
* A persisted `foreignKeys[]` entry always denotes a real constraint: whether
|
|
60
|
+
* to emit the constraint at all, and whether to back it with an index, are
|
|
61
|
+
* authoring-time decisions (PSL `@relation(index:)`, TS `fk({ constraint,
|
|
62
|
+
* index })`) resolved once at `contract emit` — a `constraint: false` FK
|
|
63
|
+
* simply has no entry here, and a backing index (if any) is its own discrete,
|
|
64
|
+
* named entry in the table's `indexes[]`.
|
|
65
|
+
*
|
|
66
|
+
* Each FK carries explicit `source` and `target` {@link ForeignKeyReference}
|
|
67
|
+
* coordinates (namespace, table, columns). For single-namespace contracts the
|
|
68
|
+
* sentinel `UNBOUND_NAMESPACE_ID` appears on both sides.
|
|
69
|
+
*
|
|
70
|
+
* The nested references are normalised to {@link ForeignKeyReference}
|
|
71
|
+
* instances inside the constructor so downstream walks see a uniform AST
|
|
72
|
+
* regardless of whether the input was a JSON literal or an already-constructed
|
|
73
|
+
* class instance.
|
|
74
|
+
*/
|
|
75
|
+
declare class ForeignKey extends SqlNode {
|
|
76
|
+
readonly source: ForeignKeyReference;
|
|
77
|
+
readonly target: ForeignKeyReference;
|
|
78
|
+
readonly name?: string;
|
|
79
|
+
readonly onDelete?: ReferentialAction;
|
|
80
|
+
readonly onUpdate?: ReferentialAction;
|
|
81
|
+
constructor(input: ForeignKeyInput);
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { ReferentialAction as a, ForeignKeyReferenceInput as i, ForeignKeyInput as n, ForeignKeyReference as r, ForeignKey as t };
|
|
85
|
+
//# sourceMappingURL=foreign-key-BSy9u4O4-BnsOe5Nf.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreign-key-BSy9u4O4-BnsOe5Nf.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-BSy9u4O4.d.mts"],"mappings":";;;;;;;;;;;;;;;UAcU;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;cAkBG,4BAA4B;WAC/B,aAAa;WACb;WACA;WACA;EACT,YAAY,OAAO;;;;KAIhB;UACK;WACC,QAAQ,sBAAsB;WAC9B,QAAQ,sBAAsB;WAC9B;WACA,WAAW;WACX,WAAW;;;;;;;;;;;;;;;;;;;;;;cAsBR,mBAAmB;WACtB,QAAQ;WACR,QAAQ;WACR;WACA,WAAW;WACX,WAAW;EACpB,YAAY,OAAO"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { a as ReferentialAction, i as ForeignKeyReferenceInput, n as ForeignKeyInput } from "./foreign-key-BSy9u4O4-BnsOe5Nf.mjs";
|
|
2
|
+
import { i as UniqueConstraintInput, n as PrimaryKeyInput } from "./unique-constraint-jQWfH7dg-zLWtFp99.mjs";
|
|
3
|
+
import { r as IndexInput } from "./sql-index-DsI8HAeK-BJsn-jvD.mjs";
|
|
4
|
+
//#region ../../../2-sql/1-core/contract/dist/foreign-key-materialization.d.mts
|
|
5
|
+
//#region src/foreign-key-materialization.d.ts
|
|
6
|
+
type BackingIndexCandidates = {
|
|
7
|
+
readonly indexes: readonly {
|
|
8
|
+
readonly columns?: readonly string[];
|
|
9
|
+
}[];
|
|
10
|
+
readonly uniques: readonly {
|
|
11
|
+
readonly columns: readonly string[];
|
|
12
|
+
}[];
|
|
13
|
+
readonly primaryKey?: {
|
|
14
|
+
readonly columns: readonly string[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The column-list keys (`"colA,colB"`, order preserved) a table's own
|
|
19
|
+
* indexes, unique constraints, and primary key already back. A foreign key
|
|
20
|
+
* whose source columns join to one of these keys needs no separately
|
|
21
|
+
* derived backing index.
|
|
22
|
+
*
|
|
23
|
+
* Shared by {@link isBackedByColumnKeys}'s callers: `materializeForeignKeysAndIndexes`
|
|
24
|
+
* (deriving the discrete backing-index entities persisted at `contract emit`)
|
|
25
|
+
* and the postgres PSL inferrer (deciding whether an introspected relation
|
|
26
|
+
* needs an explicit `index: false`).
|
|
27
|
+
*/
|
|
28
|
+
declare function backingIndexColumnKeys(table: BackingIndexCandidates): readonly string[];
|
|
29
|
+
/**
|
|
30
|
+
* Whether `columns`, in order, matches one of `backingKeys` (see
|
|
31
|
+
* {@link backingIndexColumnKeys}). Order-sensitive: `(a, b)` does not
|
|
32
|
+
* satisfy a backing index declared as `(b, a)`.
|
|
33
|
+
*/
|
|
34
|
+
declare function isBackedByColumnKeys(columns: readonly string[], backingKeys: readonly string[]): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A foreign key as authored, before FK1 materialization: the referential
|
|
37
|
+
* coordinates plus the `constraint`/`index` intent booleans that drive
|
|
38
|
+
* whether — and how — it survives into the persisted contract.
|
|
39
|
+
*/
|
|
40
|
+
interface ForeignKeyAuthoringInput {
|
|
41
|
+
readonly source: ForeignKeyReferenceInput;
|
|
42
|
+
readonly target: ForeignKeyReferenceInput;
|
|
43
|
+
readonly name?: string;
|
|
44
|
+
readonly onDelete?: ReferentialAction;
|
|
45
|
+
readonly onUpdate?: ReferentialAction;
|
|
46
|
+
readonly constraint: boolean;
|
|
47
|
+
readonly index: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface MaterializedTableConstraints {
|
|
50
|
+
readonly foreignKeys: readonly ForeignKeyInput[];
|
|
51
|
+
readonly indexes: readonly IndexInput[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Lowers a table's authored foreign keys into the discrete entities
|
|
55
|
+
* `contract.json` persists: a `constraint: false` FK contributes no
|
|
56
|
+
* `foreignKeys[]` entry, and an `index: true` FK whose columns aren't already
|
|
57
|
+
* backed by a declared index/unique/primary-key contributes a wire-named
|
|
58
|
+
* `indexes[]` entry (default prefix + content-hash wire name). Declared
|
|
59
|
+
* indexes always survive unchanged; a second FK sharing already-synthesized
|
|
60
|
+
* backing columns does not mint a duplicate index.
|
|
61
|
+
*/
|
|
62
|
+
declare function materializeForeignKeysAndIndexes(tableName: string, foreignKeys: readonly ForeignKeyAuthoringInput[], declaredIndexes: readonly IndexInput[], uniques: readonly UniqueConstraintInput[], primaryKey: PrimaryKeyInput | undefined): MaterializedTableConstraints;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { isBackedByColumnKeys as a, backingIndexColumnKeys as i, ForeignKeyAuthoringInput as n, materializeForeignKeysAndIndexes as o, MaterializedTableConstraints as r, BackingIndexCandidates as t };
|
|
65
|
+
//# sourceMappingURL=foreign-key-materialization-Ca-wRbmj.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreign-key-materialization-Ca-wRbmj.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-materialization.d.mts"],"mappings":";;;;;KAIK;WACM;aACE;;WAEF;aACE;;WAEF;aACE;;;;;;;;;;;;;;iBAcI,uBAAuB,OAAO;;;;;;iBAM9B,qBAAqB,4BAA4B;;;;;;UAMxD;WACC,QAAQ;WACR,QAAQ;WACR;WACA,WAAW;WACX,WAAW;WACX;WACA;;UAED;WACC,sBAAsB;WACtB,kBAAkB;;;;;;;;;;;iBAWZ,iCAAiC,mBAAmB,sBAAsB,4BAA4B,0BAA0B,cAAc,kBAAkB,yBAAyB,YAAY,8BAA8B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { n as lowerAuthoredIndex } from "./index-naming-BoGBcMmI-DiJAr66H.mjs";
|
|
2
|
+
//#region ../../../2-sql/1-core/contract/dist/foreign-key-materialization.mjs
|
|
3
|
+
/**
|
|
4
|
+
* The column-list keys (`"colA,colB"`, order preserved) a table's own
|
|
5
|
+
* indexes, unique constraints, and primary key already back. A foreign key
|
|
6
|
+
* whose source columns join to one of these keys needs no separately
|
|
7
|
+
* derived backing index.
|
|
8
|
+
*
|
|
9
|
+
* Shared by {@link isBackedByColumnKeys}'s callers: `materializeForeignKeysAndIndexes`
|
|
10
|
+
* (deriving the discrete backing-index entities persisted at `contract emit`)
|
|
11
|
+
* and the postgres PSL inferrer (deciding whether an introspected relation
|
|
12
|
+
* needs an explicit `index: false`).
|
|
13
|
+
*/
|
|
14
|
+
function backingIndexColumnKeys(table) {
|
|
15
|
+
return [
|
|
16
|
+
...table.indexes.flatMap((index) => index.columns !== void 0 ? [index.columns.join(",")] : []),
|
|
17
|
+
...table.uniques.map((unique) => unique.columns.join(",")),
|
|
18
|
+
...table.primaryKey ? [table.primaryKey.columns.join(",")] : []
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether `columns`, in order, matches one of `backingKeys` (see
|
|
23
|
+
* {@link backingIndexColumnKeys}). Order-sensitive: `(a, b)` does not
|
|
24
|
+
* satisfy a backing index declared as `(b, a)`.
|
|
25
|
+
*/
|
|
26
|
+
function isBackedByColumnKeys(columns, backingKeys) {
|
|
27
|
+
return backingKeys.includes(columns.join(","));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Lowers a table's authored foreign keys into the discrete entities
|
|
31
|
+
* `contract.json` persists: a `constraint: false` FK contributes no
|
|
32
|
+
* `foreignKeys[]` entry, and an `index: true` FK whose columns aren't already
|
|
33
|
+
* backed by a declared index/unique/primary-key contributes a wire-named
|
|
34
|
+
* `indexes[]` entry (default prefix + content-hash wire name). Declared
|
|
35
|
+
* indexes always survive unchanged; a second FK sharing already-synthesized
|
|
36
|
+
* backing columns does not mint a duplicate index.
|
|
37
|
+
*/
|
|
38
|
+
function materializeForeignKeysAndIndexes(tableName, foreignKeys, declaredIndexes, uniques, primaryKey) {
|
|
39
|
+
const satisfiedIndexColumns = new Set(backingIndexColumnKeys({
|
|
40
|
+
indexes: declaredIndexes,
|
|
41
|
+
uniques,
|
|
42
|
+
primaryKey
|
|
43
|
+
}));
|
|
44
|
+
const synthesizedIndexes = [];
|
|
45
|
+
const materializedForeignKeys = [];
|
|
46
|
+
for (const { constraint, index, ...reference } of foreignKeys) {
|
|
47
|
+
if (constraint !== false) materializedForeignKeys.push(reference);
|
|
48
|
+
if (index !== false) {
|
|
49
|
+
const key = reference.source.columns.join(",");
|
|
50
|
+
if (!satisfiedIndexColumns.has(key)) {
|
|
51
|
+
synthesizedIndexes.push(lowerAuthoredIndex(tableName, {
|
|
52
|
+
columns: reference.source.columns,
|
|
53
|
+
where: void 0,
|
|
54
|
+
unique: void 0,
|
|
55
|
+
map: void 0,
|
|
56
|
+
name: void 0,
|
|
57
|
+
type: void 0,
|
|
58
|
+
options: void 0
|
|
59
|
+
}));
|
|
60
|
+
satisfiedIndexColumns.add(key);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
foreignKeys: materializedForeignKeys,
|
|
66
|
+
indexes: [...declaredIndexes, ...synthesizedIndexes]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { isBackedByColumnKeys as n, materializeForeignKeysAndIndexes as r, backingIndexColumnKeys as t };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=foreign-key-materialization-HI7BIQrG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreign-key-materialization-HI7BIQrG.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-materialization.mjs"],"sourcesContent":["import { n as lowerAuthoredIndex } from \"./index-naming-BoGBcMmI.mjs\";\n//#region src/foreign-key-materialization.ts\n/**\n* The column-list keys (`\"colA,colB\"`, order preserved) a table's own\n* indexes, unique constraints, and primary key already back. A foreign key\n* whose source columns join to one of these keys needs no separately\n* derived backing index.\n*\n* Shared by {@link isBackedByColumnKeys}'s callers: `materializeForeignKeysAndIndexes`\n* (deriving the discrete backing-index entities persisted at `contract emit`)\n* and the postgres PSL inferrer (deciding whether an introspected relation\n* needs an explicit `index: false`).\n*/\nfunction backingIndexColumnKeys(table) {\n\treturn [\n\t\t...table.indexes.flatMap((index) => index.columns !== void 0 ? [index.columns.join(\",\")] : []),\n\t\t...table.uniques.map((unique) => unique.columns.join(\",\")),\n\t\t...table.primaryKey ? [table.primaryKey.columns.join(\",\")] : []\n\t];\n}\n/**\n* Whether `columns`, in order, matches one of `backingKeys` (see\n* {@link backingIndexColumnKeys}). Order-sensitive: `(a, b)` does not\n* satisfy a backing index declared as `(b, a)`.\n*/\nfunction isBackedByColumnKeys(columns, backingKeys) {\n\treturn backingKeys.includes(columns.join(\",\"));\n}\n/**\n* Lowers a table's authored foreign keys into the discrete entities\n* `contract.json` persists: a `constraint: false` FK contributes no\n* `foreignKeys[]` entry, and an `index: true` FK whose columns aren't already\n* backed by a declared index/unique/primary-key contributes a wire-named\n* `indexes[]` entry (default prefix + content-hash wire name). Declared\n* indexes always survive unchanged; a second FK sharing already-synthesized\n* backing columns does not mint a duplicate index.\n*/\nfunction materializeForeignKeysAndIndexes(tableName, foreignKeys, declaredIndexes, uniques, primaryKey) {\n\tconst satisfiedIndexColumns = new Set(backingIndexColumnKeys({\n\t\tindexes: declaredIndexes,\n\t\tuniques,\n\t\tprimaryKey\n\t}));\n\tconst synthesizedIndexes = [];\n\tconst materializedForeignKeys = [];\n\tfor (const { constraint, index, ...reference } of foreignKeys) {\n\t\tif (constraint !== false) materializedForeignKeys.push(reference);\n\t\tif (index !== false) {\n\t\t\tconst key = reference.source.columns.join(\",\");\n\t\t\tif (!satisfiedIndexColumns.has(key)) {\n\t\t\t\tsynthesizedIndexes.push(lowerAuthoredIndex(tableName, {\n\t\t\t\t\tcolumns: reference.source.columns,\n\t\t\t\t\twhere: void 0,\n\t\t\t\t\tunique: void 0,\n\t\t\t\t\tmap: void 0,\n\t\t\t\t\tname: void 0,\n\t\t\t\t\ttype: void 0,\n\t\t\t\t\toptions: void 0\n\t\t\t\t}));\n\t\t\t\tsatisfiedIndexColumns.add(key);\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tforeignKeys: materializedForeignKeys,\n\t\tindexes: [...declaredIndexes, ...synthesizedIndexes]\n\t};\n}\n//#endregion\nexport { backingIndexColumnKeys, isBackedByColumnKeys, materializeForeignKeysAndIndexes };\n\n//# sourceMappingURL=foreign-key-materialization.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,uBAAuB,OAAO;CACtC,OAAO;EACN,GAAG,MAAM,QAAQ,SAAS,UAAU,MAAM,YAAY,KAAK,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;EAC7F,GAAG,MAAM,QAAQ,KAAK,WAAW,OAAO,QAAQ,KAAK,GAAG,CAAC;EACzD,GAAG,MAAM,aAAa,CAAC,MAAM,WAAW,QAAQ,KAAK,GAAG,CAAC,IAAI,CAAC;CAC/D;AACD;;;;;;AAMA,SAAS,qBAAqB,SAAS,aAAa;CACnD,OAAO,YAAY,SAAS,QAAQ,KAAK,GAAG,CAAC;AAC9C;;;;;;;;;;AAUA,SAAS,iCAAiC,WAAW,aAAa,iBAAiB,SAAS,YAAY;CACvG,MAAM,wBAAwB,IAAI,IAAI,uBAAuB;EAC5D,SAAS;EACT;EACA;CACD,CAAC,CAAC;CACF,MAAM,qBAAqB,CAAC;CAC5B,MAAM,0BAA0B,CAAC;CACjC,KAAK,MAAM,EAAE,YAAY,OAAO,GAAG,eAAe,aAAa;EAC9D,IAAI,eAAe,OAAO,wBAAwB,KAAK,SAAS;EAChE,IAAI,UAAU,OAAO;GACpB,MAAM,MAAM,UAAU,OAAO,QAAQ,KAAK,GAAG;GAC7C,IAAI,CAAC,sBAAsB,IAAI,GAAG,GAAG;IACpC,mBAAmB,KAAK,mBAAmB,WAAW;KACrD,SAAS,UAAU,OAAO;KAC1B,OAAO,KAAK;KACZ,QAAQ,KAAK;KACb,KAAK,KAAK;KACV,MAAM,KAAK;KACX,MAAM,KAAK;KACX,SAAS,KAAK;IACf,CAAC,CAAC;IACF,sBAAsB,IAAI,GAAG;GAC9B;EACD;CACD;CACA,OAAO;EACN,aAAa;EACb,SAAS,CAAC,GAAG,iBAAiB,GAAG,kBAAkB;CACpD;AACD"}
|