@prisma/orm-family-sql 8.0.0-rc.1-dev.13 → 8.0.0-rc.1-dev.15
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-Du28qINj.d.mts → ast-Px7aAd_0.d.mts} +3 -3
- package/dist/{ast-Du28qINj.d.mts.map → ast-Px7aAd_0.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs → authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs} +2 -2
- package/dist/{authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs.map → authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/{codec-descriptor-registry-BQPj9q8O.mjs → codec-descriptor-registry-DMUcCfyb.mjs} +2 -2
- package/dist/{codec-descriptor-registry-BQPj9q8O.mjs.map → codec-descriptor-registry-DMUcCfyb.mjs.map} +1 -1
- package/dist/{config-types-THGAJYUu.mjs → config-types-D7vjxNMf.mjs} +2 -2
- package/dist/{config-types-THGAJYUu.mjs.map → config-types-D7vjxNMf.mjs.map} +1 -1
- package/dist/{config-types-JLo8FI3b.d.mts → config-types-ktywvY7L.d.mts} +4 -4
- package/dist/{config-types-JLo8FI3b.d.mts.map → config-types-ktywvY7L.d.mts.map} +1 -1
- package/dist/{contract-builder-bNftqD4M.mjs → contract-builder-BFN7WSed.mjs} +3 -3
- package/dist/{contract-builder-bNftqD4M.mjs.map → contract-builder-BFN7WSed.mjs.map} +1 -1
- package/dist/{contract-builder-94EfE12M.d.mts → contract-builder-Dqnem9IW.d.mts} +8 -8
- package/dist/{contract-builder-94EfE12M.d.mts.map → contract-builder-Dqnem9IW.d.mts.map} +1 -1
- package/dist/contract-psl.d.mts +2 -2
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-ts.d.mts +3 -3
- 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 +2 -2
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{contract-view-CX3RJUrm.d.mts → contract-view-C2LYZzWr.d.mts} +2 -2
- package/dist/{contract-view-CX3RJUrm.d.mts.map → contract-view-C2LYZzWr.d.mts.map} +1 -1
- package/dist/contract.d.mts +17 -17
- package/dist/contract.mjs +6 -6
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__factories.mjs +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__index-naming.d.mts +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__referential-action-sql.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +8 -8
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-CQGQNGSM.d.mts → control-0OFuH6HK.d.mts} +14 -14
- package/dist/{control-CQGQNGSM.d.mts.map → control-0OFuH6HK.d.mts.map} +1 -1
- package/dist/{control-jeE2ibQ5.mjs → control-DC3tc4EF.mjs} +7 -7
- package/dist/{control-jeE2ibQ5.mjs.map → control-DC3tc4EF.mjs.map} +1 -1
- package/dist/{control-adapter-C99J7aEF-DqhVuC1_.d.mts → control-adapter-C99J7aEF-B4MyB0B0.d.mts} +8 -8
- package/dist/{control-adapter-C99J7aEF-DqhVuC1_.d.mts.map → control-adapter-C99J7aEF-B4MyB0B0.d.mts.map} +1 -1
- package/dist/control-adapter-CTyZpWUT.d.mts +1 -0
- package/dist/{db-C5jmOFPM-C8E4QLgQ.d.mts → db-C5jmOFPM-BRijskUO.d.mts} +9 -9
- package/dist/{db-C5jmOFPM-C8E4QLgQ.d.mts.map → db-C5jmOFPM-BRijskUO.d.mts.map} +1 -1
- package/dist/{ddl-types-CnLSuwXa-BfAdBtW-.d.mts → ddl-types-CnLSuwXa-Dsz9N7Wm.d.mts} +4 -4
- package/dist/{ddl-types-CnLSuwXa-BfAdBtW-.d.mts.map → ddl-types-CnLSuwXa-Dsz9N7Wm.d.mts.map} +1 -1
- package/dist/{derived-checks-CmJgg-N0-Dt3bpEKZ.mjs → derived-checks-CmJgg-N0-CugkINPW.mjs} +6 -6
- package/dist/{derived-checks-CmJgg-N0-Dt3bpEKZ.mjs.map → derived-checks-CmJgg-N0-CugkINPW.mjs.map} +1 -1
- package/dist/{derived-checks-DPdD01O0-BusNrgPr.d.mts → derived-checks-DPdD01O0-CE4vJKET.d.mts} +3 -3
- package/dist/{derived-checks-DPdD01O0-BusNrgPr.d.mts.map → derived-checks-DPdD01O0-CE4vJKET.d.mts.map} +1 -1
- package/dist/{diff-lZRkiTxp.d.mts → diff-dX8KnmWc.d.mts} +8 -8
- package/dist/{diff-lZRkiTxp.d.mts.map → diff-dX8KnmWc.d.mts.map} +1 -1
- package/dist/{entity-kinds-BP9JRPX9-oeJ-t1iG.mjs → entity-kinds-CCzdAMq3-x9-uzHu1.mjs} +4 -4
- package/dist/{entity-kinds-BP9JRPX9-oeJ-t1iG.mjs.map → entity-kinds-CCzdAMq3-x9-uzHu1.mjs.map} +1 -1
- package/dist/{entity-kinds-CcRX_9l5.d.mts → entity-kinds-DZzdcuU5.d.mts} +4 -4
- package/dist/{entity-kinds-CcRX_9l5.d.mts.map → entity-kinds-DZzdcuU5.d.mts.map} +1 -1
- package/dist/{expression-X88ppPyv.d.mts → expression-E67TGFZA.d.mts} +5 -5
- package/dist/{expression-X88ppPyv.d.mts.map → expression-E67TGFZA.d.mts.map} +1 -1
- package/dist/{factories-MZugewOe.mjs → factories-BIzyHng2.mjs} +2 -2
- package/dist/{factories-MZugewOe.mjs.map → factories-BIzyHng2.mjs.map} +1 -1
- package/dist/{factories-DBqPbIcf.d.mts → factories-C8VyKQ90.d.mts} +6 -6
- package/dist/{factories-DBqPbIcf.d.mts.map → factories-C8VyKQ90.d.mts.map} +1 -1
- package/dist/family.d.mts +11 -11
- package/dist/family.mjs +3 -3
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +2 -2
- 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.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{foreign-key-BSy9u4O4-BnsOe5Nf.d.mts → foreign-key-C-iTPuRT-C9ip8zFx.d.mts} +4 -2
- package/dist/foreign-key-C-iTPuRT-C9ip8zFx.d.mts.map +1 -0
- package/dist/{foreign-key-materialization-CS5yxHpq.d.mts → foreign-key-materialization-CDDVZI8R.d.mts} +4 -4
- package/dist/{foreign-key-materialization-CS5yxHpq.d.mts.map → foreign-key-materialization-CDDVZI8R.d.mts.map} +1 -1
- package/dist/{index-CYUp-sEz.d.mts → index-BIj_Z-Yu.d.mts} +16 -16
- package/dist/{index-CYUp-sEz.d.mts.map → index-BIj_Z-Yu.d.mts.map} +1 -1
- package/dist/{index-CwtBEMZr.d.mts → index-DbDTloZS.d.mts} +3 -3
- package/dist/{index-CwtBEMZr.d.mts.map → index-DbDTloZS.d.mts.map} +1 -1
- package/dist/{index-naming-BD2dqoTC.d.mts → index-naming-BQXnMcXt.d.mts} +2 -2
- package/dist/{index-naming-BD2dqoTC.d.mts.map → index-naming-BQXnMcXt.d.mts.map} +1 -1
- package/dist/{index-type-validation-ko-AixNA.d.mts → index-type-validation-DS9n07WO.d.mts} +3 -3
- package/dist/{index-type-validation-ko-AixNA.d.mts.map → index-type-validation-DS9n07WO.d.mts.map} +1 -1
- package/dist/{interpreter-BDZ_Y5U--CWQ831IX.mjs → interpreter-BDZ_Y5U--CMEJIQ40.mjs} +2 -2
- package/dist/{interpreter-BDZ_Y5U--CWQ831IX.mjs.map → interpreter-BDZ_Y5U--CMEJIQ40.mjs.map} +1 -1
- package/dist/{ir-DS7g_cyQ.d.mts → ir-CVhRa-4t.d.mts} +3 -3
- package/dist/{ir-DS7g_cyQ.d.mts.map → ir-CVhRa-4t.d.mts.map} +1 -1
- package/dist/lane-query-builder.d.mts +4 -4
- package/dist/{middleware-Bp5oIYM0-B-m0jAm8.d.mts → middleware-Bp5oIYM0-9a28aLnt.d.mts} +2 -2
- package/dist/{middleware-Bp5oIYM0-B-m0jAm8.d.mts.map → middleware-Bp5oIYM0-9a28aLnt.d.mts.map} +1 -1
- package/dist/middleware-Pe2hkf2T.d.mts +1 -0
- package/dist/{migration-DoDR93C_.d.mts → migration-C8MAouav.d.mts} +4 -4
- package/dist/{migration-DoDR93C_.d.mts.map → migration-C8MAouav.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +11 -11
- package/dist/orm-client.mjs +1 -1
- package/dist/plan-DduVZV0X.d.mts +2 -0
- package/dist/{plan-DfLDIdep-qOGizVoO.d.mts → plan-DfLDIdep-CoshEetE.d.mts} +4 -4
- package/dist/{plan-DfLDIdep-qOGizVoO.d.mts.map → plan-DfLDIdep-CoshEetE.d.mts.map} +1 -1
- package/dist/{psl-infer-zSNyTUPT.d.mts → psl-infer-DmFgn-Ub.d.mts} +3 -3
- package/dist/{psl-infer-zSNyTUPT.d.mts.map → psl-infer-DmFgn-Ub.d.mts.map} +1 -1
- package/dist/query-lane-context-DojOMvih.d.mts +1 -0
- package/dist/{query-lane-context-DyDSQVS--UJOY8AwQ.d.mts → query-lane-context-DyDSQVS--ByM80KpV.d.mts} +5 -5
- package/dist/{query-lane-context-DyDSQVS--UJOY8AwQ.d.mts.map → query-lane-context-DyDSQVS--ByM80KpV.d.mts.map} +1 -1
- package/dist/{referential-action-sql-Csd6dA8G.d.mts → referential-action-sql-DJ9ps6-S.d.mts} +2 -2
- package/dist/referential-action-sql-DJ9ps6-S.d.mts.map +1 -0
- package/dist/relational-core.d.mts +11 -11
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__contract-free.d.mts +4 -4
- package/dist/relational-core__expression.d.mts +1 -1
- 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/{resolve-storage-table-CQsGt37y.d.mts → resolve-storage-table-DFhpOR0X.d.mts} +3 -3
- package/dist/{resolve-storage-table-CQsGt37y.d.mts.map → resolve-storage-table-DFhpOR0X.d.mts.map} +1 -1
- package/dist/{runtime-CbcODreO.d.mts → runtime-VGVRdwBD.d.mts} +3 -3
- package/dist/{runtime-CbcODreO.d.mts.map → runtime-VGVRdwBD.d.mts.map} +1 -1
- package/dist/runtime.d.mts +3 -3
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-differ-DpG_gnur-BYIE9qrd.d.mts → schema-differ-DpG_gnur-B7QINE8f.d.mts} +5 -5
- package/dist/{schema-differ-DpG_gnur-BYIE9qrd.d.mts.map → schema-differ-DpG_gnur-B7QINE8f.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-C_PEdlAr-CIgsqZ4M.mjs → schema-verify-C_PEdlAr-U3MX28Zu.mjs} +2 -2
- package/dist/{schema-verify-C_PEdlAr-CIgsqZ4M.mjs.map → schema-verify-C_PEdlAr-U3MX28Zu.mjs.map} +1 -1
- package/dist/{serialized-index-CEzaHjsj-DM-61QzZ.d.mts → serialized-index-D9YgVREe-KaLdoijn.d.mts} +4 -4
- package/dist/serialized-index-D9YgVREe-KaLdoijn.d.mts.map +1 -0
- package/dist/{serialized-index-BhiuLIBO-CRf7KRr_.mjs → serialized-index-DMOkKJdP-JPETIsd7.mjs} +3 -3
- package/dist/{serialized-index-BhiuLIBO-CRf7KRr_.mjs.map → serialized-index-DMOkKJdP-JPETIsd7.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs → sql-contract-serializer-2oBWuxTe-US2zhmuA.mjs} +4 -4
- package/dist/{sql-contract-serializer-2oBWuxTe-UyjGkOIq.mjs.map → sql-contract-serializer-2oBWuxTe-US2zhmuA.mjs.map} +1 -1
- package/dist/{sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts → sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts} +2 -2
- package/dist/{sql-execution-plan-qxvHnFcA-eC6n5Ek9.d.mts.map → sql-execution-plan-qxvHnFcA-DdIwfSmv.d.mts.map} +1 -1
- package/dist/{sql-index-DsI8HAeK-DsSFxBGF.d.mts → sql-index-ByAAE7K8-C1h4IS27.d.mts} +3 -2
- package/dist/{sql-index-DsI8HAeK-DsSFxBGF.d.mts.map → sql-index-ByAAE7K8-C1h4IS27.d.mts.map} +1 -1
- package/dist/{sql-storage-DCUlYs47-Cosit03s.d.mts → sql-storage-CySVsLrY-e9C5Gszx.d.mts} +3 -3
- package/dist/{sql-storage-DCUlYs47-Cosit03s.d.mts.map → sql-storage-CySVsLrY-e9C5Gszx.d.mts.map} +1 -1
- package/dist/{storage-table-DBbCqpt7-PAuyeZA6.d.mts → storage-table-BLcRrDzz-D4JOM8FC.d.mts} +6 -5
- package/dist/storage-table-BLcRrDzz-D4JOM8FC.d.mts.map +1 -0
- package/dist/{storage-table-BDY-lx9O-t7-IoZ2B.mjs → storage-table-D8o37IKw-bbcikEu-.mjs} +33 -15
- package/dist/storage-table-D8o37IKw-bbcikEu-.mjs.map +1 -0
- package/dist/types-C0QjlN2G.d.mts +1 -0
- package/dist/{types-CYq2Cbzw-xEntZSCk.d.mts → types-C89S13jo-CGy-V60b.d.mts} +8 -8
- package/dist/{types-CYq2Cbzw-xEntZSCk.d.mts.map → types-C89S13jo-CGy-V60b.d.mts.map} +1 -1
- package/dist/{types-CLN9Y3BH-DiekC2oe.d.mts → types-CLN9Y3BH-B9xrXW2L.d.mts} +10 -10
- package/dist/{types-CLN9Y3BH-DiekC2oe.d.mts.map → types-CLN9Y3BH-B9xrXW2L.d.mts.map} +1 -1
- package/dist/{types-Bj2O1m67-BLTU_6HK.mjs → types-CRlrNF8_-xtE1f_Ya.mjs} +14 -5
- package/dist/types-CRlrNF8_-xtE1f_Ya.mjs.map +1 -0
- package/dist/{types-DuriYH5B.d.mts → types-D6ST3Gkf.d.mts} +8 -8
- package/dist/{types-DuriYH5B.d.mts.map → types-D6ST3Gkf.d.mts.map} +1 -1
- package/dist/{types-DHzMt9jy.mjs → types-DYXr7yN6.mjs} +2 -2
- package/dist/{types-DHzMt9jy.mjs.map → types-DYXr7yN6.mjs.map} +1 -1
- package/dist/{types-DtDXwS0i-BjB1HLTY.d.mts → types-H7xjfrKl-CHqi_h5i.d.mts} +5 -2
- package/dist/types-H7xjfrKl-CHqi_h5i.d.mts.map +1 -0
- package/dist/{types-IqZMLrFC-B8FPWCcB.d.mts → types-IqZMLrFC-Sr3TZmGu.d.mts} +9 -9
- package/dist/{types-IqZMLrFC-B8FPWCcB.d.mts.map → types-IqZMLrFC-Sr3TZmGu.d.mts.map} +1 -1
- package/dist/{types-ZzeQKmYD-PJlaIsww.d.mts → types-ZzeQKmYD-D1hXGIgd.d.mts} +2 -2
- package/dist/{types-ZzeQKmYD-PJlaIsww.d.mts.map → types-ZzeQKmYD-D1hXGIgd.d.mts.map} +1 -1
- package/dist/types-yvAngq6d.d.mts +1 -0
- package/dist/{unique-constraint-jQWfH7dg-zLWtFp99.d.mts → unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts} +4 -2
- package/dist/unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts.map +1 -0
- package/dist/{validators-Bgam9aM2.mjs → validators-Bvxcp487.mjs} +0 -0
- package/dist/{validators-Bgam9aM2.mjs.map → validators-Bvxcp487.mjs.map} +1 -1
- package/dist/{validators-CMi9UZNw.d.mts → validators-DQHTuehE.d.mts} +5 -5
- package/dist/{validators-CMi9UZNw.d.mts.map → validators-DQHTuehE.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/control-adapter-DiJGgwVx.d.mts +0 -1
- package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts.map +0 -1
- package/dist/middleware-g3HMYfJq.d.mts +0 -1
- package/dist/plan-D3FQ6FXy.d.mts +0 -2
- package/dist/query-lane-context-Dc9gwgtK.d.mts +0 -1
- package/dist/referential-action-sql-Csd6dA8G.d.mts.map +0 -1
- package/dist/serialized-index-CEzaHjsj-DM-61QzZ.d.mts.map +0 -1
- package/dist/storage-table-BDY-lx9O-t7-IoZ2B.mjs.map +0 -1
- package/dist/storage-table-DBbCqpt7-PAuyeZA6.d.mts.map +0 -1
- package/dist/types-Bj2O1m67-BLTU_6HK.mjs.map +0 -1
- package/dist/types-DEBm1lFa.d.mts +0 -1
- package/dist/types-DrgaZ2lG.d.mts +0 -1
- package/dist/types-DtDXwS0i-BjB1HLTY.d.mts.map +0 -1
- package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as AnyQueryAst, p as AnyParamRef, ut as LoweredStatement } from "./types-ZzeQKmYD-
|
|
2
|
-
import "./ddl-types-CnLSuwXa-
|
|
1
|
+
import { m as AnyQueryAst, p as AnyParamRef, ut as LoweredStatement } from "./types-ZzeQKmYD-D1hXGIgd.mjs";
|
|
2
|
+
import "./ddl-types-CnLSuwXa-Dsz9N7Wm.mjs";
|
|
3
3
|
import { ContractMarkerRecord, JsonValue } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { CodecCallContext, CodecDescriptorImpl, CodecImpl, CodecInstanceContext } from "@prisma/orm-framework/components/codec";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -280,4 +280,4 @@ declare function compact<T extends Record<string, unknown>>(o: T): T;
|
|
|
280
280
|
declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<AnyParamRef>;
|
|
281
281
|
//#endregion
|
|
282
282
|
export { sqlTextDecode as $, SqlTimestampCodec as A, sqlCharEncode as B, SqlFloatDescriptor as C, SqlStatementStats as D, SqlQueryable as E, collectOrderedParamRefs as F, sqlFloatDescriptor as G, sqlFloatColumn as H, compact as I, sqlIntColumn as J, sqlFloatEncode as K, sqlCharColumn as L, SqlTransaction as M, SqlVarcharCodec as N, SqlTextCodec as O, SqlVarcharDescriptor as P, sqlTextColumn as Q, sqlCharDecode as R, SqlFloatCodec as S, SqlIntDescriptor as T, sqlFloatDecode as U, sqlCharRenderOutputType as V, sqlFloatDecodeJson as W, sqlIntDescriptor as X, sqlIntDecode as Y, sqlIntEncode as Z, SqlConnection as _, LowererContext as a, sqlTimestampDescriptor as at, SqlExecuteRequest as b, PreparedStatementHandle as c, sqlTimestampRenderOutputType as ct, SQL_INT_CODEC_ID as d, sqlVarcharDescriptor as dt, sqlTextDescriptor as et, SQL_TEXT_CODEC_ID as f, sqlVarcharEncode as ft, SqlCharDescriptor as g, SqlCharCodec as h, Lowerer as i, sqlTimestampDecodeJson as it, SqlTimestampDescriptor as j, SqlTextDescriptor as k, SQL_CHAR_CODEC_ID as l, sqlVarcharColumn as lt, SQL_VARCHAR_CODEC_ID as m, AdapterProfile as n, sqlTimestampColumn as nt, MarkerReadResult as o, sqlTimestampEncode as ot, SQL_TIMESTAMP_CODEC_ID as p, sqlVarcharRenderOutputType as pt, sqlFloatEncodeJson as q, AdapterTarget as r, sqlTimestampDecode as rt, PreparedExecuteRequest as s, sqlTimestampEncodeJson as st, Adapter as t, sqlTextEncode as tt, SQL_FLOAT_CODEC_ID as u, sqlVarcharDecode as ut, SqlDriver as v, SqlIntCodec as w, SqlExplainResult as x, SqlDriverState as y, sqlCharDescriptor as z };
|
|
283
|
-
//# sourceMappingURL=ast-
|
|
283
|
+
//# sourceMappingURL=ast-Px7aAd_0.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-
|
|
1
|
+
{"version":3,"file":"ast-Px7aAd_0.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.d.mts"],"mappings":";;;;;;;;;;;;;;;UAcU;EACR;EACA,IAAI;;UAEI;WACC;WACA;WACA,0BAA0B;;UAE3B,+BAA+B;WAC9B,yBAAyB;;UAE1B;WACC;;UAED,iBAAiB,MAAM;WACtB,MAAM,cAAc;;KAE1B;UACK,UAAU,yBAAyB;WAClC,QAAQ;EACjB,QAAQ,SAAS,WAAW;EAC5B,qBAAqB,QAAQ;EAC7B,SAAS;;UAED,sBAAsB;EAC9B,oBAAoB,QAAQ;;;;;;;EAO5B,WAAW;;;;;;;;;;;;;;;;;;;;;;;;EAwBX,QAAQ,mBAAmB;;UAEnB,uBAAuB;EAC/B,UAAU;EACV,YAAY;;UAEJ;EACR,MAAM,MAAM,yBAAyB,SAAS,oBAAoB,cAAc;EAChF,QAAQ,SAAS,oBAAoB,QAAQ;EAC7C,SAAS,SAAS,oBAAoB,QAAQ;;;;KAI3C;;;;;;;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,S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,qEAAqE,WAAW;cAChF,qBAAqB,iBAAiB;EAClD,OAAO,eAAe,MAAM,mBAAqB;EACjD,OAAO,cAAc,MAAM,mBAAqB;EAChD,WAAW,gBAAgB;EAC3B,WAAW,MAAM;;cAEL,0BAA0B,oBAAoB;WACjD;WACA;WACA;WACA,cAAc,iBAAiB;EACxC,iBAAiB,QAAQ;EACzB,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,oBAAoB;WACpD;WACA;WACA;WACA,cAAc,iBAAiB;EACxC,iBAAiB,QAAQ;EACzB,QAAQ,SAAS,gBAAgB,KAAK,yBAAyB;;cAEnD,sBAAsB;cACtB,mBAAmB,SAAS,gEAAgE,WAAW,iBAAiB;cACxH,0BAA0B,iBAAiB,wDAAwD,MAAM;EACrH,OAAO,OAAO,MAAM,MAAM,mBAAqB,QAAQ;EACvD,OAAO,MAAM,MAAM,MAAM,mBAAqB,QAAQ;EACtD,WAAW,OAAO,OAAO;EACzB,WAAW,MAAM,YAAY;;cAEjB,+BAA+B,oBAAoB;WACtD;WACA;WACA;WACA,cAAc,iBAAiB;EACxC,iBAAiB,QAAQ;EACzB,QAAQ,SAAS,mBAAmB,KAAK,yBAAyB;;cAEtD,wBAAwB;cACxB,qBAAqB,SAAS,mEAAmE,WAAW,mBAAmB;;;iBAG5H,QAAQ,UAAU,yBAAyB,GAAG,IAAI;;;;;;;;;;;iBAWlD,wBAAwB,KAAK,cAAc,cAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as enumType } from "./contract-builder-
|
|
1
|
+
import { a as enumType } from "./contract-builder-BFN7WSed.mjs";
|
|
2
2
|
import { resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
//#region ../../../2-sql/9-family/dist/authoring-type-constructors-Blqoa2Ua.mjs
|
|
@@ -313,4 +313,4 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
|
|
|
313
313
|
//#endregion
|
|
314
314
|
export { sqlFamilyPslBlockDescriptors as i, sqlFamilyAuthoringTypes as n, sqlFamilyEntityTypes as r, sqlFamilyAuthoringFieldPresets as t };
|
|
315
315
|
|
|
316
|
-
//# sourceMappingURL=authoring-type-constructors-Blqoa2Ua-
|
|
316
|
+
//# sourceMappingURL=authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-type-constructors-Blqoa2Ua-BR5-FhUN.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-Blqoa2Ua.mjs"],"sourcesContent":["import { resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { blindCast } from \"@internal/utils/casts\";\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 nativeType = ctx.codecLookup?.targetTypesFor(codecId)?.[0];\n\t\tif (nativeType === 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 codec = ctx.codecLookup?.get(codecId);\n\t\tif (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 codec \"${codecId}\" resolves in targetTypesFor but is absent from codecLookup.get`,\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 seenValues = /* @__PURE__ */ new Set();\n\t\tconst members = [];\n\t\tlet memberError = false;\n\t\tfor (const [memberName, paramValue] of Object.entries(block.parameters)) {\n\t\t\tlet value;\n\t\t\tif (paramValue.kind === \"bare\") try {\n\t\t\t\tvalue = codec.decodeJson(memberName);\n\t\t\t} catch {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC\",\n\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" has no value and codec \"${codecId}\" does not accept a bare name as input`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (paramValue.kind === \"value\") {\n\t\t\t\tlet jsonValue;\n\t\t\t\ttry {\n\t\t\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t\t\t} catch {\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" value \"${paramValue.raw}\" is not valid JSON`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tvalue = codec.decodeJson(blindCast(jsonValue));\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${reason}`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else continue;\n\t\t\tconst valueKey = String(value);\n\t\t\tif (seenValues.has(valueKey)) {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_DUPLICATE_MEMBER_VALUE\",\n\t\t\t\t\tmessage: `enum \"${block.name}\": duplicate member value \"${valueKey}\"`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenValues.add(valueKey);\n\t\t\tmembers.push({\n\t\t\t\tname: memberName,\n\t\t\t\tvalue\n\t\t\t});\n\t\t}\n\t\tif (memberError) return void 0;\n\t\tif (members.length === 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\t\tmessage: `enum \"${block.name}\" must have at least one member`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn enumType(block.name, {\n\t\t\tcodecId,\n\t\t\tnativeType\n\t\t}, ...members.map((m) => ({\n\t\t\tname: m.name,\n\t\t\tvalue: m.value\n\t\t})));\n\t} }\n} };\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tparameters: {},\n\tvariadicParameters: true\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 CHARACTER_NATIVE_TYPE = \"character\";\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true,\n\t\tminimum: 1,\n\t\tmaximum: 10485760\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\tnativeType: \"character varying\",\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-Blqoa2Ua.mjs.map"],"mappings":";;;;AAGA,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,aAAa,eAAe,OAAO,CAAC,GAAG;EAC9D,IAAI,eAAe,KAAK,GAAG;GAC1B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,QAAQ,IAAI,aAAa,IAAI,OAAO;EAC1C,IAAI,UAAU,KAAK,GAAG;GACrB,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,kBAAkB,QAAQ;IACvD;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,6BAA6B,IAAI,IAAI;EAC3C,MAAM,UAAU,CAAC;EACjB,IAAI,cAAc;EAClB,KAAK,MAAM,CAAC,YAAY,eAAe,OAAO,QAAQ,MAAM,UAAU,GAAG;GACxE,IAAI;GACJ,IAAI,WAAW,SAAS,QAAQ,IAAI;IACnC,QAAQ,MA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|
|
1
|
+
{"version":3,"file":"authoring-type-constructors-Blqoa2Ua-OP7GsSm3.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/authoring-type-constructors-Blqoa2Ua.mjs"],"sourcesContent":["import { resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { blindCast } from \"@internal/utils/casts\";\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 nativeType = ctx.codecLookup?.targetTypesFor(codecId)?.[0];\n\t\tif (nativeType === 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 codec = ctx.codecLookup?.get(codecId);\n\t\tif (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 codec \"${codecId}\" resolves in targetTypesFor but is absent from codecLookup.get`,\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 seenValues = /* @__PURE__ */ new Set();\n\t\tconst members = [];\n\t\tlet memberError = false;\n\t\tfor (const [memberName, paramValue] of Object.entries(block.parameters)) {\n\t\t\tlet value;\n\t\t\tif (paramValue.kind === \"bare\") try {\n\t\t\t\tvalue = codec.decodeJson(memberName);\n\t\t\t} catch {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_BARE_MEMBER_NON_STRING_CODEC\",\n\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" has no value and codec \"${codecId}\" does not accept a bare name as input`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (paramValue.kind === \"value\") {\n\t\t\t\tlet jsonValue;\n\t\t\t\ttry {\n\t\t\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t\t\t} catch {\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" value \"${paramValue.raw}\" is not valid JSON`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tvalue = codec.decodeJson(blindCast(jsonValue));\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\t\t\tdiagnostics?.push({\n\t\t\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\t\t\tmessage: `enum \"${block.name}\" member \"${memberName}\" was rejected by codec \"${codecId}\": ${reason}`,\n\t\t\t\t\t\tsourceId,\n\t\t\t\t\t\tspan: paramValue.span\n\t\t\t\t\t});\n\t\t\t\t\tmemberError = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else continue;\n\t\t\tconst valueKey = String(value);\n\t\t\tif (seenValues.has(valueKey)) {\n\t\t\t\tdiagnostics?.push({\n\t\t\t\t\tcode: \"PSL_ENUM_DUPLICATE_MEMBER_VALUE\",\n\t\t\t\t\tmessage: `enum \"${block.name}\": duplicate member value \"${valueKey}\"`,\n\t\t\t\t\tsourceId,\n\t\t\t\t\tspan: paramValue.span\n\t\t\t\t});\n\t\t\t\tmemberError = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tseenValues.add(valueKey);\n\t\t\tmembers.push({\n\t\t\t\tname: memberName,\n\t\t\t\tvalue\n\t\t\t});\n\t\t}\n\t\tif (memberError) return void 0;\n\t\tif (members.length === 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\t\tmessage: `enum \"${block.name}\" must have at least one member`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn enumType(block.name, {\n\t\t\tcodecId,\n\t\t\tnativeType\n\t\t}, ...members.map((m) => ({\n\t\t\tname: m.name,\n\t\t\tvalue: m.value\n\t\t})));\n\t} }\n} };\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tparameters: {},\n\tvariadicParameters: true\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 CHARACTER_NATIVE_TYPE = \"character\";\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\tnativeType: CHARACTER_NATIVE_TYPE,\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\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true,\n\t\tminimum: 1,\n\t\tmaximum: 10485760\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\tnativeType: \"character varying\",\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-Blqoa2Ua.mjs.map"],"mappings":";;;;AAGA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,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V,EAAE;IACF,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;KACJ,QAAQ,EAAE,MAAM;MACf,MAAM;MACN,OAAO;MACP,MAAM,CAAC,MAAM;KACd,EAAE;IACH,EAAE;IACF,IAAI;GACL;EACD;EACA,OAAO;GACN,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY;IACZ,YAAY,EAAE,QAAQ,GAAG;IACzB,mBAAmB,EAAE,UAAU;KAC9B,MAAM;KACN,IAAI;IACL,EAAE;IACF,IAAI;GACL;EACD;EACA,OAAO;GACN,MAAM;GACN,QAAQ;IACP,SAAS;IACT,YAAY;IACZ,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,MAAM,CAAC;EACN,MAAM;EACN,MAAM;EACN,SAAS;EACT,SAAS;EACT,SAAS;CACV,CAAC;CACD,QAAQ;EACP,SAAS;EACT,YAAY;EACZ,YAAY,EAAE,QAAQ;GACrB,MAAM;GACN,OAAO;EACR,EAAE;CACH;AACD,EAAE,EAAE"}
|
package/dist/builder.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as Expression, u as ScopeField } from "./expression-
|
|
2
|
-
import { c as GroupedQuery, d as QueryContext, f as ResolveRow, h as Subquery, i as DeleteQuery, l as InsertQuery, m as SelectQuery, o as Functions, p as Scope, r as Db, s as GatedMethod, t as AggregateFunctions, v as TableProxy, x as UpdateQuery } from "./db-C5jmOFPM-
|
|
1
|
+
import { a as Expression, u as ScopeField } from "./expression-E67TGFZA.mjs";
|
|
2
|
+
import { c as GroupedQuery, d as QueryContext, f as ResolveRow, h as Subquery, i as DeleteQuery, l as InsertQuery, m as SelectQuery, o as Functions, p as Scope, r as Db, s as GatedMethod, t as AggregateFunctions, v as TableProxy, x as UpdateQuery } from "./db-C5jmOFPM-BRijskUO.mjs";
|
|
3
3
|
export type { AggregateFunctions, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, InsertQuery, QueryContext, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableProxy, UpdateQuery };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as SqlStorage } from "./sql-storage-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { i as SqlOperationEntry } from "./index-
|
|
4
|
-
import { s as AnyExpression } from "./types-ZzeQKmYD-
|
|
5
|
-
import "./ast-
|
|
6
|
-
import { a as Expression, o as RawCodecInferer, u as ScopeField } from "./expression-
|
|
7
|
-
import { a as FieldProxy, d as QueryContext, o as Functions, p as Scope, r as Db, t as AggregateFunctions, y as TableProxyContract } from "./db-C5jmOFPM-
|
|
8
|
-
import { c as SqlAggregateDescriptorRegistry, r as ExecutionContext } from "./query-lane-context-DyDSQVS--
|
|
9
|
-
import "./query-lane-context-
|
|
1
|
+
import { c as SqlStorage } from "./sql-storage-CySVsLrY-e9C5Gszx.mjs";
|
|
2
|
+
import "./types-D6ST3Gkf.mjs";
|
|
3
|
+
import { i as SqlOperationEntry } from "./index-DbDTloZS.mjs";
|
|
4
|
+
import { s as AnyExpression } from "./types-ZzeQKmYD-D1hXGIgd.mjs";
|
|
5
|
+
import "./ast-Px7aAd_0.mjs";
|
|
6
|
+
import { a as Expression, o as RawCodecInferer, u as ScopeField } from "./expression-E67TGFZA.mjs";
|
|
7
|
+
import { a as FieldProxy, d as QueryContext, o as Functions, p as Scope, r as Db, t as AggregateFunctions, y as TableProxyContract } from "./db-C5jmOFPM-BRijskUO.mjs";
|
|
8
|
+
import { c as SqlAggregateDescriptorRegistry, r as ExecutionContext } from "./query-lane-context-DyDSQVS--ByM80KpV.mjs";
|
|
9
|
+
import "./query-lane-context-DojOMvih.mjs";
|
|
10
10
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
11
11
|
import { CodecRef } from "@prisma/orm-framework/components/codec";
|
|
12
12
|
//#region ../../../2-sql/4-lanes/sql-builder/dist/runtime/index.d.mts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as LiteralExpr, D as OrExpr, F as SubqueryExpr, I as TableSource, L as UpdateAst, O as OrderByItem, P as SelectAst, S as ListExpression, T as NullCheckExpr, V as isAggregateFn, _ as InsertAst, c as DeleteAst, g as IdentifierRef, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, t as AggregateExpr, y as JoinAst } from "./types-CSP6WmWn-DVuxsZJW.mjs";
|
|
2
2
|
import { t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
|
|
3
3
|
import { a as toExpr, n as codecOf, r as createRawSql } from "./expression-CYVKobXp.mjs";
|
|
4
|
-
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-
|
|
4
|
+
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-DMUcCfyb.mjs";
|
|
5
5
|
import { assertAnnotationsApplicable } from "@prisma/orm-framework/components/runtime";
|
|
6
6
|
//#region ../../../2-sql/4-lanes/sql-builder/dist/runtime/index.mjs
|
|
7
7
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as Expression, u as ScopeField } from "./expression-
|
|
2
|
-
import { _ as TableNamesAcrossNamespaces, b as UnboundTables, c as GroupedQuery, d as QueryContext, f as ResolveRow, g as TableInAnyNamespace, h as Subquery, i as DeleteQuery, l as InsertQuery, m as SelectQuery, n as BooleanCodecType, o as Functions, p as Scope, r as Db, s as GatedMethod, t as AggregateFunctions, u as Namespace, v as TableProxy, x as UpdateQuery, y as TableProxyContract } from "./db-C5jmOFPM-
|
|
1
|
+
import { a as Expression, u as ScopeField } from "./expression-E67TGFZA.mjs";
|
|
2
|
+
import { _ as TableNamesAcrossNamespaces, b as UnboundTables, c as GroupedQuery, d as QueryContext, f as ResolveRow, g as TableInAnyNamespace, h as Subquery, i as DeleteQuery, l as InsertQuery, m as SelectQuery, n as BooleanCodecType, o as Functions, p as Scope, r as Db, s as GatedMethod, t as AggregateFunctions, u as Namespace, v as TableProxy, x as UpdateQuery, y as TableProxyContract } from "./db-C5jmOFPM-BRijskUO.mjs";
|
|
3
3
|
export type { AggregateFunctions, BooleanCodecType, Db, DeleteQuery, Expression, Functions, GatedMethod, GroupedQuery, InsertQuery, Namespace, QueryContext, ResolveRow, Scope, ScopeField, SelectQuery, Subquery, TableInAnyNamespace, TableNamesAcrossNamespaces, TableProxy, TableProxyContract, UnboundTables, UpdateQuery };
|
package/dist/{codec-descriptor-registry-BQPj9q8O.mjs → codec-descriptor-registry-DMUcCfyb.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
|
-
import { l as isStorageTypeInstance } from "./types-
|
|
2
|
+
import { l as isStorageTypeInstance } from "./types-DYXr7yN6.mjs";
|
|
3
3
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
4
4
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
5
5
|
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.mjs
|
|
@@ -93,4 +93,4 @@ function buildCodecDescriptorRegistry(allDescriptors, storage) {
|
|
|
93
93
|
//#endregion
|
|
94
94
|
export { codecRefForStorageColumn as n, buildCodecDescriptorRegistry as t };
|
|
95
95
|
|
|
96
|
-
//# sourceMappingURL=codec-descriptor-registry-
|
|
96
|
+
//# sourceMappingURL=codec-descriptor-registry-DMUcCfyb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-descriptor-registry-
|
|
1
|
+
{"version":3,"file":"codec-descriptor-registry-DMUcCfyb.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/codec-descriptor-registry.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\nimport { resolveStorageTable } from \"@internal/sql-contract/resolve-storage-table\";\nimport { isStorageTypeInstance } from \"@internal/sql-contract/types\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/codec-ref-for-column.ts\n/**\n* Derive the canonical {@link CodecRef} for a `(table, column)` pair against a {@link SqlStorage}. This is the build-time path every column-bound `ParamRef` / `ProjectionItem` uses to stamp its `codec` slot before the AST is handed to the runtime — the runtime resolver then materialises a memoised {@link import('@internal/sql-relational-core/ast').Codec} for the same `CodecRef` via `forCodecRef`.\n*\n* Resolution rules over namespace `entries.table[table].columns[column]`:\n*\n* - `typeRef` column → `{codecId, typeParams}` from `storage.types[typeRef]` (multiple columns sharing the typeRef share one ref → one memoised codec).\n* - inline `typeParams` column → `{codecId, typeParams}` from the column itself.\n* - non-parameterized column → `{codecId}` with `typeParams` undefined.\n*\n* Returns `undefined` when the table or column is unknown, or when a `typeRef` column references a `storage.types` entry that does not exist.\n*\n* `namespaceId` leads the coordinate args and is always supplied: every\n* model/table sits in an explicit namespace, so the table is resolved strictly\n* within that namespace (see {@link resolveStorageTable}).\n*/\nfunction codecRefForStorageColumn(storage, namespaceId, tableName, columnName) {\n\tconst resolved = resolveStorageTable(storage, tableName, namespaceId);\n\tif (resolved === void 0) return void 0;\n\tconst columnDef = resolved.table.columns[columnName];\n\tif (!columnDef) return void 0;\n\tif (columnDef.typeRef !== void 0) {\n\t\tconst instance = storage.types?.[columnDef.typeRef];\n\t\tif (!instance) return void 0;\n\t\tif (isStorageTypeInstance(instance)) {\n\t\t\tconst instanceParams = instance.typeParams;\n\t\t\treturn instanceParams !== void 0 && Object.keys(instanceParams).length > 0 ? {\n\t\t\t\tcodecId: instance.codecId,\n\t\t\t\ttypeParams: instanceParams\n\t\t\t} : { codecId: instance.codecId };\n\t\t}\n\t\treturn;\n\t}\n\tif (columnDef.typeParams !== void 0 && Object.keys(columnDef.typeParams).length > 0) {\n\t\tconst typeParams = blindCast(columnDef.typeParams);\n\t\treturn columnDef.many ? {\n\t\t\tcodecId: columnDef.codecId,\n\t\t\ttypeParams,\n\t\t\tmany: true\n\t\t} : {\n\t\t\tcodecId: columnDef.codecId,\n\t\t\ttypeParams\n\t\t};\n\t}\n\treturn columnDef.many ? {\n\t\tcodecId: columnDef.codecId,\n\t\tmany: true\n\t} : { codecId: columnDef.codecId };\n}\n//#endregion\n//#region src/codec-descriptor-registry.ts\n/**\n* Build a {@link CodecDescriptorRegistry} from a flat descriptor list.\n*\n* Used by:\n* - Each codec-shipping package's `core/registry.ts` to expose a package-scoped registry as the public consumer surface (replacing raw descriptor-array exports). See ADR 208.\n* - The runtime's `buildExecutionContext` to construct the contract-bound combined registry from every contributor's `codecs:` slot.\n*\n* The descriptor map is heterogeneous in `P` — each codec id has its own params shape. The public {@link CodecDescriptorRegistry} interface widens to `CodecDescriptor<unknown>` and consumers narrow per codec id at the call site (the descriptor's `paramsSchema` validates JSON-sourced params before the factory ever sees them, so the runtime narrow is safe). The cast at registration goes through `unknown` because\n* `CodecDescriptor<P>` is invariant in `P` (the `factory` and `renderOutputType` slots use `P` contravariantly).\n*/\nfunction buildCodecDescriptorRegistry(allDescriptors, storage) {\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst byTargetType = /* @__PURE__ */ new Map();\n\tfor (const descriptor of allDescriptors) {\n\t\tif (byId.has(descriptor.codecId)) throw structuredError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate codec descriptor id: '${descriptor.codecId}' — registered twice during registry construction. Each codecId must be contributed by exactly one component (target / adapter / extension pack).`, { meta: { codecId: descriptor.codecId } });\n\t\tconst widened = descriptor;\n\t\tbyId.set(descriptor.codecId, widened);\n\t\tfor (const targetType of descriptor.targetTypes) {\n\t\t\tconst list = byTargetType.get(targetType);\n\t\t\tif (list) list.push(widened);\n\t\t\telse byTargetType.set(targetType, [widened]);\n\t\t}\n\t}\n\treturn {\n\t\tdescriptorFor(codecId) {\n\t\t\treturn byId.get(codecId);\n\t\t},\n\t\tcodecRefForColumn(namespaceId, table, column) {\n\t\t\tif (!storage) return void 0;\n\t\t\treturn codecRefForStorageColumn(storage, namespaceId, table, column);\n\t\t},\n\t\t*values() {\n\t\t\tyield* byId.values();\n\t\t},\n\t\tbyTargetType(targetType) {\n\t\t\treturn byTargetType.get(targetType) ?? Object.freeze([]);\n\t\t}\n\t};\n}\n//#endregion\nexport { buildCodecDescriptorRegistry, codecRefForStorageColumn };\n\n//# sourceMappingURL=codec-descriptor-registry.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,yBAAyB,SAAS,aAAa,WAAW,YAAY;CAC9E,MAAM,WAAW,oBAAoB,SAAS,WAAW,WAAW;CACpE,IAAI,aAAa,KAAK,GAAG,OAAO,KAAK;CACrC,MAAM,YAAY,SAAS,MAAM,QAAQ;CACzC,IAAI,CAAC,WAAW,OAAO,KAAK;CAC5B,IAAI,UAAU,YAAY,KAAK,GAAG;EACjC,MAAM,WAAW,QAAQ,QAAQ,UAAU;EAC3C,IAAI,CAAC,UAAU,OAAO,KAAK;EAC3B,IAAI,sBAAsB,QAAQ,GAAG;GACpC,MAAM,iBAAiB,SAAS;GAChC,OAAO,mBAAmB,KAAK,KAAK,OAAO,KAAK,cAAc,CAAC,CAAC,SAAS,IAAI;IAC5E,SAAS,SAAS;IAClB,YAAY;GACb,IAAI,EAAE,SAAS,SAAS,QAAQ;EACjC;EACA;CACD;CACA,IAAI,UAAU,eAAe,KAAK,KAAK,OAAO,KAAK,UAAU,UAAU,CAAC,CAAC,SAAS,GAAG;EACpF,MAAM,aAAa,UAAU,UAAU,UAAU;EACjD,OAAO,UAAU,OAAO;GACvB,SAAS,UAAU;GACnB;GACA,MAAM;EACP,IAAI;GACH,SAAS,UAAU;GACnB;EACD;CACD;CACA,OAAO,UAAU,OAAO;EACvB,SAAS,UAAU;EACnB,MAAM;CACP,IAAI,EAAE,SAAS,UAAU,QAAQ;AAClC;;;;;;;;;;;AAaA,SAAS,6BAA6B,gBAAgB,SAAS;CAC9D,MAAM,uBAAuB,IAAI,IAAI;CACrC,MAAM,+BAA+B,IAAI,IAAI;CAC7C,KAAK,MAAM,cAAc,gBAAgB;EACxC,IAAI,KAAK,IAAI,WAAW,OAAO,GAAG,MAAM,gBAAgB,2BAA2B,mCAAmC,WAAW,QAAQ,oJAAoJ,EAAE,MAAM,EAAE,SAAS,WAAW,QAAQ,EAAE,CAAC;EACtU,MAAM,UAAU;EAChB,KAAK,IAAI,WAAW,SAAS,OAAO;EACpC,KAAK,MAAM,cAAc,WAAW,aAAa;GAChD,MAAM,OAAO,aAAa,IAAI,UAAU;GACxC,IAAI,MAAM,KAAK,KAAK,OAAO;QACtB,aAAa,IAAI,YAAY,CAAC,OAAO,CAAC;EAC5C;CACD;CACA,OAAO;EACN,cAAc,SAAS;GACtB,OAAO,KAAK,IAAI,OAAO;EACxB;EACA,kBAAkB,aAAa,OAAO,QAAQ;GAC7C,IAAI,CAAC,SAAS,OAAO,KAAK;GAC1B,OAAO,yBAAyB,SAAS,aAAa,OAAO,MAAM;EACpE;EACA,CAAC,SAAS;GACT,OAAO,KAAK,OAAO;EACpB;EACA,aAAa,YAAY;GACxB,OAAO,aAAa,IAAI,UAAU,KAAK,OAAO,OAAO,CAAC,CAAC;EACxD;CACD;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-CmJgg-N0-
|
|
1
|
+
import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from "./derived-checks-CmJgg-N0-CugkINPW.mjs";
|
|
2
2
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { ok } from "@prisma/orm-framework/utils/result";
|
|
@@ -61,4 +61,4 @@ function typescriptContractFromPath(contractPath, output, options) {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { typescriptContract as n, typescriptContractFromPath as r, emptyContract as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=config-types-
|
|
64
|
+
//# sourceMappingURL=config-types-D7vjxNMf.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-D7vjxNMf.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-ts/dist/config-types.mjs"],"sourcesContent":["import { n as buildSqlContractFromDefinition, r as contractError, t as applySqlSpecifierControlPolicy } from \"./derived-checks-CmJgg-N0.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\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}), 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 positional-matched with 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":";;;;;;;;;;;;;AAaA,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,CAAC,GAAG,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC3D;EACD;EACA,GAAG,UAAU,UAAU,QAAQ,MAAM;CACtC;AACD;AACA,SAAS,mBAAmB,UAAU,QAAQ,SAAS;CACtD,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,MAAM,YAAY,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;EACrJ;EACA,GAAG,UAAU,UAAU,MAAM;CAC9B;AACD;AACA,SAAS,2BAA2B,cAAc,QAAQ,SAAS;CAClE,OAAO;EACN,QAAQ;GACP,QAAQ;GACR,QAAQ,CAAC,YAAY;GACrB,MAAM,OAAO,YAAY;IACxB,MAAM,CAAC,gBAAgB,QAAQ;IAC/B,IAAI,iBAAiB,KAAK,GAAG,MAAM,IAAI,cAAc,8IAA8I;IACnM,MAAM,MAAM,MAAM,OAAO,cAAc,YAAY,CAAC,CAAC;IACrD,MAAM,WAAW,IAAI,WAAW,IAAI;IACpC,IAAI,aAAa,KAAK,GAAG,MAAM,cAAc,kCAAkC,0CAA0C,aAAa,2CAA2C,EAAE,MAAM,EAAE,MAAM,aAAa,EAAE,CAAC;IACjN,OAAO,GAAG,YAAY,KAAK,IAAI,WAAW,+BAA+B,UAAU,QAAQ,sBAAsB,QAAQ,eAAe,CAAC;GAC1I;EACD;EACA,QAAQ,UAAU,8BAA8B,YAAY;CAC7D;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-
|
|
1
|
+
import { i as SqlNamespaceBase, s as SqlNamespaceInput } from "./sql-storage-CySVsLrY-e9C5Gszx.mjs";
|
|
2
|
+
import "./types-D6ST3Gkf.mjs";
|
|
3
|
+
import { t as SqlNamespaceFactory } from "./derived-checks-DPdD01O0-CE4vJKET.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-ktywvY7L.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-
|
|
1
|
+
{"version":3,"file":"config-types-ktywvY7L.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,6 +1,6 @@
|
|
|
1
1
|
import { t as providesEntityHandleLowering } from "./entity-handle-lowering-hook-DwLIKNiS.mjs";
|
|
2
|
-
import { u as toStorageTypeInstance } from "./types-
|
|
3
|
-
import { n as buildSqlContractFromDefinition, r as contractError } from "./derived-checks-CmJgg-N0-
|
|
2
|
+
import { u as toStorageTypeInstance } from "./types-DYXr7yN6.mjs";
|
|
3
|
+
import { n as buildSqlContractFromDefinition, r as contractError } from "./derived-checks-CmJgg-N0-CugkINPW.mjs";
|
|
4
4
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
5
5
|
import { isColumnDefault } from "@prisma/orm-framework/contract/types";
|
|
6
6
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -1627,4 +1627,4 @@ function defineContract(definition, factory) {
|
|
|
1627
1627
|
//#endregion
|
|
1628
1628
|
export { enumType as a, member as c, defineContract as i, model as l, buildBoundContract as n, extensionModel as o, buildContractDefinition as r, field as s, bindEnumType as t, rel as u };
|
|
1629
1629
|
|
|
1630
|
-
//# sourceMappingURL=contract-builder-
|
|
1630
|
+
//# sourceMappingURL=contract-builder-BFN7WSed.mjs.map
|