@prisma/orm-family-sql 8.0.0-rc.18-dev.7 → 8.0.0-rc.18-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ast-De8XGuVW.mjs → ast-BDwGvnKK.mjs} +4 -30
- package/dist/ast-BDwGvnKK.mjs.map +1 -0
- package/dist/{ast-Dp6lQXUX.d.mts → ast-DbmdIKFd.d.mts} +6 -14
- package/dist/ast-DbmdIKFd.d.mts.map +1 -0
- package/dist/{attribute-specs-BgdwJoq3.d.mts → attribute-specs-CKg3a2P_.d.mts} +3 -3
- package/dist/{attribute-specs-BgdwJoq3.d.mts.map → attribute-specs-CKg3a2P_.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-CrNb3aBC.d.mts.map → authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs} +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs.map → authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +1 -1
- package/dist/builder__types.d.mts +5 -5
- package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts} +3 -3
- package/dist/{collection-methods-BnR4UjcW-tiz3frtf.d.mts.map → collection-methods-BnR4UjcW-BY8ZGjfa.d.mts.map} +1 -1
- package/dist/collection-methods-iWGpEfkq.d.mts +1 -0
- package/dist/{config-types-Ci51fcnp.d.mts → config-types-C2mASmPh.d.mts} +3 -3
- package/dist/{config-types-Ci51fcnp.d.mts.map → config-types-C2mASmPh.d.mts.map} +1 -1
- package/dist/{config-types-DyZXyiNb.mjs → config-types-CrREu8Fa.mjs} +2 -2
- package/dist/{config-types-DyZXyiNb.mjs.map → config-types-CrREu8Fa.mjs.map} +1 -1
- package/dist/{contract-builder-C4fgERNT.d.mts → contract-builder-ClsLO9DI.d.mts} +464 -101
- package/dist/contract-builder-ClsLO9DI.d.mts.map +1 -0
- package/dist/{contract-builder-B_oFvMWk.mjs → contract-builder-Du_YOA1B.mjs} +10 -9
- package/dist/contract-builder-Du_YOA1B.mjs.map +1 -0
- package/dist/contract-emitter.d.mts +1 -0
- package/dist/contract-emitter.d.mts.map +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +1 -1
- package/dist/contract-prisma7__provider.mjs +6 -6
- package/dist/contract-psl.d.mts +3 -3
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__diagnostics.d.mts +12 -0
- package/dist/contract-psl__diagnostics.d.mts.map +1 -0
- package/dist/contract-psl__diagnostics.mjs +2 -0
- package/dist/contract-psl__provider.d.mts +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +3 -3
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +8 -8
- package/dist/contract.mjs +4 -4
- package/dist/contract__data-type.d.mts +2 -2
- package/dist/contract__data-type.mjs +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +2 -2
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__types.d.mts +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +1 -1
- package/dist/{control-CyY2Ijms.d.mts → control-Ced1D4yz.d.mts} +17 -16
- package/dist/control-Ced1D4yz.d.mts.map +1 -0
- package/dist/{control-_KWRuSBH.mjs → control-DiLXYDZc.mjs} +15 -10
- package/dist/control-DiLXYDZc.mjs.map +1 -0
- package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts → control-adapter-CkFfBVei-4WUzQP7G.d.mts} +8 -8
- package/dist/{control-adapter-CkFfBVei-DH5DAObc.d.mts.map → control-adapter-CkFfBVei-4WUzQP7G.d.mts.map} +1 -1
- package/dist/control-adapter-pn8u9o3J.d.mts +1 -0
- package/dist/{data-type-gKl5DBHw.d.mts → data-type-CYsho6Yd.d.mts} +4 -12
- package/dist/data-type-CYsho6Yd.d.mts.map +1 -0
- package/dist/{data-type-BgP6Wv48.mjs → data-type-DU0mtme5.mjs} +18 -9
- package/dist/data-type-DU0mtme5.mjs.map +1 -0
- package/dist/{db-BmrN9nRS-CDq1n2be.d.mts → db-BmrN9nRS-CkMIL55t.d.mts} +12 -12
- package/dist/{db-BmrN9nRS-CDq1n2be.d.mts.map → db-BmrN9nRS-CkMIL55t.d.mts.map} +1 -1
- package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts → ddl-types-DtKZjNtN-BCpmdMQF.d.mts} +3 -3
- package/dist/{ddl-types-DtKZjNtN-CwtcEWLd.d.mts.map → ddl-types-DtKZjNtN-BCpmdMQF.d.mts.map} +1 -1
- package/dist/{type-map-BMCZ_fb9-BTmWHQ-J.d.mts → default-mapping-B8_APB1M-CWcTmSQW.d.mts} +3 -22
- package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +1 -0
- package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs → derived-checks-BVSHiu2A-CzEmkTMg.mjs} +18 -6
- package/dist/{derived-checks-BPWwhTds-Cy93UfrT.mjs.map → derived-checks-BVSHiu2A-CzEmkTMg.mjs.map} +1 -1
- package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts} +2 -2
- package/dist/{derived-checks-DpPkO6Dt-ZEbWeWKL.d.mts.map → derived-checks-DpPkO6Dt--oL-Zi3r.d.mts.map} +1 -1
- package/dist/diagnostics-C8YevjSU.mjs +21 -0
- package/dist/diagnostics-C8YevjSU.mjs.map +1 -0
- package/dist/{diff-C-18M6Ii.d.mts → diff-Cx7qTc2x.d.mts} +7 -7
- package/dist/{diff-C-18M6Ii.d.mts.map → diff-Cx7qTc2x.d.mts.map} +1 -1
- package/dist/{dist-Dswy-oRP.mjs → dist-D4FKWSKx.mjs} +30 -41
- package/dist/dist-D4FKWSKx.mjs.map +1 -0
- package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts → expression-CNBCbbzU-DnvLZYf4.d.mts} +3 -3
- package/dist/{expression-CNBCbbzU-BG3rv8Wb.d.mts.map → expression-CNBCbbzU-DnvLZYf4.d.mts.map} +1 -1
- package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts → expression-Ck1wys3N-CBfr-HMG.d.mts} +6 -6
- package/dist/{expression-Ck1wys3N-RNyviMcU.d.mts.map → expression-Ck1wys3N-CBfr-HMG.d.mts.map} +1 -1
- package/dist/expression-eDSWdiqh.d.mts +2 -0
- package/dist/{factories-BVIVyHQU.d.mts → factories-2LNVsQ2j.d.mts} +2 -2
- package/dist/{factories-BVIVyHQU.d.mts.map → factories-2LNVsQ2j.d.mts.map} +1 -1
- package/dist/family.d.mts +14 -14
- package/dist/family.mjs +7 -7
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +3 -3
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/{foreign-key-materialization-DBYDet74.d.mts → foreign-key-materialization-DJ6uhBba.d.mts} +3 -3
- package/dist/{foreign-key-materialization-DBYDet74.d.mts.map → foreign-key-materialization-DJ6uhBba.d.mts.map} +1 -1
- package/dist/{foreign-key-materialization-DyoakLGY.mjs → foreign-key-materialization-DibQ9Hjg.mjs} +2 -2
- package/dist/{foreign-key-materialization-DyoakLGY.mjs.map → foreign-key-materialization-DibQ9Hjg.mjs.map} +1 -1
- package/dist/{functions-CJ8Yf8uL.d.mts → functions-DucgffNf.d.mts} +6 -6
- package/dist/{functions-CJ8Yf8uL.d.mts.map → functions-DucgffNf.d.mts.map} +1 -1
- package/dist/{index-We-mbWnZ.d.mts → index-CJlr0Eja.d.mts} +3 -3
- package/dist/{index-We-mbWnZ.d.mts.map → index-CJlr0Eja.d.mts.map} +1 -1
- package/dist/{index-UHjF-U84.d.mts → index-DuD4M3b8.d.mts} +19 -19
- package/dist/{index-UHjF-U84.d.mts.map → index-DuD4M3b8.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs → index-equivalence-DswCiq5l-DlC2yTK1.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-_gF1Un8p.mjs.map → index-equivalence-DswCiq5l-DlC2yTK1.mjs.map} +1 -1
- package/dist/index-reference-CrohwmmB.d.mts +1 -0
- package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts → index-reference-DJX-CNsb-C1fCMhrJ.d.mts} +3 -3
- package/dist/{index-reference-DJX-CNsb-D2qUlYq2.d.mts.map → index-reference-DJX-CNsb-C1fCMhrJ.d.mts.map} +1 -1
- package/dist/{index-type-validation-D7-fPxIJ.d.mts → index-type-validation-P4WLRyZA.d.mts} +2 -2
- package/dist/{index-type-validation-D7-fPxIJ.d.mts.map → index-type-validation-P4WLRyZA.d.mts.map} +1 -1
- package/dist/{interpreter-C3Ltz47m-BM7A_CmQ.mjs → interpreter-y1GRudgs-DnP0uDGL.mjs} +7 -5
- package/dist/interpreter-y1GRudgs-DnP0uDGL.mjs.map +1 -0
- package/dist/{ir-OBn7ct21.d.mts → ir-BEQwEnRB.d.mts} +2 -2
- package/dist/{ir-OBn7ct21.d.mts.map → ir-BEQwEnRB.d.mts.map} +1 -1
- package/dist/middleware-DTu2jl68.d.mts +1 -0
- package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts → middleware-YsFLC19Y-Dot9R8QY.d.mts} +2 -2
- package/dist/{middleware-YsFLC19Y-xhimGDiS.d.mts.map → middleware-YsFLC19Y-Dot9R8QY.d.mts.map} +1 -1
- package/dist/{migration-Bdt_UrTg.d.mts → migration-Cc102YUu.d.mts} +3 -3
- package/dist/{migration-Bdt_UrTg.d.mts.map → migration-Cc102YUu.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +38 -32
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +1 -1
- package/dist/{pack-DOLmsrEs.d.mts → pack-DI4Nur5d.d.mts} +3 -3
- package/dist/{pack-DOLmsrEs.d.mts.map → pack-DI4Nur5d.d.mts.map} +1 -1
- package/dist/plan-CuSLaQdv.d.mts +2 -0
- package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts → plan-cGEaSXHv-Bv-SBtFA.d.mts} +3 -3
- package/dist/{plan-cGEaSXHv-j0w37mVT.d.mts.map → plan-cGEaSXHv-Bv-SBtFA.d.mts.map} +1 -1
- package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs +42 -0
- package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs.map +1 -0
- package/dist/{psl-build-C3WT2pWV.mjs → psl-build-8bx9WTUt.mjs} +113 -4
- package/dist/psl-build-8bx9WTUt.mjs.map +1 -0
- package/dist/psl-build-PXVtl8gM.d.mts +73 -0
- package/dist/psl-build-PXVtl8gM.d.mts.map +1 -0
- package/dist/{psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts → psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts} +5 -5
- package/dist/psl-column-resolution-BCkhNzOK-0Gry4LFl.d.mts.map +1 -0
- package/dist/{psl-field-resolution-ztVU6TV2-BSBajXoF.mjs → psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs} +7 -41
- package/dist/psl-field-resolution-4U7Plpfb-CCfgoBAa.mjs.map +1 -0
- package/dist/{psl-infer-DHO72J_m.mjs → psl-infer-CG0_wra6.mjs} +2 -2
- package/dist/{psl-infer-DHO72J_m.mjs.map → psl-infer-CG0_wra6.mjs.map} +1 -1
- package/dist/{psl-infer-Dp_NzWE0.d.mts → psl-infer-g040TwAr.d.mts} +4 -6
- package/dist/psl-infer-g040TwAr.d.mts.map +1 -0
- package/dist/query-lane-context-C29KGcgz.d.mts +1 -0
- package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts → query-lane-context-C42-u9L1-CUP3uW4A.d.mts} +6 -6
- package/dist/{query-lane-context-C42-u9L1-Bxa4DkI_.d.mts.map → query-lane-context-C42-u9L1-CUP3uW4A.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +13 -13
- package/dist/relational-core.mjs +2 -2
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +4 -4
- package/dist/relational-core__ast.mjs +2 -2
- package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
- package/dist/relational-core__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +3 -3
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts → schema-differ-CqWOkoW9-DAcuiQPU.d.mts} +4 -4
- package/dist/{schema-differ-CqWOkoW9-DQkzKV8b.d.mts.map → schema-differ-CqWOkoW9-DAcuiQPU.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +2 -2
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.d.mts +3 -3
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs → schema-verify-DIfHSB4I-CU6ViTDO.mjs} +2 -2
- package/dist/{schema-verify-DIfHSB4I-Du0-5I8k.mjs.map → schema-verify-DIfHSB4I-CU6ViTDO.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs} +2 -2
- package/dist/{sql-contract-serializer-DDaAVCQr-BAb4jKvV.mjs.map → sql-contract-serializer-DDaAVCQr-DFIIkxQr.mjs.map} +1 -1
- package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts} +2 -2
- package/dist/{sql-execution-plan-C7XauPPu-eskZJbmm.d.mts.map → sql-execution-plan-C7XauPPu-DI9L8IkC.d.mts.map} +1 -1
- package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts → transaction-state-DR3nKTmH-CkkfiS9z.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-BZ-54Zu0.d.mts.map → transaction-state-DR3nKTmH-CkkfiS9z.d.mts.map} +1 -1
- package/dist/types-BhcBOXu7.d.mts +1 -0
- package/dist/{types-DIZSW9JI-DNUF-RnL.d.mts → types-C-z8HyiZ-1Nhw0pHj.d.mts} +17 -3
- package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +1 -0
- package/dist/types-CJK7FBdw.d.mts +1 -0
- package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts → types-Cl4MLNrS-GHKQvTNi.d.mts} +8 -8
- package/dist/{types-Cl4MLNrS-lbf-K25i.d.mts.map → types-Cl4MLNrS-GHKQvTNi.d.mts.map} +1 -1
- package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts → types-CzxOObSY-DTQ2rnLF.d.mts} +7 -7
- package/dist/{types-CzxOObSY-BxwvvyRZ.d.mts.map → types-CzxOObSY-DTQ2rnLF.d.mts.map} +1 -1
- package/dist/{types-D0GFxty0-CP8b4dR3.mjs → types-DvhckjSz-Cm0Oodhr.mjs} +3 -2
- package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +1 -0
- package/dist/types-HD5m-h8B.d.mts +67 -0
- package/dist/types-HD5m-h8B.d.mts.map +1 -0
- package/dist/{types-Sh5HuaZE-CqThc46M.d.mts → types-Sh5HuaZE-Dq4AUzl7.d.mts} +2 -2
- package/dist/{types-Sh5HuaZE-CqThc46M.d.mts.map → types-Sh5HuaZE-Dq4AUzl7.d.mts.map} +1 -1
- package/dist/{types-DFZhLz18-Msi8wwig.d.mts → types-zwKzjyma-CxZkmkUI.d.mts} +114 -3
- package/dist/types-zwKzjyma-CxZkmkUI.d.mts.map +1 -0
- package/dist/{validators-CudqzmkF.d.mts → validators-BifwoR5e.d.mts} +2 -2
- package/dist/{validators-CudqzmkF.d.mts.map → validators-BifwoR5e.d.mts.map} +1 -1
- package/dist/{validators-BMWQ7-5D.mjs → validators-CfUrQdiv.mjs} +2 -2
- package/dist/{validators-BMWQ7-5D.mjs.map → validators-CfUrQdiv.mjs.map} +1 -1
- package/package.json +19 -18
- package/dist/ast-De8XGuVW.mjs.map +0 -1
- package/dist/ast-Dp6lQXUX.d.mts.map +0 -1
- package/dist/collection-methods-DoBrRR69.d.mts +0 -1
- package/dist/contract-builder-B_oFvMWk.mjs.map +0 -1
- package/dist/contract-builder-C4fgERNT.d.mts.map +0 -1
- package/dist/control-CyY2Ijms.d.mts.map +0 -1
- package/dist/control-_KWRuSBH.mjs.map +0 -1
- package/dist/control-adapter-DB7MPI5L.d.mts +0 -1
- package/dist/data-type-BgP6Wv48.mjs.map +0 -1
- package/dist/data-type-gKl5DBHw.d.mts.map +0 -1
- package/dist/dist-Dswy-oRP.mjs.map +0 -1
- package/dist/expression-DWcDQHh9.d.mts +0 -2
- package/dist/index-reference-ZZrszBDq.d.mts +0 -1
- package/dist/interpreter-C3Ltz47m-BM7A_CmQ.mjs.map +0 -1
- package/dist/middleware-DOKGNt72.d.mts +0 -1
- package/dist/plan-_8dKi13Q.d.mts +0 -2
- package/dist/psl-build-C3WT2pWV.mjs.map +0 -1
- package/dist/psl-build-TrbDSGOA.d.mts +0 -13
- package/dist/psl-build-TrbDSGOA.d.mts.map +0 -1
- package/dist/psl-column-resolution-Cj4gkj9H-Cu2xVY6w.d.mts.map +0 -1
- package/dist/psl-field-resolution-ztVU6TV2-BSBajXoF.mjs.map +0 -1
- package/dist/psl-infer-Dp_NzWE0.d.mts.map +0 -1
- package/dist/query-lane-context-DW5q2RAY.d.mts +0 -1
- package/dist/type-map-BMCZ_fb9-BTmWHQ-J.d.mts.map +0 -1
- package/dist/types-BkA6tyT-.d.mts +0 -1
- package/dist/types-D0GFxty0-CP8b4dR3.mjs.map +0 -1
- package/dist/types-DFZhLz18-Msi8wwig.d.mts.map +0 -1
- package/dist/types-DIZSW9JI-DNUF-RnL.d.mts.map +0 -1
- package/dist/types-DqSCaTK3.d.mts +0 -1
- package/dist/types-Uv3oTMAb.d.mts +0 -18
- package/dist/types-Uv3oTMAb.d.mts.map +0 -1
|
@@ -145,9 +145,9 @@ function lockWaitPolicyOf(methodName, options) {
|
|
|
145
145
|
if (options?.skipLocked) return "skipLocked";
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
|
-
* Shared encode/decode
|
|
148
|
+
* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).
|
|
149
149
|
*
|
|
150
|
-
* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers
|
|
150
|
+
* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.
|
|
151
151
|
*/
|
|
152
152
|
const SQL_CHAR_CODEC_ID = "sql/char@1";
|
|
153
153
|
const SQL_VARCHAR_CODEC_ID = "sql/varchar@1";
|
|
@@ -157,28 +157,8 @@ const SQL_TEXT_CODEC_ID = "sql/text@1";
|
|
|
157
157
|
const sqlCharEncode = (value) => value;
|
|
158
158
|
/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */
|
|
159
159
|
const sqlCharDecode = (wire) => withoutTrailing(wire, " ");
|
|
160
|
-
const sqlCharRenderOutputType = (typeParams) => {
|
|
161
|
-
const length = typeParams.length;
|
|
162
|
-
if (length === void 0) return void 0;
|
|
163
|
-
if (typeof length !== "number" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError("RUNTIME.TYPE_PARAMS_INVALID", `renderOutputType: expected integer "length" in typeParams for Char, got ${String(length)}`, { meta: {
|
|
164
|
-
codec: SQL_CHAR_CODEC_ID,
|
|
165
|
-
param: "length",
|
|
166
|
-
received: String(length)
|
|
167
|
-
} });
|
|
168
|
-
return `Char<${length}>`;
|
|
169
|
-
};
|
|
170
160
|
const sqlVarcharEncode = (value) => value;
|
|
171
161
|
const sqlVarcharDecode = (wire) => wire;
|
|
172
|
-
const sqlVarcharRenderOutputType = (typeParams) => {
|
|
173
|
-
const length = typeParams.length;
|
|
174
|
-
if (length === void 0) return void 0;
|
|
175
|
-
if (typeof length !== "number" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError("RUNTIME.TYPE_PARAMS_INVALID", `renderOutputType: expected integer "length" in typeParams for Varchar, got ${String(length)}`, { meta: {
|
|
176
|
-
codec: SQL_VARCHAR_CODEC_ID,
|
|
177
|
-
param: "length",
|
|
178
|
-
received: String(length)
|
|
179
|
-
} });
|
|
180
|
-
return `Varchar<${length}>`;
|
|
181
|
-
};
|
|
182
162
|
const sqlIntEncode = (value) => value;
|
|
183
163
|
const sqlIntDecode = (wire) => wire;
|
|
184
164
|
const sqlFloatEncode = (value) => value;
|
|
@@ -291,9 +271,6 @@ var SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
|
291
271
|
"textual"
|
|
292
272
|
];
|
|
293
273
|
paramsSchema = void 0;
|
|
294
|
-
renderOutputType(params) {
|
|
295
|
-
return sqlCharRenderOutputType(params);
|
|
296
|
-
}
|
|
297
274
|
factory(_params) {
|
|
298
275
|
return () => new SqlCharCodec(this);
|
|
299
276
|
}
|
|
@@ -322,9 +299,6 @@ var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
|
322
299
|
"textual"
|
|
323
300
|
];
|
|
324
301
|
paramsSchema = void 0;
|
|
325
|
-
renderOutputType(params) {
|
|
326
|
-
return sqlVarcharRenderOutputType(params);
|
|
327
|
-
}
|
|
328
302
|
factory(_params) {
|
|
329
303
|
return () => new SqlVarcharCodec(this);
|
|
330
304
|
}
|
|
@@ -332,6 +306,6 @@ var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
|
332
306
|
const sqlVarcharDescriptor = new SqlVarcharDescriptor();
|
|
333
307
|
const sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);
|
|
334
308
|
//#endregion
|
|
335
|
-
export {
|
|
309
|
+
export { sqlFloatColumn as A, sqlTextDescriptor as B, lockStrengthCapabilities as C, sqlCharDecode as D, sqlCharColumn as E, sqlIntDecode as F, sqlVarcharEncode as G, sqlVarcharColumn as H, sqlIntDescriptor as I, sqlIntEncode as L, sqlFloatDescriptor as M, sqlFloatEncode as N, sqlCharDescriptor as O, sqlIntColumn as P, sqlTextColumn as R, lockOptionCapabilities as S, missingCapability as T, sqlVarcharDecode as U, sqlTextEncode as V, sqlVarcharDescriptor as W, SqlVarcharCodec as _, SQL_FLOAT_CODEC_ID as a, encodeLiteralDefault as b, SQL_VARCHAR_CODEC_ID as c, SqlFloatCodec as d, SqlFloatDescriptor as f, SqlTextDescriptor as g, SqlTextCodec as h, SQL_CHAR_CODEC_ID as i, sqlFloatDecode as j, sqlCharEncode as k, SqlCharCodec as l, SqlIntDescriptor as m, JsonDocumentProjection as n, SQL_INT_CODEC_ID as o, SqlIntCodec as p, NativeJsonValueProjection as r, SQL_TEXT_CODEC_ID as s, CodecJsonValueProjection as t, SqlCharDescriptor as u, SqlVarcharDescriptor as v, lockWaitPolicyOf as w, lockIncompatible as x, encodeListLiteralDefault as y, sqlTextDecode as z };
|
|
336
310
|
|
|
337
|
-
//# sourceMappingURL=ast-
|
|
311
|
+
//# sourceMappingURL=ast-BDwGvnKK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-BDwGvnKK.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.mjs"],"sourcesContent":["import { A as ParamRef, B as aggregateFnNames, C as LiteralExpr, D as OperationExpr, E as NullCheckExpr, F as SelectAst, G as isQueryAst, H as isAggregateFn, I as SubqueryExpr, J as whereExprKinds, K as isWhereExpr, L as TableSource, M as ProjectionItem, N as RawExpr, O as OrExpr, P as RawQueryAst, R as UpdateAst, S as ListExpression, T as NotExpr, U as isOrderByDirection, V as checkLimitOffset, W as isOrderByNulls, Y as frozenCodecRef, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as PreparedParamRef, k as OrderByItem, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, q as queryAstKinds, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as LockingClause, x as JsonObjectExpr, y as JoinAst, z as WindowFuncExpr } from \"../types-NTQsD2MS.mjs\";\nimport { a as DdlColumn, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as CheckExpressionConstraint, l as FunctionColumnDefault, n as opaqueSql, o as DdlColumnDefault, p as isDdlNode, r as renderOpaqueSql, s as DdlNode, t as OpaqueSql, u as LiteralColumnDefault } from \"../opaque-sql-BWxbqe5a.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-BBgcP3gI.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, decodeJsonFloat, decodeJsonInteger, decodeJsonString, encodeJsonFloat } from \"@internal/framework-components/codec\";\nimport { isInternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { withoutTrailing } from \"@internal/utils/text\";\n//#region src/ast/ddl-default.ts\n/**\n* Reads a column's literal default with the column's codec, built with its type parameters, and encodes it for the DDL renderer to inline. `undefined` when no codec descriptor has the column's codec id, so the renderer inlines the value as written.\n*\n* A `Date` is the one authored value JSON has no notation for, so it is encoded as it is. A `null` the codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a codec that reads `null` (a JSON codec) makes it the JSON value null. Any other value the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column.\n*/\nasync function encodeLiteralDefault(codecLookup, codecRef, value, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\tif (value instanceof Date) return {\n\t\tkind: \"wire\",\n\t\twire: await codec.encode(value, {})\n\t};\n\treturn encodeWithCodec(codec, value, (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause));\n}\n/**\n* Reads and encodes each element of a list column's literal default with the column's codec, as {@link encodeLiteralDefault} does a single value, so a `null` element the codec refuses is SQL NULL. `undefined` when no codec descriptor has the column's codec id. An element the codec refuses is a `CONTRACT.DEFAULT_INVALID` naming the column and the element's 1-based position.\n*/\nasync function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {\n\tconst codec = codecForRef(codecLookup, codecRef);\n\tif (codec === void 0) return void 0;\n\treturn Promise.all(elements.map((element, index) => encodeWithCodec(codec, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));\n}\nasync function encodeWithCodec(codec, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = codec.decodeJson(value);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tif (value === null) return { kind: \"sql-null\" };\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.encode(decoded, {})\n\t};\n}\nfunction refusedDefault(where, codecId, value, elementPosition, cause) {\n\tconst reason = cause instanceof Error ? cause.message : String(cause);\n\tconst subject = elementPosition === void 0 ? \"default\" : `default (element ${elementPosition})`;\n\treturn structuredError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${where.table}\".\"${where.column}\" has a ${subject} its codec ${codecId} refuses: ${reason}`, {\n\t\twhy: \"A contract.json that an earlier version emitted, or a migration.ts it planned, can hold a default that this version's codec refuses, and so can either file after a hand edit.\",\n\t\tfix: \"If contract.json holds the default, emit the contract again with this version, and correct the default in the contract source if emit refuses it. If a migration.ts sets it, correct it in that file.\",\n\t\tcause,\n\t\tmeta: {\n\t\t\ttable: where.table,\n\t\t\tcolumn: where.column,\n\t\t\tcodecId,\n\t\t\tvalue,\n\t\t\t...ifDefined(\"elementPosition\", elementPosition),\n\t\t\treason: \"codec-refused-default\"\n\t\t}\n\t});\n}\n//#endregion\n//#region src/ast/json-value-projection.ts\nvar JsonValueProjection = class {\n\tvalue;\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tfold(folder) {\n\t\treturn this.value.fold(folder);\n\t}\n\tcollectColumnRefs() {\n\t\treturn this.value.collectColumnRefs();\n\t}\n\tcollectParamRefs() {\n\t\treturn this.value.collectParamRefs();\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {\n\tkind = \"codec\";\n\tcodec;\n\tconstructor(value, codec) {\n\t\tsuper(value);\n\t\tthis.codec = frozenCodecRef(codec);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.codec(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);\n\t}\n};\nvar NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {\n\tkind = \"native\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.native(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new NativeJsonValueProjection(this.value.rewrite(rewriter));\n\t}\n};\nvar JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {\n\tkind = \"document\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.document(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new JsonDocumentProjection(this.value.rewrite(rewriter));\n\t}\n};\n//#endregion\n//#region src/ast/locking.ts\n/** The `ORM.LOCK_INCOMPATIBLE` error for a lock refused because of `conflict`. */\nfunction lockIncompatible(conflict, message) {\n\treturn structuredError(\"ORM.LOCK_INCOMPATIBLE\", message, { meta: { conflict } });\n}\n/** The capability each lock strength needs. */\nconst lockStrengthCapabilities = {\n\tforUpdate: { sql: { forUpdate: true } },\n\tforNoKeyUpdate: { postgres: { forNoKeyUpdate: true } },\n\tforShare: { sql: { forShare: true } },\n\tforKeyShare: { postgres: { forKeyShare: true } }\n};\n/** The capability each locking option needs; the wait-policy keys equal the `LockWaitPolicy` values. */\nconst lockOptionCapabilities = {\n\tof: { sql: { lockOf: true } },\n\tnowait: { sql: { lockNowait: true } },\n\tskipLocked: { sql: { lockSkipLocked: true } }\n};\n/** The first flag in `requirement` that `capabilities` does not report as `true`, as `group.flag`. */\nfunction missingCapability(capabilities, requirement) {\n\tfor (const [group, flags] of Object.entries(requirement)) for (const flag of Object.keys(flags)) if (capabilities[group]?.[flag] !== true) return `${group}.${flag}`;\n}\n/** Turns `{ nowait, skipLocked }` into a wait policy, refusing both together with `ORM.ARGUMENT_INVALID`. */\nfunction lockWaitPolicyOf(methodName, options) {\n\tif (options?.nowait && options.skipLocked) throw structuredError(\"ORM.ARGUMENT_INVALID\", `${methodName}() takes nowait or skipLocked, not both`, { meta: { method: methodName } });\n\tif (options?.nowait) return \"nowait\";\n\tif (options?.skipLocked) return \"skipLocked\";\n}\n//#endregion\n//#region src/ast/sql-codec-helpers.ts\n/**\n* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).\n*\n* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.\n*/\nconst SQL_CHAR_CODEC_ID = \"sql/char@1\";\nconst SQL_VARCHAR_CODEC_ID = \"sql/varchar@1\";\nconst SQL_INT_CODEC_ID = \"sql/int@1\";\nconst SQL_FLOAT_CODEC_ID = \"sql/float@1\";\nconst SQL_TEXT_CODEC_ID = \"sql/text@1\";\nconst sqlCharEncode = (value) => value;\n/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */\nconst sqlCharDecode = (wire) => withoutTrailing(wire, \" \");\nconst sqlVarcharEncode = (value) => value;\nconst sqlVarcharDecode = (wire) => wire;\nconst sqlIntEncode = (value) => value;\nconst sqlIntDecode = (wire) => wire;\nconst sqlFloatEncode = (value) => value;\nconst sqlFloatDecode = (wire) => wire;\nconst sqlTextEncode = (value) => value;\nconst sqlTextDecode = (wire) => wire;\n//#endregion\n//#region src/ast/sql-codecs.ts\nvar SqlTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(this.id, json);\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqlTextCodec(this);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);\nvar SqlIntCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonInteger(this.id, json, SAFE_INTEGER_RANGE);\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqlIntCodec(this);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn encodeJsonFloat(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonFloat(this.id, json);\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_FLOAT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\tparamsSchema = void 0;\n\tfactory() {\n\t\treturn () => new SqlFloatCodec(this);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);\nvar SqlCharCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(this.id, json);\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_CHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => new SqlCharCodec(this);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn decodeJsonString(this.id, json);\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tcodecId = SQL_VARCHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => new SqlVarcharCodec(this);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);\n//#endregion\nexport { AggregateExpr, AndExpr, BinaryExpr, CaseExpr, CastExpr, CheckExpressionConstraint, CodecJsonValueProjection, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, LockingClause, NativeJsonValueProjection, NotExpr, NullCheckExpr, OpaqueSql, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawQueryAst, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, aggregateFnNames, checkLimitOffset, collectOrderedParamRefs, compact, encodeListLiteralDefault, encodeLiteralDefault, frozenCodecRef, isAggregateFn, isAggregateProjection, isDdlNode, isOrderByDirection, isOrderByNulls, isQueryAst, isWhereExpr, lockIncompatible, lockOptionCapabilities, lockStrengthCapabilities, lockWaitPolicyOf, missingCapability, opaqueSql, queryAstKinds, renderOpaqueSql, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlFloatColumn, sqlFloatDecode, sqlFloatDescriptor, sqlFloatEncode, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, whereExprKinds };\n\n//# sourceMappingURL=ast.mjs.map"],"mappings":";;;;;;;;;;;;AAcA,eAAe,qBAAqB,aAAa,UAAU,OAAO,OAAO;CACxE,MAAM,QAAQ,YAAY,aAAa,QAAQ;CAC/C,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,IAAI,iBAAiB,MAAM,OAAO;EACjC,MAAM;EACN,MAAM,MAAM,MAAM,OAAO,OAAO,CAAC,CAAC;CACnC;CACA,OAAO,gBAAgB,OAAO,QAAQ,UAAU,eAAe,OAAO,SAAS,SAAS,OAAO,KAAK,GAAG,KAAK,CAAC;AAC9G;;;;AAIA,eAAe,yBAAyB,aAAa,UAAU,UAAU,OAAO;CAC/E,MAAM,QAAQ,YAAY,aAAa,QAAQ;CAC/C,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,OAAO,QAAQ,IAAI,SAAS,KAAK,SAAS,UAAU,gBAAgB,OAAO,UAAU,UAAU,eAAe,OAAO,SAAS,SAAS,SAAS,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC;AACpK;AACA,eAAe,gBAAgB,OAAO,OAAO,SAAS;CACrD,IAAI;CACJ,IAAI;EACH,UAAU,MAAM,WAAW,KAAK;CACjC,SAAS,OAAO;EACf,IAAI,gBAAgB,KAAK,GAAG,MAAM;EAClC,IAAI,UAAU,MAAM,OAAO,EAAE,MAAM,WAAW;EAC9C,MAAM,QAAQ,KAAK;CACpB;CACA,OAAO;EACN,MAAM;EACN,MAAM,MAAM,MAAM,OAAO,S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AAO,kBAAkB,QAAQ,MAAM,GAAG,kBAAkB,SAAS,MAAM;AAClH,IAAI,kBAAkB,cAAc,UAAU;CAC7C,MAAM,OAAO,OAAO,MAAM;EACzB,OAAO,iBAAiB,KAAK;CAC9B;CACA,MAAM,OAAO,MAAM,MAAM;EACxB,OAAO,iBAAiB,IAAI;CAC7B;CACA,WAAW,OAAO;EACjB,OAAO;CACR;CACA,WAAW,MAAM;EAChB,OAAO,iBAAiB,KAAK,IAAI,IAAI;CACtC;AACD;AACA,IAAI,uBAAuB,cAAc,4BAA4B;CACpE,UAAU;CACV,SAAS;EACR;EACA;EACA;CACD;CACA,eAAe,KAAK;CACpB,QAAQ,SAAS;EAChB,aAAa,IAAI,gBAAgB,IAAI;CACtC;AACD;AACA,MAAM,uBAAuB,IAAI,qBAAqB;AACtD,MAAM,oBAAoB,SAAS,CAAC,MAAM,OAAO,qBAAqB,QAAQ,MAAM,GAAG,qBAAqB,SAAS,MAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as CodecRef$1, Et as ProjectionItem, dt as LockWaitPolicy, h as AnyQueryAst, ht as LoweredStatement, m as AnyParamRef } from "./types-Sh5HuaZE-
|
|
1
|
+
import { E as CodecRef$1, Et as ProjectionItem, dt as LockWaitPolicy, h as AnyQueryAst, ht as LoweredStatement, m as AnyParamRef } from "./types-Sh5HuaZE-Dq4AUzl7.mjs";
|
|
2
2
|
import { c as SqlQueryable } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
|
|
3
|
-
import "./ddl-types-DtKZjNtN-
|
|
3
|
+
import "./ddl-types-DtKZjNtN-BCpmdMQF.mjs";
|
|
4
4
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
5
|
import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
|
|
6
6
|
import { ColumnDefaultLiteralInputValue, ContractMarkerRecord, JsonValue } from "@prisma/orm-framework/contract/types";
|
|
@@ -148,9 +148,9 @@ declare function lockWaitPolicyOf(methodName: string, options: LockWaitRequest |
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/ast/sql-codec-helpers.d.ts
|
|
150
150
|
/**
|
|
151
|
-
* Shared encode/decode
|
|
151
|
+
* Shared encode/decode constants and codec id literals for the five SQL base codecs (`sql/char@1`, `sql/varchar@1`, `sql/int@1`, `sql/float@1`, `sql/text@1`).
|
|
152
152
|
*
|
|
153
|
-
* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers
|
|
153
|
+
* The codec implementations live in `sql-codecs.ts` (TML-2357). This module retains only the conversion helpers the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.
|
|
154
154
|
*/
|
|
155
155
|
declare const SQL_CHAR_CODEC_ID: "sql/char@1";
|
|
156
156
|
declare const SQL_VARCHAR_CODEC_ID: "sql/varchar@1";
|
|
@@ -160,14 +160,8 @@ declare const SQL_TEXT_CODEC_ID: "sql/text@1";
|
|
|
160
160
|
declare const sqlCharEncode: (value: string) => string;
|
|
161
161
|
/** A `character` value as the database returns it, without the spaces that pad it to its length. Only spaces pad it, so a trailing tab or newline is part of the value. */
|
|
162
162
|
declare const sqlCharDecode: (wire: string) => string;
|
|
163
|
-
declare const sqlCharRenderOutputType: (typeParams: {
|
|
164
|
-
readonly length?: number;
|
|
165
|
-
}) => string | undefined;
|
|
166
163
|
declare const sqlVarcharEncode: (value: string) => string;
|
|
167
164
|
declare const sqlVarcharDecode: (wire: string) => string;
|
|
168
|
-
declare const sqlVarcharRenderOutputType: (typeParams: {
|
|
169
|
-
readonly length?: number;
|
|
170
|
-
}) => string | undefined;
|
|
171
165
|
declare const sqlIntEncode: (value: number) => number;
|
|
172
166
|
declare const sqlIntDecode: (wire: number) => number;
|
|
173
167
|
declare const sqlFloatEncode: (value: number) => number;
|
|
@@ -231,7 +225,6 @@ declare class SqlCharDescriptor extends CodecDescriptorTemplateImpl<LengthParams
|
|
|
231
225
|
readonly codecId: "sql/char@1";
|
|
232
226
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
233
227
|
readonly paramsSchema: undefined;
|
|
234
|
-
renderOutputType(params: LengthParams): string | undefined;
|
|
235
228
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlCharCodec;
|
|
236
229
|
}
|
|
237
230
|
declare const sqlCharDescriptor: SqlCharDescriptor;
|
|
@@ -246,7 +239,6 @@ declare class SqlVarcharDescriptor extends CodecDescriptorTemplateImpl<LengthPar
|
|
|
246
239
|
readonly codecId: "sql/varchar@1";
|
|
247
240
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
248
241
|
readonly paramsSchema: undefined;
|
|
249
|
-
renderOutputType(params: LengthParams): string | undefined;
|
|
250
242
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlVarcharCodec;
|
|
251
243
|
}
|
|
252
244
|
declare const sqlVarcharDescriptor: SqlVarcharDescriptor;
|
|
@@ -268,5 +260,5 @@ declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<AnyPar
|
|
|
268
260
|
/** Whether a projection item's top-level expression is an aggregate, `json_agg` or window function. Nested expressions are not inspected. */
|
|
269
261
|
declare function isAggregateProjection(item: ProjectionItem): boolean;
|
|
270
262
|
//#endregion
|
|
271
|
-
export {
|
|
272
|
-
//# sourceMappingURL=ast-
|
|
263
|
+
export { sqlTextDecode as $, collectOrderedParamRefs as A, sqlCharColumn as B, SqlFloatDescriptor as C, SqlTextDescriptor as D, SqlTextCodec as E, lockIncompatible as F, sqlFloatDecode as G, sqlCharDescriptor as H, lockOptionCapabilities as I, sqlIntColumn as J, sqlFloatDescriptor as K, lockStrengthCapabilities as L, encodeListLiteralDefault as M, encodeLiteralDefault as N, SqlVarcharCodec as O, isAggregateProjection as P, sqlTextColumn as Q, lockWaitPolicyOf as R, SqlFloatCodec as S, SqlIntDescriptor as T, sqlCharEncode as U, sqlCharDecode as V, sqlFloatColumn as W, sqlIntDescriptor as X, sqlIntDecode as Y, sqlIntEncode as Z, SQL_INT_CODEC_ID as _, EncodedLiteralDefault as a, sqlVarcharEncode as at, SqlCharCodec as b, LockOptionCapabilities as c, LockWaitRequest as d, sqlTextDescriptor as et, Lowerer as f, SQL_FLOAT_CODEC_ID as g, SQL_CHAR_CODEC_ID as h, CapabilityRequirement as i, sqlVarcharDescriptor as it, compact as j, SqlVarcharDescriptor as k, LockStrengthCapabilities as l, MarkerReadResult as m, AdapterProfile as n, sqlVarcharColumn as nt, LiteralDefaultColumn as o, LowererContext as p, sqlFloatEncode as q, AdapterTarget as r, sqlVarcharDecode as rt, LockConflict as s, Adapter as t, sqlTextEncode as tt, LockWaitOptions as u, SQL_TEXT_CODEC_ID as v, SqlIntCodec as w, SqlCharDescriptor as x, SQL_VARCHAR_CODEC_ID as y, missingCapability as z };
|
|
264
|
+
//# sourceMappingURL=ast-DbmdIKFd.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-DbmdIKFd.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.d.mts"],"mappings":";;;;;;;;KAOK;;;;;;;KAOA;WACM;WACA,QAAQ;;WAER;;WAEA;;UAED,eAAe,gBAAgB,gBAAgB;WAC9C;WACA,QAAQ;WACR,cAAc;;;;EAIvB,WAAW,WAAW,eAAe,QAAQ;;UAErC,eAAe;WACd,UAAU;WACV;;KAEN,QAAQ,eAAe,qBAAqB,QAAQ,qBAAqB,KAAK,KAAK,SAAS,eAAe,eAAe;;;;UAIrH,QAAQ,eAAe,qBAAqB,QAAQ;WACnD,SAAS;EAClB,MAAM,KAAK,KAAK,SAAS,eAAe,aAAa;;;;;KAKlD;WACM;;WAEA;WACA;;;UAGD;WACC;WACA;;;;;;;iBAOM,qBAAqB,aAAa,KAAK,8CAA8C,UAAU,YAAU,OAAO,gCAAgC,OAAO,uBAAuB,QAAQ;;;;iBAItL,yBAAyB,aAAa,KAA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AC3B,WAAW,MAAM;;cAEL,2BAA2B;WAC9B;WACA;WACA;EACT,YAAY,KAAK,yBAAyB;;cAE9B,oBAAoB;cACpB,qEAAqE,WAAW;cAChF,qBAAqB,iBAAiB;EAClD,OAAO,eAAe,MAAM,mBAAqB;EACjD,OAAO,cAAc,MAAM,mBAAqB;EAChD,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,0BAA0B,4BAA4B;WACzD;WACA;WACA;EACT,QAAQ,SAAS,gBAAgB,KAAK,yBAAyB;;cAEnD,mBAAmB;cACnB,gBAAgB,SAAS,gEAAgE,WAAW,cAAc;cAClH,wBAAwB,iBAAiB;EACrD,OAAO,eAAe,MAAM,mBAAqB;EACjD,OAAO,cAAc,MAAM,mBAAqB;EAChD,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,6BAA6B,4BAA4B;WAC5D;WACA;WACA;EACT,QAAQ,SAAS,gBAAgB,KAAK,yBAAyB;;cAEnD,sBAAsB;cACtB,mBAAmB,SAAS,gEAAgE,WAAW,iBAAiB;;;iBAGrH,QAAQ,UAAU,yBAAyB,GAAG,IAAI;;;;;;;;;;;iBAWlD,wBAAwB,KAAK,cAAc,cAAc;;iBAEzD,sBAAsB,MAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./contract-builder-
|
|
2
|
-
import "./psl-column-resolution-
|
|
1
|
+
import "./contract-builder-ClsLO9DI.mjs";
|
|
2
|
+
import "./psl-column-resolution-BCkhNzOK-0Gry4LFl.mjs";
|
|
3
3
|
import { PslSources } from "@prisma/orm-framework/psl-parser/syntax";
|
|
4
4
|
import { AttributeSpec, AttributeSpecContext, DescribeUnsupportedAttribute, FieldAttributeCtx, FieldAttributeSpecContext, ModelAttributeCtx, ModelSymbol, ParsedWrittenList, ParsedWrittenScalar, PslSpan, TypedFuncCall } from "@prisma/orm-framework/psl-parser";
|
|
5
5
|
import "@prisma/orm-framework/components/control";
|
|
@@ -103,4 +103,4 @@ declare const sqlAttributeSpecs: {
|
|
|
103
103
|
declare function describeUnsupportedSqlAttribute(sources: PslSources): DescribeUnsupportedAttribute;
|
|
104
104
|
//#endregion
|
|
105
105
|
export { ParsedNullLiteral as a, EnumMemberListDefault as i, DefaultFunctionCall as n, sqlAttributeSpecs as o, EnumMemberDefault as r, describeUnsupportedSqlAttribute as t };
|
|
106
|
-
//# sourceMappingURL=attribute-specs-
|
|
106
|
+
//# sourceMappingURL=attribute-specs-CKg3a2P_.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-specs-
|
|
1
|
+
{"version":3,"file":"attribute-specs-CKg3a2P_.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/sql-attribute-specs-V7142vJa.d.mts","../../../../2-sql/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;UAMU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;iBACvJ,iBAAiB,KAAK,4BAA4B;EACjE,OAAO;GACN;iBACc,eAAe,KAAK,uBAAuB;EAC1D;WACS,4CAA4C;WAC5C,uCAAuC;WACvC;WACA;WACA;WACA;WACA,UAAU;GAClB;iBACc,eAAe,KAAK,uBAAuB;WACjD,2CAA2C;WAC3C;WACA;GACR;;cAEW;WACH;aACE,MAAM,MAAM,yBAAyB;MAC5C;OACC;aACM,KAAK,MAAM,yBAAyB;MAC3C;eACS;OACR;aACM,SAAS,MAAM,yBAAyB;MAC/C;eACS;OACR;aACM,cAAc;aACd,cAAc;aACd,UAAU,MAAM,yBAAyB;MAChD;OACC;aACM,gBAAgB,MAAM,yBAAyB;MACtD;OACC;aACM,OAAO,MAAM,yBAAyB;MAC7C,qCAAqC,wBAAwB;MAC7D;OACC;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,UAAU,MAAM,8BAA8B;MACrD;MACA;OACC;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,gBAAgB;;;;;;iBCnFZ,gCAAgC,SAAS,aAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./contract-builder-
|
|
1
|
+
import "./contract-builder-ClsLO9DI.mjs";
|
|
2
2
|
import "@prisma/orm-framework/components/authoring";
|
|
3
3
|
import "@prisma/orm-framework/psl-parser";
|
|
4
4
|
//#region ../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts
|
|
@@ -6,4 +6,4 @@ import "@prisma/orm-framework/psl-parser";
|
|
|
6
6
|
declare function sqlFamilyEnumSpec(): import("@prisma/orm-framework/psl-parser").MapBlockSpec<Record<string, import("@prisma/orm-framework/contract/types").JsonValue | undefined>>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { sqlFamilyEnumSpec as t };
|
|
9
|
-
//# sourceMappingURL=authoring-entity-types-CZ-vdwYS-
|
|
9
|
+
//# sourceMappingURL=authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-entity-types-CZ-vdwYS-
|
|
1
|
+
{"version":3,"file":"authoring-entity-types-CZ-vdwYS-Cc7JCJ0Q.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-entity-types-CZ-vdwYS.d.mts"],"mappings":";;;;;iBAIiB,oDAAoD,aAAa,kDAAkD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as enumType } from "./contract-builder-
|
|
1
|
+
import { c as enumType } from "./contract-builder-Du_YOA1B.mjs";
|
|
2
2
|
import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
3
3
|
import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { blockAttribute, jsonValue, mapBlock, str } from "@prisma/orm-framework/psl-parser";
|
|
@@ -263,4 +263,4 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
|
|
|
263
263
|
//#endregion
|
|
264
264
|
export { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringFieldPresets as t };
|
|
265
265
|
|
|
266
|
-
//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-
|
|
266
|
+
//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-type-constructors-0Iv2zdwS-zu35z-Tg.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-0Iv2zdwS.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, jsonValue, mapBlock, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\nexport { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringTypes as t };\n\n//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS.mjs.map"],"mappings":";;;;;AAKA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,cAAc,OAAO;EACxD,MAAM,QAAQ,IAAI,YAAY,IAAI,OAAO;EACzC,IAAI,eAAe,KAAK,KAAK,UAAU,KAAK,GAAG;GAC9C,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,cAAc,cAAc,UAAU;EAC5C,IAAI,gBAAgB,KAAK,GAAG;GAC3B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,0BAA0B,QAAQ,KAAK;IACpE;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,WAAW,IAAI,eAAe,IAAI,WAAW,QAAQ;EAC3D,IAAI,aAAa,KAAK,GAAG;GACxB,aAAa,KAAK;IACjB,MA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IAAI;GACL;EACD;EACA,OAAO;GACN,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;CACD;AACD;AAGA,MAAM,0BAA0B,EAAE,KAAK,EAAE,QAAQ;CAChD,MAAM;CACN,eAAe;CACf,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
|
|
1
|
+
{"version":3,"file":"authoring-type-constructors-0Iv2zdwS-BG0FZNDM.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-0Iv2zdwS.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, jsonValue, mapBlock, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\nexport { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringTypes as t };\n\n//# sourceMappingURL=authoring-type-constructors-0Iv2zdwS.mjs.map"],"mappings":";;;;;AAKA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,cAAc,OAAO;EACxD,MAAM,QAAQ,IAAI,YAAY,IAAI,OAAO;EACzC,IAAI,eAAe,KAAK,KAAK,UAAU,KAAK,GAAG;GAC9C,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,cAAc,cAAc,UAAU;EAC5C,IAAI,gBAAgB,KAAK,GAAG;GAC3B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,0BAA0B,QAAQ,KAAK;IACpE;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,WAAW,IAAI,eAAe,IAAI,WAAW,QAAQ;EAC3D,IAAI,aAAa,KAAK,GAAG;GACxB,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,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AAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;CACD;AACD;AAGA,MAAM,0BAA0B,EAAE,KAAK,EAAE,QAAQ;CAChD,MAAM;CACN,eAAe;CACf,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
|
package/dist/builder.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-Ck1wys3N-
|
|
2
|
-
import { a as Subquery, r as Functions } from "./functions-
|
|
3
|
-
import { C as WhereFilter, S as UpdateQuery, d as QueryContext, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, o as GatedMethod, r as Db, s as GroupedQuery, t as AggregateFunctions, y as TableProxy } from "./db-BmrN9nRS-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-Ck1wys3N-CBfr-HMG.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions } from "./functions-DucgffNf.mjs";
|
|
3
|
+
import { C as WhereFilter, S as UpdateQuery, d as QueryContext, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, o as GatedMethod, r as Db, s as GroupedQuery, t as AggregateFunctions, y as TableProxy } from "./db-BmrN9nRS-CkMIL55t.mjs";
|
|
4
4
|
export type { AggregateFunctions, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, InsertQuery, QueryContext, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableProxy, UpdateQuery, WhereFilter };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { l as SqlStorage } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
|
|
2
|
-
import "./types-
|
|
3
|
-
import { i as SqlOperationEntry } from "./index-
|
|
4
|
-
import { l as RawCodecInferer } from "./expression-Ck1wys3N-
|
|
5
|
-
import { t as ExpressionImpl } from "./expression-CNBCbbzU-
|
|
6
|
-
import "./expression-
|
|
7
|
-
import { s as createFunctions } from "./functions-
|
|
8
|
-
import { a as FieldProxy, b as TableProxyContract, d as QueryContext, f as RawLane, h as Scope, r as Db, t as AggregateFunctions } from "./db-BmrN9nRS-
|
|
9
|
-
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-C42-u9L1-
|
|
10
|
-
import "./query-lane-context-
|
|
2
|
+
import "./types-HD5m-h8B.mjs";
|
|
3
|
+
import { i as SqlOperationEntry } from "./index-CJlr0Eja.mjs";
|
|
4
|
+
import { l as RawCodecInferer } from "./expression-Ck1wys3N-CBfr-HMG.mjs";
|
|
5
|
+
import { t as ExpressionImpl } from "./expression-CNBCbbzU-DnvLZYf4.mjs";
|
|
6
|
+
import "./expression-eDSWdiqh.mjs";
|
|
7
|
+
import { s as createFunctions } from "./functions-DucgffNf.mjs";
|
|
8
|
+
import { a as FieldProxy, b as TableProxyContract, d as QueryContext, f as RawLane, h as Scope, r as Db, t as AggregateFunctions } from "./db-BmrN9nRS-CkMIL55t.mjs";
|
|
9
|
+
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-C42-u9L1-CUP3uW4A.mjs";
|
|
10
|
+
import "./query-lane-context-C29KGcgz.mjs";
|
|
11
11
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
12
12
|
//#region ../../../2-sql/4-lanes/sql-builder/dist/runtime/index.d.mts
|
|
13
13
|
//#region src/runtime/field-proxy.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ParamRef, F as SelectAst, G as isOrderByNulls, L as TableSource, M as ProjectionItem, R as UpdateAst, U as isAggregateFn, W as isOrderByDirection, _ as InsertAst, c as DeleteAst, g as IdentifierRef, k as OrderByItem, l as DerivedTableSource, n as AndExpr, o as ColumnRef, t as AggregateExpr, w as LockingClause, y as JoinAst } from "./types-NTQsD2MS-DAP2yVDn.mjs";
|
|
2
2
|
import { r as isAggregateProjection, t as collectOrderedParamRefs } from "./util-BBgcP3gI-XJBkxo1K.mjs";
|
|
3
|
-
import { C as lockStrengthCapabilities, S as lockOptionCapabilities, w as lockWaitPolicyOf, x as lockIncompatible } from "./ast-
|
|
3
|
+
import { C as lockStrengthCapabilities, S as lockOptionCapabilities, w as lockWaitPolicyOf, x as lockIncompatible } from "./ast-BDwGvnKK.mjs";
|
|
4
4
|
import { i as createRawSql, s as toExpr, t as ExpressionImpl } from "./expression-impl-B-XNINxr-vYwKVFeP.mjs";
|
|
5
5
|
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-CYK0Wzja.mjs";
|
|
6
6
|
import { t as createFunctions } from "./functions-0YWByawj.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-Ck1wys3N-
|
|
2
|
-
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-
|
|
3
|
-
import { t as IndexReference } from "./index-reference-DJX-CNsb-
|
|
4
|
-
import "./index-reference-
|
|
5
|
-
import { C as WhereFilter, S as UpdateQuery, _ as TableInAnyNamespace, b as TableProxyContract, c as IndexReferences, d as QueryContext, f as RawLane, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, n as ContractRawTag, o as GatedMethod, p as RawTagFor, r as Db, s as GroupedQuery, t as AggregateFunctions, u as Namespace, v as TableNamesAcrossNamespaces, x as UnboundTables, y as TableProxy } from "./db-BmrN9nRS-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-Ck1wys3N-CBfr-HMG.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-DucgffNf.mjs";
|
|
3
|
+
import { t as IndexReference } from "./index-reference-DJX-CNsb-C1fCMhrJ.mjs";
|
|
4
|
+
import "./index-reference-CrohwmmB.mjs";
|
|
5
|
+
import { C as WhereFilter, S as UpdateQuery, _ as TableInAnyNamespace, b as TableProxyContract, c as IndexReferences, d as QueryContext, f as RawLane, g as SelectQuery, h as Scope, i as DeleteQuery, l as InsertQuery, m as ResolveRow, n as ContractRawTag, o as GatedMethod, p as RawTagFor, r as Db, s as GroupedQuery, t as AggregateFunctions, u as Namespace, v as TableNamesAcrossNamespaces, x as UnboundTables, y as TableProxy } from "./db-BmrN9nRS-CkMIL55t.mjs";
|
|
6
6
|
export type { AggregateFunctions, BooleanCodecType, ContractRawTag, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, IndexReference, IndexReferences, InsertQuery, Namespace, QueryContext, RawLane, RawTagFor, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableInAnyNamespace, TableNamesAcrossNamespaces, TableProxy, TableProxyContract, UnboundTables, UpdateQuery, WhereFilter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as StorageTable } from "./storage-table-WXeVNycx-BCwDhdq5.mjs";
|
|
2
|
-
import "./types-
|
|
3
|
-
import { t as IndexReference } from "./index-reference-DJX-CNsb-
|
|
2
|
+
import "./types-HD5m-h8B.mjs";
|
|
3
|
+
import { t as IndexReference } from "./index-reference-DJX-CNsb-C1fCMhrJ.mjs";
|
|
4
4
|
import { ContractField, ContractRelation } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
//#region ../../../2-sql/4-lanes/relational-core/dist/collection-methods-BnR4UjcW.d.mts
|
|
6
6
|
//#region src/collection-methods.d.ts
|
|
@@ -74,4 +74,4 @@ interface CollectionMethodContribution {
|
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
76
|
export { CollectionMethodModel as a, CollectionMethodRegistry as c, CollectionMethodContributionType as i, CollectionMethodTools as l, CollectionMethodContribution as n, CollectionMethodModelType as o, CollectionMethodContributionId as r, CollectionMethodReceiver as s, CollectionMethodBody as t, ContributedMethodSignature as u };
|
|
77
|
-
//# sourceMappingURL=collection-methods-BnR4UjcW-
|
|
77
|
+
//# sourceMappingURL=collection-methods-BnR4UjcW-BY8ZGjfa.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-methods-BnR4UjcW-
|
|
1
|
+
{"version":3,"file":"collection-methods-BnR4UjcW-BY8ZGjfa.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/collection-methods-BnR4UjcW.d.mts"],"mappings":";;;;;;;;;UAOU;WACC;WACA;WACA;WACA;WACA;aACE;aACA;;;;;;UAMH;WACC;WACA;WACA;;;;;UAKD;WACC,OAAO;WACP;cACG,eAAe;;;;;;UAMnB;;WAEC;;;KAGN,iCAAiC,cAAc;;UAE1C;WACC,KAAK,SAAS,mBAAmB;WACjC,SAAS,SAAS,eAAe;;;;;UAKlC;EACR,MAAM,YAAY,gBAAgB,OAAO,oCAAoC;EAC7E,QAAQ,QAAQ,gBAAgB,OAAO,oCAAoC;;;KAGxE,wBAAwB,YAAY,6BAA6B,kBAAkB;;UAE9E;WACC;WACA;WACA,QAAQ,SAAS,eAAe;WAChC,WAAW,SAAS,eAAe;WACnC,OAAO;;;;;UAKR;WACC;EACT,WAAW,OAAO,wBAAwB,SAAS,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./collection-methods-BnR4UjcW-BY8ZGjfa.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SqlNamespaceBase, c as SqlNamespaceInput } from "./sql-storage-BTlJLUID-CGy3wuH4.mjs";
|
|
2
|
-
import "./types-
|
|
3
|
-
import { t as SqlNamespaceFactory } from "./derived-checks-DpPkO6Dt-
|
|
2
|
+
import "./types-HD5m-h8B.mjs";
|
|
3
|
+
import { t as SqlNamespaceFactory } from "./derived-checks-DpPkO6Dt--oL-Zi3r.mjs";
|
|
4
4
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
6
6
|
import { ContractConfig, ContractConfig as ContractConfig$1 } from "@prisma/orm-framework/config/config-types";
|
|
@@ -25,4 +25,4 @@ declare function typescriptContract(contract: Contract, output?: string, options
|
|
|
25
25
|
declare function typescriptContractFromPath(contractPath: string, output?: string, options?: TypeScriptContractSpecifierOptions): ContractConfig;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { typescriptContractFromPath as i, emptyContract as n, typescriptContract as r, ContractConfig$1 as t };
|
|
28
|
-
//# sourceMappingURL=config-types-
|
|
28
|
+
//# sourceMappingURL=config-types-C2mASmPh.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-C2mASmPh.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.d.mts"],"mappings":";;;;;;;;;;;;;UAWU;WACC,sBAAsB;WACtB,iBAAiB;;iBAEX,cAAc;WACpB;WACA,QAAQ;WACR,kBAAkB,OAAO,sBAAsB;WAC/C,uBAAuB;IAC9B;iBACa,mBAAmB,UAAU,UAAU,iBAAiB,UAAU,qCAAqC;iBACvG,2BAA2B,sBAAsB,iBAAiB,UAAU,qCAAqC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
1
|
+
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-BVSHiu2A-CzEmkTMg.mjs";
|
|
2
2
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
3
3
|
import { createDataTypeLookup, emptyCodecLookup } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -65,4 +65,4 @@ function typescriptContractFromPath(contractPath, output, options) {
|
|
|
65
65
|
//#endregion
|
|
66
66
|
export { typescriptContract as n, typescriptContractFromPath as r, emptyContract as t };
|
|
67
67
|
|
|
68
|
-
//# sourceMappingURL=config-types-
|
|
68
|
+
//# sourceMappingURL=config-types-CrREu8Fa.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-CrREu8Fa.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { n as buildSqlContractFromDefinition, o as contractError, t as applySqlSpecifierControlPolicy } from \"./derived-checks-BVSHiu2A.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { createDataTypeLookup, emptyCodecLookup } from \"@internal/framework-components/codec\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { pathToFileURL } from \"node:url\";\nimport { ok } from \"@internal/utils/result\";\nimport { extname } from \"pathe\";\n//#region src/config-types.ts\n/**\n* Derives the emit output path from the TS contract input so artefacts land\n* colocated with the source (e.g. `prisma/contract.ts` →\n* `prisma/contract.json`). Mirrors the same default-derivation logic in\n* `@internal/sql-contract-psl/provider`.\n*/\nfunction defaultOutputFromContractPath(contractPath) {\n\tconst ext = extname(contractPath);\n\tif (ext.length === 0) return `${contractPath}.json`;\n\treturn `${contractPath.slice(0, -ext.length)}.json`;\n}\nfunction emptyContract(options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => {\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(buildSqlContractFromDefinition({\n\t\t\t\t\twarnings: void 0,\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tmodels: []\n\t\t\t\t}, {\n\t\t\t\t\t...emptyCodecLookup,\n\t\t\t\t\tdescriptorFor: () => void 0\n\t\t\t\t}, createDataTypeLookup([])), options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\t...ifDefined(\"output\", options.output)\n\t};\n}\nfunction typescriptContract(contract, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tload: async () => ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace))\n\t\t},\n\t\t...ifDefined(\"output\", output)\n\t};\n}\nfunction typescriptContractFromPath(contractPath, output, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"typescript\",\n\t\t\tinputs: [contractPath],\n\t\t\tload: async (context) => {\n\t\t\t\tconst [absolutePath] = context.resolvedInputs;\n\t\t\t\tif (absolutePath === void 0) throw new InternalError(\"typescriptContractFromPath: context.resolvedInputs is empty. The CLI config loader should populate it from source.inputs.\");\n\t\t\t\tconst mod = await import(pathToFileURL(absolutePath).href);\n\t\t\t\tconst contract = mod.default ?? mod.contract;\n\t\t\t\tif (contract === void 0) throw contractError(\"CONTRACT.MODULE_EXPORT_MISSING\", `typescriptContractFromPath: module at \"${absolutePath}\" has no \"default\" or \"contract\" export.`, { meta: { path: absolutePath } });\n\t\t\t\treturn ok(options === void 0 ? contract : applySqlSpecifierControlPolicy(contract, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: output ?? defaultOutputFromContractPath(contractPath)\n\t};\n}\n//#endregion\nexport { emptyContract, typescriptContract, typescriptContractFromPath };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,SAAS,8BAA8B,cAAc;CACpD,MAAM,MAAM,QAAQ,YAAY;CAChC,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,aAAa;CAC7C,OAAO,GAAG,aAAa,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE;AAC9C;AACA,SAAS,cAAc,SAAS;CAC/B,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY;IACjB,OAAO,GAAG,+BAA+B,+BAA+B;KACvE,UAAU,KAAK;KACf,QAAQ,QAAQ;KAChB,iBAAiB,QAAQ;KACzB,QAAQ,CAAC;IACV,GAAG;KACF,GAAG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