@prisma/orm-family-sql 8.0.0-rc.21-dev.5 → 8.0.0-rc.21-dev.6
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-DcphKbq9.d.mts → ast-1JRQY-dP.d.mts} +10 -4
- package/dist/ast-1JRQY-dP.d.mts.map +1 -0
- package/dist/{ast-e_02t9Nt.mjs → ast-C3itulLi.mjs} +7 -1
- package/dist/ast-C3itulLi.mjs.map +1 -0
- package/dist/{attribute-specs-Dcd2ZUrY.d.mts → attribute-specs-CM_fC-TC.d.mts} +3 -3
- package/dist/{attribute-specs-Dcd2ZUrY.d.mts.map → attribute-specs-CM_fC-TC.d.mts.map} +1 -1
- package/dist/{authored-check-naming-D-o196ry.d.mts → authored-check-naming-BiSwtSFu.d.mts} +2 -2
- package/dist/{authored-check-naming-D-o196ry.d.mts.map → authored-check-naming-BiSwtSFu.d.mts.map} +1 -1
- package/dist/{authored-check-naming-BHGJhjqn.mjs → authored-check-naming-DTKcH2_d.mjs} +3 -3
- package/dist/{authored-check-naming-BHGJhjqn.mjs.map → authored-check-naming-DTKcH2_d.mjs.map} +1 -1
- package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts → authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts} +2 -2
- package/dist/{authoring-entity-types-CgKIgWq5-CZK1F9a_.d.mts.map → authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +10 -10
- package/dist/builder__runtime.mjs +4 -4
- package/dist/builder__types.d.mts +5 -5
- package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts → check-constraint-B7qGu6rc-D5kVe9je.d.mts} +2 -2
- package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts.map → check-constraint-B7qGu6rc-D5kVe9je.d.mts.map} +1 -1
- package/dist/check-expressions-BDsLvzqN.mjs +108 -0
- package/dist/check-expressions-BDsLvzqN.mjs.map +1 -0
- package/dist/check-expressions-DuWjvG4h.d.mts +82 -0
- package/dist/check-expressions-DuWjvG4h.d.mts.map +1 -0
- package/dist/{codec-descriptor-registry-CiiFzMtb.mjs → codec-descriptor-registry-UiFDvDj4.mjs} +2 -2
- package/dist/{codec-descriptor-registry-CiiFzMtb.mjs.map → codec-descriptor-registry-UiFDvDj4.mjs.map} +1 -1
- package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts +13 -0
- package/dist/codec-json-type-BdWPJ6T5-BhmIyNyb.d.mts.map +1 -0
- package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs +21 -0
- package/dist/codec-json-type-DUWyBtJk-BVTavkH0.mjs.map +1 -0
- package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts → collection-methods-D9CYfePl-BGvD1h9Z.d.mts} +4 -4
- package/dist/{collection-methods-D9CYfePl-DsDjYS6t.d.mts.map → collection-methods-D9CYfePl-BGvD1h9Z.d.mts.map} +1 -1
- package/dist/collection-methods-mo-2RjdX.d.mts +1 -0
- package/dist/{config-types-DkEeq_qq.mjs → config-types-BvmmK8D-.mjs} +2 -2
- package/dist/{config-types-DkEeq_qq.mjs.map → config-types-BvmmK8D-.mjs.map} +1 -1
- package/dist/{config-types-C-1mIiJO.d.mts → config-types-Ce1tAJ0B.d.mts} +4 -4
- package/dist/{config-types-C-1mIiJO.d.mts.map → config-types-Ce1tAJ0B.d.mts.map} +1 -1
- package/dist/{contract-builder-B-Q9T1CO.d.mts → contract-builder-B8oDZ4aU.d.mts} +16 -10
- package/dist/contract-builder-B8oDZ4aU.d.mts.map +1 -0
- package/dist/{contract-builder-DMNe_jX9.mjs → contract-builder-Bk-Co792.mjs} +5 -5
- package/dist/{contract-builder-DMNe_jX9.mjs.map → contract-builder-Bk-Co792.mjs.map} +1 -1
- package/dist/contract-emitter.d.mts +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +6 -6
- package/dist/contract-psl.d.mts +4 -4
- 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__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +3 -3
- 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-view-DqpzeYeE.mjs → contract-view-CcD3axo0.mjs} +6 -2
- package/dist/contract-view-CcD3axo0.mjs.map +1 -0
- package/dist/{contract-view-DuB35or0.d.mts → contract-view-DkIZrHyj.d.mts} +3 -3
- package/dist/{contract-view-DuB35or0.d.mts.map → contract-view-DkIZrHyj.d.mts.map} +1 -1
- package/dist/contract.d.mts +21 -19
- package/dist/contract.mjs +16 -12
- package/dist/contract__authored-check-naming.d.mts +1 -1
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__check-expressions.d.mts +2 -0
- package/dist/contract__check-expressions.mjs +2 -0
- package/dist/contract__codec-json-type.d.mts +2 -0
- package/dist/contract__codec-json-type.mjs +2 -0
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__contract-view.mjs +1 -1
- package/dist/contract__data-type.d.mts +1 -1
- package/dist/contract__entity-kinds.d.mts +2 -2
- package/dist/contract__entity-kinds.mjs +2 -2
- 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__foreign-key-materialization.mjs +2 -2
- package/dist/contract__index-naming.d.mts +1 -1
- package/dist/contract__index-naming.mjs +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__sql-expression.d.mts +1 -1
- package/dist/contract__types.d.mts +8 -8
- package/dist/contract__types.mjs +6 -4
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-B6W_VEZ9.d.mts → control-B2CeDfVO.d.mts} +18 -18
- package/dist/{control-B6W_VEZ9.d.mts.map → control-B2CeDfVO.d.mts.map} +1 -1
- package/dist/{control-D6wIw5Fi.mjs → control-C1EjGUVq.mjs} +12 -12
- package/dist/{control-D6wIw5Fi.mjs.map → control-C1EjGUVq.mjs.map} +1 -1
- package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts → control-adapter-BfyLe7rh-CiGzw3dq.d.mts} +8 -8
- package/dist/{control-adapter-BfyLe7rh-C_rrUuhb.d.mts.map → control-adapter-BfyLe7rh-CiGzw3dq.d.mts.map} +1 -1
- package/dist/{control-adapter-CZ84jQ_z.d.mts → control-adapter-BlBhW0pc.d.mts} +4 -4
- package/dist/{control-adapter-CZ84jQ_z.d.mts.map → control-adapter-BlBhW0pc.d.mts.map} +1 -1
- package/dist/{data-type-DJIvKQHf.d.mts → data-type-CR0gi2GQ.d.mts} +3 -3
- package/dist/{data-type-DJIvKQHf.d.mts.map → data-type-CR0gi2GQ.d.mts.map} +1 -1
- package/dist/{db-D1d75IvM-D5CqruQz.d.mts → db-D1d75IvM-C1lqD6a2.d.mts} +13 -13
- package/dist/{db-D1d75IvM-D5CqruQz.d.mts.map → db-D1d75IvM-C1lqD6a2.d.mts.map} +1 -1
- package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts → ddl-types-BeA1kjV1-BUcW52Dx.d.mts} +3 -3
- package/dist/{ddl-types-BeA1kjV1-C4d5owxE.d.mts.map → ddl-types-BeA1kjV1-BUcW52Dx.d.mts.map} +1 -1
- package/dist/{default-mapping-CAOONlKQ-4m07nb-O.d.mts → default-mapping-CAOONlKQ-CIg7JCfF.d.mts} +2 -2
- package/dist/{default-mapping-CAOONlKQ-4m07nb-O.d.mts.map → default-mapping-CAOONlKQ-CIg7JCfF.d.mts.map} +1 -1
- package/dist/{derived-checks-D5HVRvqN-BJx1gwPA.mjs → derived-checks-BuTkSE9l-gyx0d0dX.mjs} +155 -39
- package/dist/derived-checks-BuTkSE9l-gyx0d0dX.mjs.map +1 -0
- package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts → derived-checks-DpPkO6Dt-CQIM17j5.d.mts} +3 -3
- package/dist/{derived-checks-DpPkO6Dt-9U9UJZOo.d.mts.map → derived-checks-DpPkO6Dt-CQIM17j5.d.mts.map} +1 -1
- package/dist/{diff-FNTO8gbI.d.mts → diff-BlX_rfVG.d.mts} +7 -7
- package/dist/{diff-FNTO8gbI.d.mts.map → diff-BlX_rfVG.d.mts.map} +1 -1
- package/dist/{dist-C8Y-PPuE.mjs → dist-BJjqJT_M.mjs} +5 -3
- package/dist/dist-BJjqJT_M.mjs.map +1 -0
- package/dist/{entity-kinds-JR5SAm5h-DOH6VUtL.mjs → entity-kinds-CgEwK0hH-D1NKoKE5.mjs} +25 -7
- package/dist/entity-kinds-CgEwK0hH-D1NKoKE5.mjs.map +1 -0
- package/dist/{entity-kinds-BPG2xCZV.d.mts → entity-kinds-oN1yn4vw.d.mts} +8 -7
- package/dist/{entity-kinds-BPG2xCZV.d.mts.map → entity-kinds-oN1yn4vw.d.mts.map} +1 -1
- package/dist/{exports-CGzFaakG-Dddm8emA.mjs → exports-CGzFaakG-4Aw50nT1.mjs} +3 -3
- package/dist/{exports-CGzFaakG-Dddm8emA.mjs.map → exports-CGzFaakG-4Aw50nT1.mjs.map} +1 -1
- package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts → expression-BWRsWR6O-HbWL9x9D.d.mts} +3 -3
- package/dist/{expression-BWRsWR6O-BrUVz0V2.d.mts.map → expression-BWRsWR6O-HbWL9x9D.d.mts.map} +1 -1
- package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts → expression-C3F6gxZH-EOb5cRCY.d.mts} +7 -7
- package/dist/{expression-C3F6gxZH-DrYNeDbh.d.mts.map → expression-C3F6gxZH-EOb5cRCY.d.mts.map} +1 -1
- package/dist/expression-OVCWlXHm.d.mts +2 -0
- package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs → expression-impl-DtbmFnnz-Dal0IYDE.mjs} +2 -2
- package/dist/{expression-impl-DtbmFnnz-CUKzBisY.mjs.map → expression-impl-DtbmFnnz-Dal0IYDE.mjs.map} +1 -1
- package/dist/{factories-Crobuxwn.mjs → factories-B2hKDIzy.mjs} +3 -3
- package/dist/{factories-Crobuxwn.mjs.map → factories-B2hKDIzy.mjs.map} +1 -1
- package/dist/{factories-DbNP9qfs.d.mts → factories-DVgCG7DR.d.mts} +4 -4
- package/dist/{factories-DbNP9qfs.d.mts.map → factories-DVgCG7DR.d.mts.map} +1 -1
- package/dist/family.d.mts +15 -15
- package/dist/family.mjs +6 -6
- 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 +1 -1
- 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 +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{foreign-key-materialization-48P2V8on.d.mts → foreign-key-materialization-C53nVQuD.d.mts} +4 -4
- package/dist/{foreign-key-materialization-48P2V8on.d.mts.map → foreign-key-materialization-C53nVQuD.d.mts.map} +1 -1
- package/dist/{foreign-key-materialization-BM59w_Xg.mjs → foreign-key-materialization-CCHAR789.mjs} +5 -5
- package/dist/{foreign-key-materialization-BM59w_Xg.mjs.map → foreign-key-materialization-CCHAR789.mjs.map} +1 -1
- package/dist/{functions-D7lN5-JU.mjs → functions-DO1k8KLB.mjs} +2 -2
- package/dist/{functions-D7lN5-JU.mjs.map → functions-DO1k8KLB.mjs.map} +1 -1
- package/dist/{functions-CQrsCHCj.d.mts → functions-PBSwFhni.d.mts} +6 -6
- package/dist/{functions-CQrsCHCj.d.mts.map → functions-PBSwFhni.d.mts.map} +1 -1
- package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs → generator-functions-Hy4pDDr9-BUHOsofo.mjs} +3 -3
- package/dist/{generator-functions-Hy4pDDr9-AUCNpeg5.mjs.map → generator-functions-Hy4pDDr9-BUHOsofo.mjs.map} +1 -1
- package/dist/{index-0qfR8_db.d.mts → index-BAI1gH-I.d.mts} +21 -21
- package/dist/{index-0qfR8_db.d.mts.map → index-BAI1gH-I.d.mts.map} +1 -1
- package/dist/{index-Nqc3OHR_.d.mts → index-BWWwt5hB.d.mts} +3 -3
- package/dist/{index-Nqc3OHR_.d.mts.map → index-BWWwt5hB.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs → index-equivalence-DswCiq5l-9GNm8oG9.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-CGsyPP9B.mjs.map → index-equivalence-DswCiq5l-9GNm8oG9.mjs.map} +1 -1
- package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs → index-naming-BOcJT1B3-D-49owHA.mjs} +2 -2
- package/dist/{index-naming-BOcJT1B3-mG8Fd6KN.mjs.map → index-naming-BOcJT1B3-D-49owHA.mjs.map} +1 -1
- package/dist/{index-naming-Cs6wwia3.d.mts → index-naming-DqjO4p5R.d.mts} +2 -2
- package/dist/{index-naming-Cs6wwia3.d.mts.map → index-naming-DqjO4p5R.d.mts.map} +1 -1
- package/dist/index-reference-D3p5ziNG.d.mts +1 -0
- package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts → index-reference-YHvh6wAL-BupQRpkE.d.mts} +4 -4
- package/dist/{index-reference-YHvh6wAL-BAhOS7RC.d.mts.map → index-reference-YHvh6wAL-BupQRpkE.d.mts.map} +1 -1
- package/dist/{index-type-validation-fGGwAHWc.d.mts → index-type-validation-BFJlwjWi.d.mts} +3 -3
- package/dist/{index-type-validation-fGGwAHWc.d.mts.map → index-type-validation-BFJlwjWi.d.mts.map} +1 -1
- package/dist/{interpreter-CS21wD1i-G0u1x8t_.mjs → interpreter-CrQFtK4p-CM5k_t4g.mjs} +80 -43
- package/dist/interpreter-CrQFtK4p-CM5k_t4g.mjs.map +1 -0
- package/dist/{ir-BvptQsFW.d.mts → ir-CZ5Ks7EA.d.mts} +4 -4
- package/dist/{ir-BvptQsFW.d.mts.map → ir-CZ5Ks7EA.d.mts.map} +1 -1
- package/dist/middleware-Dp3CD7yZ.d.mts +1 -0
- package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts → middleware-JfHt_Ax8-rWWdDxnq.d.mts} +2 -2
- package/dist/{middleware-JfHt_Ax8-DKXbos9y.d.mts.map → middleware-JfHt_Ax8-rWWdDxnq.d.mts.map} +1 -1
- package/dist/{migration-qalbcIUs.d.mts → migration-B35kGD-7.d.mts} +4 -4
- package/dist/{migration-qalbcIUs.d.mts.map → migration-B35kGD-7.d.mts.map} +1 -1
- package/dist/{naming-BcD36g9T-Mfe_xGGL.d.mts → naming-CLfASFf7-HRjmKe43.d.mts} +9 -4
- package/dist/naming-CLfASFf7-HRjmKe43.d.mts.map +1 -0
- package/dist/{naming-bM5qm5PY-jOg3JFMb.mjs → naming-DEpT6Zad-C9PFkWt6.mjs} +5 -4
- package/dist/naming-DEpT6Zad-C9PFkWt6.mjs.map +1 -0
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +22 -22
- package/dist/orm-client.mjs +7 -7
- package/dist/{pack-Cap3oVPy.d.mts → pack-BPbz6RVm.d.mts} +4 -4
- package/dist/{pack-Cap3oVPy.d.mts.map → pack-BPbz6RVm.d.mts.map} +1 -1
- package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts → plan-CMqVpPq6-Aoza6Dp2.d.mts} +4 -4
- package/dist/{plan-CMqVpPq6-Bllx5Zpk.d.mts.map → plan-CMqVpPq6-Aoza6Dp2.d.mts.map} +1 -1
- package/dist/plan-DINEcqC1.d.mts +2 -0
- package/dist/{psl-build-RelubU2E.d.mts → psl-build-CNncjpsa.d.mts} +6 -6
- package/dist/{psl-build-RelubU2E.d.mts.map → psl-build-CNncjpsa.d.mts.map} +1 -1
- package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts → psl-column-resolution-djGEITmJ-DfEOkjPf.d.mts} +3 -3
- package/dist/{psl-column-resolution-djGEITmJ-B5iMpe8H.d.mts.map → psl-column-resolution-djGEITmJ-DfEOkjPf.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs → psl-field-resolution-Bvhx79fP-CuyYFk8z.mjs} +4 -4
- package/dist/{psl-field-resolution-Bvhx79fP-CQqHf_L4.mjs.map → psl-field-resolution-Bvhx79fP-CuyYFk8z.mjs.map} +1 -1
- package/dist/{psl-infer-DzoxPZGd.d.mts → psl-infer-BkkoyXmM.d.mts} +4 -4
- package/dist/{psl-infer-DzoxPZGd.d.mts.map → psl-infer-BkkoyXmM.d.mts.map} +1 -1
- package/dist/{psl-infer--g4i84Go.mjs → psl-infer-C9kVS9ma.mjs} +2 -2
- package/dist/{psl-infer--g4i84Go.mjs.map → psl-infer-C9kVS9ma.mjs.map} +1 -1
- package/dist/query-lane-context-DL6bwl6k.d.mts +1 -0
- package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts → query-lane-context-DLSXDsDK-CGSahS15.d.mts} +8 -8
- package/dist/{query-lane-context-DLSXDsDK-pEiQmuYy.d.mts.map → query-lane-context-DLSXDsDK-CGSahS15.d.mts.map} +1 -1
- package/dist/relational-core.d.mts +12 -12
- 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 +3 -3
- package/dist/relational-core__ast.mjs +1 -1
- 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__collection-methods.d.mts +2 -2
- package/dist/relational-core__contract-free.d.mts +4 -4
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__functions.mjs +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/{resolve-storage-table-DCqtmnSU.d.mts → resolve-storage-table-D1rXCcCk.d.mts} +3 -3
- package/dist/{resolve-storage-table-DCqtmnSU.d.mts.map → resolve-storage-table-D1rXCcCk.d.mts.map} +1 -1
- package/dist/{runtime-JKWb27L5.d.mts → runtime-BrBva2ta.d.mts} +2 -2
- package/dist/{runtime-JKWb27L5.d.mts.map → runtime-BrBva2ta.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts → schema-differ-DmP74bB8-BXkhxcPs.d.mts} +5 -5
- package/dist/{schema-differ-DmP74bB8-tqHKiJ88.d.mts.map → schema-differ-DmP74bB8-BXkhxcPs.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__naming.d.mts +2 -2
- package/dist/schema-ir__naming.mjs +2 -2
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs → schema-verify-C3wbdviw-mlPO4NkT.mjs} +3 -3
- package/dist/{schema-verify-C3wbdviw-DMjIubOr.mjs.map → schema-verify-C3wbdviw-mlPO4NkT.mjs.map} +1 -1
- package/dist/{serialized-index-DjCCnXB1-DMA7BtO2.mjs → serialized-index-BefvjuZ0-Bbsja7If.mjs} +14 -27
- package/dist/serialized-index-BefvjuZ0-Bbsja7If.mjs.map +1 -0
- package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts → serialized-index-CrgG8ct1-Duy5-kFV.d.mts} +3 -3
- package/dist/{serialized-index-CrgG8ct1-DKVJ7TDX.d.mts.map → serialized-index-CrgG8ct1-Duy5-kFV.d.mts.map} +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs → sql-contract-serializer-sMY3prTx-aQd4v3fE.mjs} +4 -4
- package/dist/{sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map → sql-contract-serializer-sMY3prTx-aQd4v3fE.mjs.map} +1 -1
- package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts} +2 -2
- package/dist/{sql-execution-plan-CN-FEwrR-CzRFoxKR.d.mts.map → sql-execution-plan-CN-FEwrR-BEJ0-g83.d.mts.map} +1 -1
- package/dist/{sql-expression-B4BrhGPi.d.mts → sql-expression-1yO8GiBc.d.mts} +2 -2
- package/dist/{sql-expression-B4BrhGPi.d.mts.map → sql-expression-1yO8GiBc.d.mts.map} +1 -1
- package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts → sql-index-ByAAE7K8-4TUFKGLK.d.mts} +2 -2
- package/dist/{sql-index-ByAAE7K8-Dqtn_vUL.d.mts.map → sql-index-ByAAE7K8-4TUFKGLK.d.mts.map} +1 -1
- package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs +50 -0
- package/dist/sql-node-D8P0akYY-RVytYXDZ.mjs.map +1 -0
- package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts → sql-storage-B_AM6tU1-BOPQxXo7.d.mts} +6 -5
- package/dist/{sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map → sql-storage-B_AM6tU1-BOPQxXo7.d.mts.map} +1 -1
- package/dist/{storage-table-DDvN83mw-DkbBFmK9.mjs → storage-table-B_MrLtQX-eWx6BgGT.mjs} +7 -50
- package/dist/storage-table-B_MrLtQX-eWx6BgGT.mjs.map +1 -0
- package/dist/{storage-table-Bf1ZjnxO-pUj6pyP0.d.mts → storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts} +23 -6
- package/dist/storage-value-object-BcvIeUr8-DiiZNIrZ.d.mts.map +1 -0
- package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs +38 -0
- package/dist/storage-value-set-uGUEBAMJ-hX-zFqN5.mjs.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts → transaction-state-DR3nKTmH-C3wq6dCB.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-BIKF_fP6.d.mts.map → transaction-state-DR3nKTmH-C3wq6dCB.d.mts.map} +1 -1
- package/dist/{types-DoyiTsjg-2YMhMJDA.mjs → types-1ZKE0deC-Dou4ugcz.mjs} +3 -3
- package/dist/{types-DoyiTsjg-2YMhMJDA.mjs.map → types-1ZKE0deC-Dou4ugcz.mjs.map} +1 -1
- package/dist/types-B-dwfOwQ.d.mts +1 -0
- package/dist/{types-CTdSkl0s.mjs → types-CISwoRED.mjs} +2 -2
- package/dist/types-CISwoRED.mjs.map +1 -0
- package/dist/{types-COXfSNOP-DcuULeD9.d.mts → types-COXfSNOP-D9vt9QDL.d.mts} +9 -9
- package/dist/{types-COXfSNOP-DcuULeD9.d.mts.map → types-COXfSNOP-D9vt9QDL.d.mts.map} +1 -1
- package/dist/{types-CkAd8SWm.d.mts → types-CXRxo_TK.d.mts} +7 -7
- package/dist/{types-CkAd8SWm.d.mts.map → types-CXRxo_TK.d.mts.map} +1 -1
- package/dist/types-DIoM5Ft3.d.mts +1 -0
- package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts → types-DNTLudNR-DiVulPhL.d.mts} +7 -7
- package/dist/{types-DfKvtJwS-CrpWTGBJ.d.mts.map → types-DNTLudNR-DiVulPhL.d.mts.map} +1 -1
- package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts → types-NgqqVAo5-CJG02ILZ.d.mts} +10 -10
- package/dist/{types-NgqqVAo5-Be_uYGQx.d.mts.map → types-NgqqVAo5-CJG02ILZ.d.mts.map} +1 -1
- package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts → types-fmtEmvj3-B0fQaVes.d.mts} +4 -4
- package/dist/{types-CuCxAQat-Dz8P4xyt.d.mts.map → types-fmtEmvj3-B0fQaVes.d.mts.map} +1 -1
- package/dist/{types-ijhejJhK-EdACW3bY.d.mts → types-ijhejJhK-BqfwP5Cc.d.mts} +2 -2
- package/dist/{types-ijhejJhK-EdACW3bY.d.mts.map → types-ijhejJhK-BqfwP5Cc.d.mts.map} +1 -1
- package/dist/{validators-BwA7ttZM.mjs → validators-CnQqLEIi.mjs} +29 -30
- package/dist/validators-CnQqLEIi.mjs.map +1 -0
- package/dist/{validators-FJs8HvFr.d.mts → validators-Dt-19ywK.d.mts} +4 -4
- package/dist/{validators-FJs8HvFr.d.mts.map → validators-Dt-19ywK.d.mts.map} +1 -1
- package/package.json +20 -18
- package/dist/ast-DcphKbq9.d.mts.map +0 -1
- package/dist/ast-e_02t9Nt.mjs.map +0 -1
- package/dist/collection-methods-FWiYjZ5j.d.mts +0 -1
- package/dist/contract-builder-B-Q9T1CO.d.mts.map +0 -1
- package/dist/contract-view-DqpzeYeE.mjs.map +0 -1
- package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +0 -1
- package/dist/dist-C8Y-PPuE.mjs.map +0 -1
- package/dist/entity-kinds-JR5SAm5h-DOH6VUtL.mjs.map +0 -1
- package/dist/expression-CQHy0GY7.d.mts +0 -2
- package/dist/index-reference-BVkoanQn.d.mts +0 -1
- package/dist/interpreter-CS21wD1i-G0u1x8t_.mjs.map +0 -1
- package/dist/middleware-DYiOUIpn.d.mts +0 -1
- package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +0 -1
- package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +0 -1
- package/dist/plan-Cg0h96GD.d.mts +0 -2
- package/dist/query-lane-context-Dqs5qCXx.d.mts +0 -1
- package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +0 -1
- package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +0 -1
- package/dist/storage-table-DDvN83mw-DkbBFmK9.mjs.map +0 -1
- package/dist/types-CTdSkl0s.mjs.map +0 -1
- package/dist/types-CvmPNREJ.d.mts +0 -1
- package/dist/types-ljUNyiWe.d.mts +0 -1
- package/dist/validators-BwA7ttZM.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Dt as ProjectionItem, E as CodecRef$1, ft as LockWaitPolicy, gt as LoweredStatement, h as AnyQueryAst, m as AnyParamRef } from "./types-ijhejJhK-
|
|
1
|
+
import { Dt as ProjectionItem, E as CodecRef$1, ft as LockWaitPolicy, gt as LoweredStatement, h as AnyQueryAst, m as AnyParamRef } from "./types-ijhejJhK-BqfwP5Cc.mjs";
|
|
2
2
|
import { c as SqlQueryable } from "./driver-types-DRsYeq3j-BimeCnUk.mjs";
|
|
3
|
-
import "./ddl-types-BeA1kjV1-
|
|
3
|
+
import "./ddl-types-BeA1kjV1-BUcW52Dx.mjs";
|
|
4
4
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
|
-
import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors, DataTypeValue } from "@prisma/orm-framework/components/codec";
|
|
6
5
|
import { ColumnDefaultLiteralInputValue, ContractMarkerRecord, JsonValue } from "@prisma/orm-framework/contract/types";
|
|
6
|
+
import { CodecCallContext, CodecDescriptorTemplateImpl, CodecImpl, CodecInstanceContext, CodecLookupWithDescriptors, DataTypeValue } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
//#region ../../../2-sql-family/4-lanes/relational-core/dist/exports/ast.d.mts
|
|
8
8
|
//#region src/ast/adapter-types.d.ts
|
|
9
9
|
type AdapterTarget = string;
|
|
@@ -181,6 +181,7 @@ declare class SqlTextCodec extends CodecImpl<typeof SQL_TEXT_CODEC_ID, readonly
|
|
|
181
181
|
toDataTypeValue(input: string): DataTypeValue;
|
|
182
182
|
}
|
|
183
183
|
declare class SqlTextDescriptor extends CodecDescriptorTemplateImpl<void> {
|
|
184
|
+
readonly jsonType: "string";
|
|
184
185
|
readonly codecId: "sql/text@1";
|
|
185
186
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
186
187
|
readonly paramsSchema: undefined;
|
|
@@ -196,6 +197,7 @@ declare class SqlIntCodec extends CodecImpl<typeof SQL_INT_CODEC_ID, readonly ['
|
|
|
196
197
|
toDataTypeValue(input: number): DataTypeValue;
|
|
197
198
|
}
|
|
198
199
|
declare class SqlIntDescriptor extends CodecDescriptorTemplateImpl<void> {
|
|
200
|
+
readonly jsonType: "number";
|
|
199
201
|
readonly codecId: "sql/int@1";
|
|
200
202
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
201
203
|
readonly paramsSchema: undefined;
|
|
@@ -210,6 +212,7 @@ declare class SqlFloatCodec extends CodecImpl<typeof SQL_FLOAT_CODEC_ID, readonl
|
|
|
210
212
|
toDataTypeValue(input: number): DataTypeValue;
|
|
211
213
|
}
|
|
212
214
|
declare class SqlFloatDescriptor extends CodecDescriptorTemplateImpl<void> {
|
|
215
|
+
readonly jsonType: "number";
|
|
213
216
|
readonly codecId: "sql/float@1";
|
|
214
217
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
215
218
|
readonly paramsSchema: undefined;
|
|
@@ -224,6 +227,7 @@ declare class SqlCharCodec extends CodecImpl<typeof SQL_CHAR_CODEC_ID, readonly
|
|
|
224
227
|
toDataTypeValue(input: string): DataTypeValue;
|
|
225
228
|
}
|
|
226
229
|
declare class SqlCharDescriptor extends CodecDescriptorTemplateImpl<LengthParams> {
|
|
230
|
+
readonly jsonType: "string";
|
|
227
231
|
readonly codecId: "sql/char@1";
|
|
228
232
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
229
233
|
readonly paramsSchema: undefined;
|
|
@@ -238,6 +242,7 @@ declare class SqlVarcharCodec extends CodecImpl<typeof SQL_VARCHAR_CODEC_ID, rea
|
|
|
238
242
|
toDataTypeValue(input: string): DataTypeValue;
|
|
239
243
|
}
|
|
240
244
|
declare class SqlVarcharDescriptor extends CodecDescriptorTemplateImpl<LengthParams> {
|
|
245
|
+
readonly jsonType: "string";
|
|
241
246
|
readonly codecId: "sql/varchar@1";
|
|
242
247
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
243
248
|
readonly paramsSchema: undefined;
|
|
@@ -261,6 +266,7 @@ declare class SqlRawCodec extends CodecImpl<typeof SQL_RAW_CODEC_ID, readonly []
|
|
|
261
266
|
toDataTypeValue(input: unknown): DataTypeValue;
|
|
262
267
|
}
|
|
263
268
|
declare class SqlRawDescriptor extends CodecDescriptorTemplateImpl<RawParams> {
|
|
269
|
+
readonly jsonType: "any";
|
|
264
270
|
readonly codecId: "sql/raw@1";
|
|
265
271
|
readonly traits: readonly [];
|
|
266
272
|
readonly enumRefusal = "A raw column has a type Prisma does not interpret, so no member can be written as one of its values. No enum can use the raw codec; use a text enum instead.";
|
|
@@ -287,4 +293,4 @@ declare function collectOrderedParamRefs(ast: AnyQueryAst): ReadonlyArray<AnyPar
|
|
|
287
293
|
declare function isAggregateProjection(item: ProjectionItem): boolean;
|
|
288
294
|
//#endregion
|
|
289
295
|
export { sqlIntDescriptor as $, SqlTextDescriptor as A, lockStrengthCapabilities as B, SqlFloatCodec as C, SqlRawCodec as D, SqlIntDescriptor as E, encodeListLiteralDefault as F, sqlCharDescriptor as G, missingCapability as H, encodeLiteralDefault as I, sqlFloatDecode as J, sqlCharEncode as K, isAggregateProjection as L, SqlVarcharDescriptor as M, collectOrderedParamRefs as N, SqlRawDescriptor as O, compact as P, sqlIntDecode as Q, lockIncompatible as R, SqlCharDescriptor as S, SqlIntCodec as T, sqlCharColumn as U, lockWaitPolicyOf as V, sqlCharDecode as W, sqlFloatEncode as X, sqlFloatDescriptor as Y, sqlIntColumn as Z, SQL_INT_CODEC_ID as _, EncodedLiteralDefault as a, sqlTextDescriptor as at, SQL_VARCHAR_CODEC_ID as b, LockOptionCapabilities as c, sqlVarcharDecode as ct, LockWaitRequest as d, sqlIntEncode as et, Lowerer as f, SQL_FLOAT_CODEC_ID as g, SQL_CHAR_CODEC_ID as h, CapabilityRequirement as i, sqlTextDecode as it, SqlVarcharCodec as j, SqlTextCodec as k, LockStrengthCapabilities as l, sqlVarcharDescriptor as lt, MarkerReadResult as m, AdapterProfile as n, sqlRawDescriptor as nt, LiteralDefaultColumn as o, sqlTextEncode as ot, LowererContext as p, sqlFloatColumn as q, AdapterTarget as r, sqlTextColumn as rt, LockConflict as s, sqlVarcharColumn as st, Adapter as t, sqlRawColumn as tt, LockWaitOptions as u, sqlVarcharEncode as ut, SQL_RAW_CODEC_ID as v, SqlFloatDescriptor as w, SqlCharCodec as x, SQL_TEXT_CODEC_ID as y, lockOptionCapabilities as z };
|
|
290
|
-
//# sourceMappingURL=ast-
|
|
296
|
+
//# sourceMappingURL=ast-1JRQY-dP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-1JRQY-dP.d.mts","names":[],"sources":["../../../../2-sql-family/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,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,eAAe,+DAA+D,WAAW;EACrG;;;;iBAIe,QAAQ,UAAU,yBAAyB,GAAG,IAAI;;;;;;;;;iBASlD,wBAAwB,KAAK,cAAc,cAAc;;iBAEzD,sBAAsB,MAAM"}
|
|
@@ -196,6 +196,7 @@ var SqlTextCodec = class extends CodecImpl {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
var SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
199
|
+
jsonType = "string";
|
|
199
200
|
codecId = SQL_TEXT_CODEC_ID;
|
|
200
201
|
traits = [
|
|
201
202
|
"equality",
|
|
@@ -225,6 +226,7 @@ var SqlIntCodec = class extends CodecImpl {
|
|
|
225
226
|
}
|
|
226
227
|
};
|
|
227
228
|
var SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
229
|
+
jsonType = "number";
|
|
228
230
|
codecId = SQL_INT_CODEC_ID;
|
|
229
231
|
traits = [
|
|
230
232
|
"equality",
|
|
@@ -253,6 +255,7 @@ var SqlFloatCodec = class extends CodecImpl {
|
|
|
253
255
|
}
|
|
254
256
|
};
|
|
255
257
|
var SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
258
|
+
jsonType = "number";
|
|
256
259
|
codecId = SQL_FLOAT_CODEC_ID;
|
|
257
260
|
traits = [
|
|
258
261
|
"equality",
|
|
@@ -281,6 +284,7 @@ var SqlCharCodec = class extends CodecImpl {
|
|
|
281
284
|
}
|
|
282
285
|
};
|
|
283
286
|
var SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
287
|
+
jsonType = "string";
|
|
284
288
|
codecId = SQL_CHAR_CODEC_ID;
|
|
285
289
|
traits = [
|
|
286
290
|
"equality",
|
|
@@ -309,6 +313,7 @@ var SqlVarcharCodec = class extends CodecImpl {
|
|
|
309
313
|
}
|
|
310
314
|
};
|
|
311
315
|
var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
316
|
+
jsonType = "string";
|
|
312
317
|
codecId = SQL_VARCHAR_CODEC_ID;
|
|
313
318
|
traits = [
|
|
314
319
|
"equality",
|
|
@@ -356,6 +361,7 @@ var SqlRawCodec = class extends CodecImpl {
|
|
|
356
361
|
}
|
|
357
362
|
};
|
|
358
363
|
var SqlRawDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
364
|
+
jsonType = "any";
|
|
359
365
|
codecId = SQL_RAW_CODEC_ID;
|
|
360
366
|
traits = [];
|
|
361
367
|
enumRefusal = "A raw column has a type Prisma does not interpret, so no member can be written as one of its values. No enum can use the raw codec; use a text enum instead.";
|
|
@@ -369,4 +375,4 @@ const sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDe
|
|
|
369
375
|
//#endregion
|
|
370
376
|
export { sqlCharDecode as A, sqlIntEncode as B, encodeLiteralDefault as C, lockWaitPolicyOf as D, lockStrengthCapabilities as E, sqlFloatDescriptor as F, sqlTextDescriptor as G, sqlRawDescriptor as H, sqlFloatEncode as I, sqlVarcharDecode as J, sqlTextEncode as K, sqlIntColumn as L, sqlCharEncode as M, sqlFloatColumn as N, missingCapability as O, sqlFloatDecode as P, sqlIntDecode as R, encodeListLiteralDefault as S, lockOptionCapabilities as T, sqlTextColumn as U, sqlRawColumn as V, sqlTextDecode as W, sqlVarcharEncode as X, sqlVarcharDescriptor as Y, SqlRawDescriptor as _, SQL_FLOAT_CODEC_ID as a, SqlVarcharCodec as b, SQL_TEXT_CODEC_ID as c, SqlCharDescriptor as d, SqlFloatCodec as f, SqlRawCodec as g, SqlIntDescriptor as h, SQL_CHAR_CODEC_ID as i, sqlCharDescriptor as j, sqlCharColumn as k, SQL_VARCHAR_CODEC_ID as l, SqlIntCodec as m, JsonDocumentProjection as n, SQL_INT_CODEC_ID as o, SqlFloatDescriptor as p, sqlVarcharColumn as q, NativeJsonValueProjection as r, SQL_RAW_CODEC_ID as s, CodecJsonValueProjection as t, SqlCharCodec as u, SqlTextCodec as v, lockIncompatible as w, SqlVarcharDescriptor as x, SqlTextDescriptor as y, sqlIntDescriptor as z };
|
|
371
377
|
|
|
372
|
-
//# sourceMappingURL=ast-
|
|
378
|
+
//# sourceMappingURL=ast-C3itulLi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-C3itulLi.mjs","names":[],"sources":["../../../../2-sql-family/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-BkTuhW3Z.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-Dset3kln.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-DixeJBri.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from \"@internal/framework-components/codec\";\nimport { InternalError, 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 as a value of the column's data type, converts it with the column's codec, built with its type parameters, and writes it with `toWire` 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 the codec reads it into a value of the column's type with `toDataTypeValue`, and the Date it reads back from that value is encoded: the type and the codec check it as they check any other default. A `null` the type or codec refuses is SQL NULL, because SQL NULL has no stored form of its own; a type that stores `null` (a JSON type) makes it the JSON value null. Any other value either 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\tconst refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);\n\tif (value instanceof Date) return encodeDate(codec, value, refused);\n\treturn encodeWithCodec(codec, codecRef, value, refused);\n}\nasync function encodeDate(codec, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\tthrow refused(error);\n\t}\n\treturn {\n\t\tkind: \"wire\",\n\t\twire: await codec.toWire(decoded, {})\n\t};\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, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));\n}\nasync function encodeWithCodec(codec, codecRef, value, refused) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = readContractValue(codec, value, codecRef.typeParams);\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.toWire(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 SQL_RAW_CODEC_ID = \"sql/raw@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\n/** A family codec has no data type of its own, so only a target that adapts it, naming its data type, builds its codec. A column helper below names the codec for a contract; the target's adapted descriptor builds it. */\nfunction unadapted(codecId) {\n\tthrow new InternalError(`${codecId} is a SQL family template. A target adapts it with its own data type and builds its codecs; the template builds none.`);\n}\nvar SqlTextCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"string\";\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 () => unadapted(this.codecId);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);\nvar SqlIntCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\t/** A `number` holds an integer exactly only within the safe integer range. */\n\tfromDataTypeValue(value) {\n\t\treturn readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"number\";\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 () => unadapted(this.codecId);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn readJsonFloat(this.id, value.value);\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(floatToJson(input));\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"number\";\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 () => unadapted(this.codecId);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);\nvar SqlCharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"string\";\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 () => unadapted(this.codecId);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\treturn this.dataTypeValueOf(input);\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"string\";\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 () => unadapted(this.codecId);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);\nfunction isJsonValue(value) {\n\tif (value === null) return true;\n\tswitch (typeof value) {\n\t\tcase \"string\":\n\t\tcase \"boolean\": return true;\n\t\tcase \"number\": return Number.isFinite(value);\n\t\tcase \"object\":\n\t\t\tif (Array.isArray(value)) return value.every(isJsonValue);\n\t\t\treturn Object.getPrototypeOf(value) === Object.prototype && Object.values(value).every(isJsonValue);\n\t\tdefault: return false;\n\t}\n}\n/**\n* The codec of a raw column, whose type no other data type claims. Values pass through unchanged and\n* are typed `unknown`, since nothing is known about them beyond what the database returns. A raw\n* column has no literal values, but that is its data type's rule: the data type's reader refuses\n* every value, so `toDataTypeValue` refuses every literal. ADR 273.\n*/\nvar SqlRawCodec = class extends CodecImpl {\n\tasync toWire(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync fromWire(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tfromDataTypeValue(value) {\n\t\treturn value.value;\n\t}\n\ttoDataTypeValue(input) {\n\t\tif (isJsonValue(input)) return this.dataTypeValueOf(input);\n\t\tthrow structuredError(\"RUNTIME.ENCODE_FAILED\", `${this.id} writes only JSON values as JSON`, { meta: { codecId: this.id } });\n\t}\n};\nvar SqlRawDescriptor = class extends CodecDescriptorTemplateImpl {\n\tjsonType = \"any\";\n\tcodecId = SQL_RAW_CODEC_ID;\n\ttraits = [];\n\tenumRefusal = \"A raw column has a type Prisma does not interpret, so no member can be written as one of its values. No enum can use the raw codec; use a text enum instead.\";\n\tparamsSchema = void 0;\n\tfactory(_params) {\n\t\treturn () => unadapted(this.codecId);\n\t}\n};\nconst sqlRawDescriptor = new SqlRawDescriptor();\nconst sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDescriptor.codecId, { sql });\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_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlRawCodec, SqlRawDescriptor, 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, sqlRawColumn, sqlRawDescriptor, 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,MAAM,WAAW,UAAU,eAAe,OAAO,SAAS,SAAS,OAAO,KAAK,GAAG,KAAK;CACvF,IAAI,iBAAiB,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO;CAClE,OAAO,gBAAgB,OAAO,UAAU,OAAO,OAAO;AACvD;AACA,eAAe,WAAW,OAAO,OAAO,SAAS;CAChD,IAAI;CACJ,IAAI;EACH,UAAU,MAAM,kBAAkB,MAAM,gBAAgB,KAAK,CAAC;CAC/D,SAAS,OAAO;EACf,IAAI,gBAAgB,KAAK,GAAG,MAAM;EAClC,MAAM,QAAQ,KAAK;CACpB;CACA,OAAO;EACN,MAAM;EACN,MAAM,MAAM,MAAM,OAAO,SAAS,CAAC,CAAC;CACrC;AACD;;;;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,UAAU,eAAe,OAAO,SAAS,SAAS,SAAS,QAAQ,GAAG,K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O,OAAf;EACC,KAAK;EACL,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,OAAO,OAAO,SAAS,KAAK;EAC3C,KAAK;GACJ,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,WAAW;GACxD,OAAO,OAAO,eAAe,KAAK,MAAM,OAAO,aAAa,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;EACnG,SAAS,OAAO;CACjB;AACD;;;;;;;AAOA,IAAI,cAAc,cAAc,UAAU;CACzC,MAAM,OAAO,OAAO,MAAM;EACzB,OAAO;CACR;CACA,MAAM,SAAS,MAAM,MAAM;EAC1B,OAAO;CACR;CACA,kBAAkB,OAAO;EACxB,OAAO,MAAM;CACd;CACA,gBAAgB,OAAO;EACtB,IAAI,YAAY,KAAK,GAAG,OAAO,KAAK,gBAAgB,KAAK;EACzD,MAAM,gBAAgB,yBAAyB,GAAG,KAAK,GAAG,mCAAmC,EAAE,MAAM,EAAE,SAAS,KAAK,GAAG,EAAE,CAAC;CAC5H;AACD;AACA,IAAI,mBAAmB,cAAc,4BAA4B;CAChE,WAAW;CACX,UAAU;CACV,SAAS,CAAC;CACV,cAAc;CACd,eAAe,KAAK;CACpB,QAAQ,SAAS;EAChB,aAAa,UAAU,KAAK,OAAO;CACpC;AACD;AACA,MAAM,mBAAmB,IAAI,iBAAiB;AAC9C,MAAM,gBAAgB,QAAQ,OAAO,iBAAiB,QAAQ,EAAE,IAAI,CAAC,GAAG,iBAAiB,SAAS,EAAE,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./contract-builder-
|
|
2
|
-
import "./psl-column-resolution-djGEITmJ-
|
|
1
|
+
import "./contract-builder-B8oDZ4aU.mjs";
|
|
2
|
+
import "./psl-column-resolution-djGEITmJ-DfEOkjPf.mjs";
|
|
3
3
|
import { DataTypeSupport } from "@prisma/orm-framework/components/authoring";
|
|
4
4
|
import "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { PslSources } from "@prisma/orm-framework/psl-parser/syntax";
|
|
@@ -112,4 +112,4 @@ declare const sqlAttributeSpecs: {
|
|
|
112
112
|
declare function describeUnsupportedSqlAttribute(sources: PslSources): DescribeUnsupportedAttribute;
|
|
113
113
|
//#endregion
|
|
114
114
|
export { EnumMemberListDefault as a, sqlAttributeSpecs as c, EnumMemberDefault as i, DefaultFunctionCall as n, ParsedNullLiteral as o, DefaultFunctionSignature as r, defaultFunctionCall as s, describeUnsupportedSqlAttribute as t };
|
|
115
|
-
//# sourceMappingURL=attribute-specs-
|
|
115
|
+
//# sourceMappingURL=attribute-specs-CM_fC-TC.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-specs-
|
|
1
|
+
{"version":3,"file":"attribute-specs-CM_fC-TC.d.mts","names":[],"sources":["../../../../2-sql-family/2-authoring/contract-psl/dist/sql-attribute-specs-CK9iRCBj.d.mts","../../../../2-sql-family/2-authoring/contract-psl/dist/attribute-specs.d.mts"],"mappings":";;;;;;;;;;UAOU;WACC;WACA;;;UAGD;WACC;WACA,MAAM;;;UAGP;WACC;WACA,oBAAoB,oBAAoB;;;UAGzC;WACC;WACA,MAAM;;KAEZ,kBAAkB,sBAAsB,oBAAoB,kBAAkB,sBAAsB,qBAAqB,sBAAsB,oBAAoB;;KAEnK,2BAA2B,gBAAgB,WAAW,oBAAoB;;;;iBAI9D,oBAAoB,cAAc,OAAO,6BAA6B,WAAW,kBAAkB,QAAQ,eAAe;iBAC1H,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,OAAO;OACN;;WAEI;aACE,MAAM,MAAM,8BAA8B;MACjD;OACC;aACM,KAAK,MAAM,8BAA8B;eACvC;OACR;aACM,SAAS,MAAM,8BAA8B;eAC3C;OACR;aACM,WAAW,MAAM,8BAA8B;MACtD;eACS;eACA;eACA;eACA;eACA;eACA;OACR;aACM,UAAU,KAAK,8BAA8B;MACpD,OAAO;OACN;aACM,WAAW,KAAK,8BAA8B;MACrD,OAAO;OACN;aACM,WAAW,KAAK,8BAA8B;MACrD,OAAO;OACN;;;;;;iBC3FU,gCAAgC,SAAS,aAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CheckConstraintInput } from "./check-constraint-B7qGu6rc-
|
|
1
|
+
import { n as CheckConstraintInput } from "./check-constraint-B7qGu6rc-D5kVe9je.mjs";
|
|
2
2
|
import { AuthoringWarningSink } from "@prisma/orm-framework/components/authoring";
|
|
3
3
|
//#region ../../../2-sql-family/1-core/contract/dist/authored-check-naming.d.mts
|
|
4
4
|
//#region src/authored-check-naming.d.ts
|
|
@@ -27,4 +27,4 @@ type AuthoredCheckInput = {
|
|
|
27
27
|
declare function lowerAuthoredCheck(tableName: string, authored: AuthoredCheckInput, warnings?: AuthoringWarningSink): CheckConstraintInput;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { lowerAuthoredCheck as n, AuthoredCheckInput as t };
|
|
30
|
-
//# sourceMappingURL=authored-check-naming-
|
|
30
|
+
//# sourceMappingURL=authored-check-naming-BiSwtSFu.d.mts.map
|
package/dist/{authored-check-naming-D-o196ry.d.mts.map → authored-check-naming-BiSwtSFu.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authored-check-naming-
|
|
1
|
+
{"version":3,"file":"authored-check-naming-BiSwtSFu.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/authored-check-naming.d.mts"],"mappings":";;;;;;;;;;KASK;WACM;WACA;WACA;;;;;;;;;;;;;iBAaM,mBAAmB,mBAAmB,UAAU,oBAAoB,WAAW,uBAAuB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as contractError } from "./contract-errors-BCN6RVI5-DoH6b_KZ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as exactNameBodyWarning } from "./index-naming-BOcJT1B3-
|
|
2
|
+
import { a as computeCheckContentHash, r as assertWireNamePrefixLength } from "./naming-DEpT6Zad-C9PFkWt6.mjs";
|
|
3
|
+
import { t as exactNameBodyWarning } from "./index-naming-BOcJT1B3-D-49owHA.mjs";
|
|
4
4
|
import { flushAuthoringWarnings } from "@prisma/orm-framework/components/authoring";
|
|
5
5
|
//#region ../../../2-sql-family/1-core/contract/dist/authored-check-naming.mjs
|
|
6
6
|
/**
|
|
@@ -44,4 +44,4 @@ function lowerAuthoredCheck(tableName, authored, warnings) {
|
|
|
44
44
|
//#endregion
|
|
45
45
|
export { lowerAuthoredCheck as t };
|
|
46
46
|
|
|
47
|
-
//# sourceMappingURL=authored-check-naming-
|
|
47
|
+
//# sourceMappingURL=authored-check-naming-DTKcH2_d.mjs.map
|
package/dist/{authored-check-naming-BHGJhjqn.mjs.map → authored-check-naming-DTKcH2_d.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authored-check-naming-
|
|
1
|
+
{"version":3,"file":"authored-check-naming-DTKcH2_d.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/authored-check-naming.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { t as exactNameBodyWarning } from \"./index-naming-BOcJT1B3.mjs\";\nimport { flushAuthoringWarnings } from \"@internal/framework-components/authoring\";\nimport { assertWireNamePrefixLength, computeCheckContentHash } from \"@internal/sql-schema-ir/naming\";\n//#region src/authored-check-naming.ts\n/**\n* Lowers an authored check constraint into the name-identified entity\n* `contract.json` persists: exact mode adopts `map` verbatim (no prefix, no\n* hash) and warns, because a hand-authored body compared verbatim against\n* Postgres's reprint would false-drift; wire mode appends the content-hash\n* suffix to the authored prefix. There is no default prefix to fall back on\n* — a check has no column tuple to derive one from, unlike an index — so an\n* absent `name` is only valid alongside a present `map`. The cross-field\n* guards are the shared enforcement backstop for both authoring surfaces\n* (PSL pre-empts them with span-anchored diagnostics).\n*/\nfunction lowerAuthoredCheck(tableName, authored, warnings) {\n\tif (authored.map !== void 0 && authored.name !== void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check \"${authored.map}\" on table \"${tableName}\": map and name are mutually exclusive — map adopts an exact physical name, name is a wire prefix.`);\n\tif (authored.expression.trim().length === 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": expression must not be empty — an empty predicate is not a constraint.`);\n\tif (authored.map !== void 0) {\n\t\tconst warning = exactNameBodyWarning(\"check\", authored.map);\n\t\tif (warnings !== void 0) warnings.push(warning);\n\t\telse flushAuthoringWarnings([warning]);\n\t\treturn {\n\t\t\tnaming: {\n\t\t\t\tkind: \"exact\",\n\t\t\t\tname: authored.map\n\t\t\t},\n\t\t\texpression: authored.expression\n\t\t};\n\t}\n\tif (authored.name === void 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `Check on table \"${tableName}\": a check constraint requires an explicit name (name:) or exact physical name (map:) — unlike an index there is no column tuple to derive a default name from.`);\n\tconst prefix = authored.name;\n\tassertWireNamePrefixLength(prefix, \"check prefix\");\n\treturn {\n\t\tnaming: {\n\t\t\tkind: \"wire\",\n\t\t\tprefix,\n\t\t\thash: computeCheckContentHash(authored.expression)\n\t\t},\n\t\texpression: authored.expression\n\t};\n}\n//#endregion\nexport { lowerAuthoredCheck };\n\n//# sourceMappingURL=authored-check-naming.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,mBAAmB,WAAW,UAAU,UAAU;CAC1D,IAAI,SAAS,QAAQ,KAAK,KAAK,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,UAAU,SAAS,IAAI,cAAc,UAAU,mGAAmG;CAC5P,IAAI,SAAS,WAAW,KAAK,CAAC,CAAC,WAAW,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,0EAA0E;CACrM,IAAI,SAAS,QAAQ,KAAK,GAAG;EAC5B,MAAM,UAAU,qBAAqB,SAAS,SAAS,GAAG;EAC1D,IAAI,aAAa,KAAK,GAAG,SAAS,KAAK,OAAO;OACzC,uBAAuB,CAAC,OAAO,CAAC;EACrC,OAAO;GACN,QAAQ;IACP,MAAM;IACN,MAAM,SAAS;GAChB;GACA,YAAY,SAAS;EACtB;CACD;CACA,IAAI,SAAS,SAAS,KAAK,GAAG,MAAM,cAAc,6BAA6B,mBAAmB,UAAU,gKAAgK;CAC5Q,MAAM,SAAS,SAAS;CACxB,2BAA2B,QAAQ,cAAc;CACjD,OAAO;EACN,QAAQ;GACP,MAAM;GACN;GACA,MAAM,wBAAwB,SAAS,UAAU;EAClD;EACA,YAAY,SAAS;CACtB;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./contract-builder-
|
|
1
|
+
import "./contract-builder-B8oDZ4aU.mjs";
|
|
2
2
|
import "@prisma/orm-framework/components/authoring";
|
|
3
3
|
import "@prisma/orm-framework/psl-parser";
|
|
4
4
|
//#region ../../../2-sql-family/9-family/dist/authoring-entity-types-CgKIgWq5.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, string | number | boolean | import("@prisma/orm-framework/components/authoring").WrittenScalar | (string | number | boolean | import("@prisma/orm-framework/components/authoring").WrittenScalar)[] | undefined>>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { sqlFamilyEnumSpec as t };
|
|
9
|
-
//# sourceMappingURL=authoring-entity-types-CgKIgWq5
|
|
9
|
+
//# sourceMappingURL=authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-entity-types-CgKIgWq5
|
|
1
|
+
{"version":3,"file":"authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/authoring-entity-types-CgKIgWq5.d.mts"],"mappings":";;;;;iBAIiB,oDAAoD,aAAa,8FAA8F,gGAAgG"}
|
package/dist/builder.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-
|
|
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-D1d75IvM-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-EOb5cRCY.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions } from "./functions-PBSwFhni.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-D1d75IvM-C1lqD6a2.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
|
-
import { l as SqlStorage } from "./sql-storage-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { i as SqlOperationEntry } from "./index-
|
|
4
|
-
import { l as RawCodecInferer } from "./expression-C3F6gxZH-
|
|
5
|
-
import { t as ExpressionImpl } from "./expression-BWRsWR6O-
|
|
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-D1d75IvM-
|
|
9
|
-
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-DLSXDsDK-
|
|
10
|
-
import "./query-lane-context-
|
|
1
|
+
import { l as SqlStorage } from "./sql-storage-B_AM6tU1-BOPQxXo7.mjs";
|
|
2
|
+
import "./types-CXRxo_TK.mjs";
|
|
3
|
+
import { i as SqlOperationEntry } from "./index-BWWwt5hB.mjs";
|
|
4
|
+
import { l as RawCodecInferer } from "./expression-C3F6gxZH-EOb5cRCY.mjs";
|
|
5
|
+
import { t as ExpressionImpl } from "./expression-BWRsWR6O-HbWL9x9D.mjs";
|
|
6
|
+
import "./expression-OVCWlXHm.mjs";
|
|
7
|
+
import { s as createFunctions } from "./functions-PBSwFhni.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-D1d75IvM-C1lqD6a2.mjs";
|
|
9
|
+
import { a as SqlAggregateDescriptorRegistry, n as ExecutionContext } from "./query-lane-context-DLSXDsDK-CGSahS15.mjs";
|
|
10
|
+
import "./query-lane-context-DL6bwl6k.mjs";
|
|
11
11
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
12
12
|
//#region ../../../2-sql-family/4-lanes/sql-builder/dist/runtime/index.d.mts
|
|
13
13
|
//#region src/runtime/field-proxy.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
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-BkTuhW3Z-BJfTjcxS.mjs";
|
|
2
2
|
import { r as isAggregateProjection, t as collectOrderedParamRefs } from "./util-DixeJBri-Cad7x5ec.mjs";
|
|
3
|
-
import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, T as lockOptionCapabilities, w as lockIncompatible } from "./ast-
|
|
4
|
-
import { i as createRawSql, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-
|
|
5
|
-
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-
|
|
6
|
-
import { t as createFunctions } from "./functions-
|
|
3
|
+
import { D as lockWaitPolicyOf, E as lockStrengthCapabilities, T as lockOptionCapabilities, w as lockIncompatible } from "./ast-C3itulLi.mjs";
|
|
4
|
+
import { i as createRawSql, s as toExpr, t as ExpressionImpl } from "./expression-impl-DtbmFnnz-Dal0IYDE.mjs";
|
|
5
|
+
import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-UiFDvDj4.mjs";
|
|
6
|
+
import { t as createFunctions } from "./functions-DO1k8KLB.mjs";
|
|
7
7
|
import { t as createIndexReferences } from "./index-reference-BQSrkRfT.mjs";
|
|
8
8
|
import { assertAnnotationsApplicable } from "@prisma/orm-framework/components/runtime";
|
|
9
9
|
//#region ../../../2-sql-family/4-lanes/sql-builder/dist/runtime/index.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-
|
|
2
|
-
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-
|
|
3
|
-
import { t as IndexReference } from "./index-reference-YHvh6wAL-
|
|
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-D1d75IvM-
|
|
1
|
+
import { o as Expression, x as ScopeField } from "./expression-C3F6gxZH-EOb5cRCY.mjs";
|
|
2
|
+
import { a as Subquery, r as Functions, t as BooleanCodecType } from "./functions-PBSwFhni.mjs";
|
|
3
|
+
import { t as IndexReference } from "./index-reference-YHvh6wAL-BupQRpkE.mjs";
|
|
4
|
+
import "./index-reference-D3p5ziNG.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-D1d75IvM-C1lqD6a2.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 };
|
package/dist/{check-constraint-B7qGu6rc-Bk2ezWXu.d.mts → check-constraint-B7qGu6rc-D5kVe9je.d.mts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as SqlNode } from "./sql-node-kEz6YFZo-1ogT6Cxt.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as SqlObjectNaming } from "./naming-CLfASFf7-HRjmKe43.mjs";
|
|
3
3
|
//#region ../../../2-sql-family/1-core/contract/dist/check-constraint-B7qGu6rc.d.mts
|
|
4
4
|
//#region src/ir/check-constraint.d.ts
|
|
5
5
|
/**
|
|
@@ -41,4 +41,4 @@ declare class CheckConstraint extends SqlNode {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
export { CheckConstraintInput as n, CheckConstraint as t };
|
|
44
|
-
//# sourceMappingURL=check-constraint-B7qGu6rc-
|
|
44
|
+
//# sourceMappingURL=check-constraint-B7qGu6rc-D5kVe9je.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-constraint-B7qGu6rc-
|
|
1
|
+
{"version":3,"file":"check-constraint-B7qGu6rc-D5kVe9je.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/check-constraint-B7qGu6rc.d.mts"],"mappings":";;;;;;;;UAOU;;WAEC,QAAQ;;WAER;;;;;;;;;;;;;;;cAeG,wBAAwB;WAC3B;;WAEA;WACA;EACT,YAAY,OAAO;;;;;;;SAOZ,KAAK,OAAO,kBAAkB,uBAAuB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { t as contractError } from "./contract-errors-BCN6RVI5-DoH6b_KZ.mjs";
|
|
2
|
+
import { n as declaredJsonType } from "./codec-json-type-DUWyBtJk-BVTavkH0.mjs";
|
|
3
|
+
import { n as isStorageValueSet } from "./storage-value-set-uGUEBAMJ-hX-zFqN5.mjs";
|
|
4
|
+
import { valueObjectAt } from "@prisma/orm-framework/contract/types";
|
|
5
|
+
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
6
|
+
//#region ../../../2-sql-family/1-core/contract/dist/check-expressions.mjs
|
|
7
|
+
/**
|
|
8
|
+
* What the check of a column that holds a value object reads. The contract build and `contract print` both derive it here, so print recognises exactly the check the build writes.
|
|
9
|
+
*/
|
|
10
|
+
function resolveColumnValueObject(storage, column, codecs) {
|
|
11
|
+
return {
|
|
12
|
+
nullable: column.nullable,
|
|
13
|
+
many: column.many,
|
|
14
|
+
valueObject: resolveValueObject(storage, column.reference, codecs)
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The value set a discriminator column names (ADR 309): keyed `<Base>.<field>`, and holding the variants' values sorted, so the order variants are declared in does not change the storage hash. The contract build writes it and `contract print` compares a contract's value set with it.
|
|
19
|
+
*/
|
|
20
|
+
function discriminatorValueSet(baseModelName, discriminatorField, variantValues) {
|
|
21
|
+
return {
|
|
22
|
+
name: `${baseModelName}.${discriminatorField}`,
|
|
23
|
+
values: [...variantValues].sort()
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The value object a reference names, with nested value objects inlined, enum members' values read from their storage value sets, and each scalar member's JSON type read from its codec.
|
|
28
|
+
*/
|
|
29
|
+
function resolveValueObject(storage, reference, codecs) {
|
|
30
|
+
return resolveEntered(storage, reference, [referenceKey(reference)], codecs);
|
|
31
|
+
}
|
|
32
|
+
function resolveEntered(storage, reference, path, codecs) {
|
|
33
|
+
const valueObject = requiredValueObject(storage, reference);
|
|
34
|
+
return { fields: Object.fromEntries(Object.entries(valueObject.fields).map(([name, field]) => [name, {
|
|
35
|
+
nullable: field.nullable,
|
|
36
|
+
many: field.many ?? false,
|
|
37
|
+
type: resolveFieldType(storage, {
|
|
38
|
+
reference,
|
|
39
|
+
name,
|
|
40
|
+
field
|
|
41
|
+
}, path, codecs)
|
|
42
|
+
}])) };
|
|
43
|
+
}
|
|
44
|
+
function resolveFieldType(storage, member, path, codecs) {
|
|
45
|
+
const { field } = member;
|
|
46
|
+
const { type } = field;
|
|
47
|
+
invariant(type.kind !== "union" && field.dict !== true, "a SQL value object member is never a union or a dictionary");
|
|
48
|
+
if (type.kind === "scalar") return {
|
|
49
|
+
kind: "scalar",
|
|
50
|
+
jsonType: memberJsonType(member, type.codecId, codecs),
|
|
51
|
+
values: field.valueSet === void 0 ? void 0 : valueSetValues(storage, field.valueSet)
|
|
52
|
+
};
|
|
53
|
+
const key = referenceKey(type);
|
|
54
|
+
if (reachesAny(storage, type, new Set(path))) return { kind: "anyObject" };
|
|
55
|
+
return {
|
|
56
|
+
kind: "valueObject",
|
|
57
|
+
valueObject: resolveEntered(storage, type, [...path, key], codecs)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function memberJsonType(member, codecId, codecs) {
|
|
61
|
+
const descriptor = codecs.descriptorFor(codecId);
|
|
62
|
+
invariant(descriptor !== void 0, `value object member codec "${codecId}" is not a codec of the stack; the contract validators refuse a codec the stack does not register`);
|
|
63
|
+
const jsonType = declaredJsonType(descriptor);
|
|
64
|
+
if (jsonType !== void 0) return jsonType;
|
|
65
|
+
const valueObject = `${member.reference.namespaceId}:${member.reference.entityName}`;
|
|
66
|
+
throw contractError("CONTRACT.CODEC_JSON_TYPE_MISSING", `The codec "${codecId}" of value object "${valueObject}" member "${member.name}" declares no jsonType, so the check of the value object cannot be derived.`, {
|
|
67
|
+
why: "The check of a value object column requires each member to be of the JSON type its codec declares, and this codec declares none.",
|
|
68
|
+
fix: `The author of the codec "${codecId}" adds a jsonType to its descriptor, the JSON type its value is written as inside a JSON document.`,
|
|
69
|
+
meta: {
|
|
70
|
+
codecId,
|
|
71
|
+
valueObject,
|
|
72
|
+
member: member.name,
|
|
73
|
+
property: "jsonType"
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Whether `from` refers, through its own fields or nested ones, to a value object on the path being resolved. Each value object on the path refers to `from`, so this holds exactly when `from` is in a group of value objects that contain each other which the path has already entered.
|
|
79
|
+
*/
|
|
80
|
+
function reachesAny(storage, from, targets) {
|
|
81
|
+
const seen = /* @__PURE__ */ new Set();
|
|
82
|
+
const pending = [from];
|
|
83
|
+
for (let next = pending.pop(); next !== void 0; next = pending.pop()) {
|
|
84
|
+
const key = referenceKey(next);
|
|
85
|
+
if (targets.has(key)) return true;
|
|
86
|
+
if (seen.has(key)) continue;
|
|
87
|
+
seen.add(key);
|
|
88
|
+
for (const field of Object.values(requiredValueObject(storage, next).fields)) if (field.type.kind === "valueObject") pending.push(field.type);
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
function requiredValueObject(storage, reference) {
|
|
93
|
+
const valueObject = valueObjectAt(storage, reference);
|
|
94
|
+
invariant(valueObject !== void 0, `value object "${reference.entityName}" in namespace "${reference.namespaceId}" is not in storage; the contract validators refuse a reference to a missing value object`);
|
|
95
|
+
return valueObject;
|
|
96
|
+
}
|
|
97
|
+
function valueSetValues(storage, reference) {
|
|
98
|
+
const valueSet = Object.hasOwn(storage.namespaces, reference.namespaceId) ? storage.namespaces[reference.namespaceId]?.entries?.["valueSet"]?.[reference.entityName] : void 0;
|
|
99
|
+
invariant(isStorageValueSet(valueSet), `value set "${reference.entityName}" in namespace "${reference.namespaceId}" is not in storage; the contract validators refuse a value object member whose value set is missing`);
|
|
100
|
+
return valueSet.values.filter((value) => typeof value === "string" || typeof value === "number");
|
|
101
|
+
}
|
|
102
|
+
function referenceKey(reference) {
|
|
103
|
+
return JSON.stringify([reference.namespaceId, reference.entityName]);
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { resolveColumnValueObject as n, resolveValueObject as r, discriminatorValueSet as t };
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=check-expressions-BDsLvzqN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-expressions-BDsLvzqN.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/check-expressions.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { n as declaredJsonType } from \"./codec-json-type-DUWyBtJk.mjs\";\nimport { n as isStorageValueSet } from \"./storage-value-set-uGUEBAMJ.mjs\";\nimport { valueObjectAt } from \"@internal/contract/types\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/check-expressions.ts\n/**\n* What the check of a column that holds a value object reads. The contract build and `contract print` both derive it here, so print recognises exactly the check the build writes.\n*/\nfunction resolveColumnValueObject(storage, column, codecs) {\n\treturn {\n\t\tnullable: column.nullable,\n\t\tmany: column.many,\n\t\tvalueObject: resolveValueObject(storage, column.reference, codecs)\n\t};\n}\n/**\n* The value set a discriminator column names (ADR 309): keyed `<Base>.<field>`, and holding the variants' values sorted, so the order variants are declared in does not change the storage hash. The contract build writes it and `contract print` compares a contract's value set with it.\n*/\nfunction discriminatorValueSet(baseModelName, discriminatorField, variantValues) {\n\treturn {\n\t\tname: `${baseModelName}.${discriminatorField}`,\n\t\tvalues: [...variantValues].sort()\n\t};\n}\n/**\n* The value object a reference names, with nested value objects inlined, enum members' values read from their storage value sets, and each scalar member's JSON type read from its codec.\n*/\nfunction resolveValueObject(storage, reference, codecs) {\n\treturn resolveEntered(storage, reference, [referenceKey(reference)], codecs);\n}\nfunction resolveEntered(storage, reference, path, codecs) {\n\tconst valueObject = requiredValueObject(storage, reference);\n\treturn { fields: Object.fromEntries(Object.entries(valueObject.fields).map(([name, field]) => [name, {\n\t\tnullable: field.nullable,\n\t\tmany: field.many ?? false,\n\t\ttype: resolveFieldType(storage, {\n\t\t\treference,\n\t\t\tname,\n\t\t\tfield\n\t\t}, path, codecs)\n\t}])) };\n}\nfunction resolveFieldType(storage, member, path, codecs) {\n\tconst { field } = member;\n\tconst { type } = field;\n\tinvariant(type.kind !== \"union\" && field.dict !== true, \"a SQL value object member is never a union or a dictionary\");\n\tif (type.kind === \"scalar\") return {\n\t\tkind: \"scalar\",\n\t\tjsonType: memberJsonType(member, type.codecId, codecs),\n\t\tvalues: field.valueSet === void 0 ? void 0 : valueSetValues(storage, field.valueSet)\n\t};\n\tconst key = referenceKey(type);\n\tif (reachesAny(storage, type, new Set(path))) return { kind: \"anyObject\" };\n\treturn {\n\t\tkind: \"valueObject\",\n\t\tvalueObject: resolveEntered(storage, type, [...path, key], codecs)\n\t};\n}\nfunction memberJsonType(member, codecId, codecs) {\n\tconst descriptor = codecs.descriptorFor(codecId);\n\tinvariant(descriptor !== void 0, `value object member codec \"${codecId}\" is not a codec of the stack; the contract validators refuse a codec the stack does not register`);\n\tconst jsonType = declaredJsonType(descriptor);\n\tif (jsonType !== void 0) return jsonType;\n\tconst valueObject = `${member.reference.namespaceId}:${member.reference.entityName}`;\n\tthrow contractError(\"CONTRACT.CODEC_JSON_TYPE_MISSING\", `The codec \"${codecId}\" of value object \"${valueObject}\" member \"${member.name}\" declares no jsonType, so the check of the value object cannot be derived.`, {\n\t\twhy: \"The check of a value object column requires each member to be of the JSON type its codec declares, and this codec declares none.\",\n\t\tfix: `The author of the codec \"${codecId}\" adds a jsonType to its descriptor, the JSON type its value is written as inside a JSON document.`,\n\t\tmeta: {\n\t\t\tcodecId,\n\t\t\tvalueObject,\n\t\t\tmember: member.name,\n\t\t\tproperty: \"jsonType\"\n\t\t}\n\t});\n}\n/**\n* Whether `from` refers, through its own fields or nested ones, to a value object on the path being resolved. Each value object on the path refers to `from`, so this holds exactly when `from` is in a group of value objects that contain each other which the path has already entered.\n*/\nfunction reachesAny(storage, from, targets) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tconst pending = [from];\n\tfor (let next = pending.pop(); next !== void 0; next = pending.pop()) {\n\t\tconst key = referenceKey(next);\n\t\tif (targets.has(key)) return true;\n\t\tif (seen.has(key)) continue;\n\t\tseen.add(key);\n\t\tfor (const field of Object.values(requiredValueObject(storage, next).fields)) if (field.type.kind === \"valueObject\") pending.push(field.type);\n\t}\n\treturn false;\n}\nfunction requiredValueObject(storage, reference) {\n\tconst valueObject = valueObjectAt(storage, reference);\n\tinvariant(valueObject !== void 0, `value object \"${reference.entityName}\" in namespace \"${reference.namespaceId}\" is not in storage; the contract validators refuse a reference to a missing value object`);\n\treturn valueObject;\n}\nfunction valueSetValues(storage, reference) {\n\tconst valueSet = Object.hasOwn(storage.namespaces, reference.namespaceId) ? storage.namespaces[reference.namespaceId]?.entries?.[\"valueSet\"]?.[reference.entityName] : void 0;\n\tinvariant(isStorageValueSet(valueSet), `value set \"${reference.entityName}\" in namespace \"${reference.namespaceId}\" is not in storage; the contract validators refuse a value object member whose value set is missing`);\n\treturn valueSet.values.filter((value) => typeof value === \"string\" || typeof value === \"number\");\n}\nfunction referenceKey(reference) {\n\treturn JSON.stringify([reference.namespaceId, reference.entityName]);\n}\n//#endregion\nexport { discriminatorValueSet, resolveColumnValueObject, resolveValueObject };\n\n//# sourceMappingURL=check-expressions.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,SAAS,QAAQ,QAAQ;CAC1D,OAAO;EACN,UAAU,OAAO;EACjB,MAAM,OAAO;EACb,aAAa,mBAAmB,SAAS,OAAO,WAAW,MAAM;CAClE;AACD;;;;AAIA,SAAS,sBAAsB,eAAe,oBAAoB,eAAe;CAChF,OAAO;EACN,MAAM,GAAG,cAAc,GAAG;EAC1B,QAAQ,CAAC,GAAG,aAAa,CAAC,CAAC,KAAK;CACjC;AACD;;;;AAIA,SAAS,mBAAmB,SAAS,WAAW,QAAQ;CACvD,OAAO,eAAe,SAAS,WAAW,CAAC,aAAa,SAAS,CAAC,GAAG,MAAM;AAC5E;AACA,SAAS,eAAe,SAAS,WAAW,MAAM,QAAQ;CACzD,MAAM,cAAc,oBAAoB,SAAS,SAAS;CAC1D,OAAO,EAAE,QAAQ,OAAO,YAAY,OAAO,QAAQ,YAAY,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,WAAW,CAAC,MAAM;EACpG,UAAU,MAAM;EAChB,MAAM,MAAM,QAAQ;EACpB,MAAM,iBAAiB,SAAS;GAC/B;GACA;GACA;EACD,GAAG,MAAM,MAAM;CAChB,CAAC,CAAC,CAAC,EAAE;AACN;AACA,SAAS,iBAAiB,SAAS,QAAQ,MAAM,QAAQ;CACxD,MAAM,EAAE,UAAU;CAClB,MAAM,EAAE,SAAS;CACjB,UAAU,KAAK,SAAS,WAAW,MAAM,SAAS,MAAM,4DAA4D;CACpH,IAAI,KAAK,SAAS,UAAU,OAAO;EAClC,MAAM;EACN,UAAU,eAAe,QAAQ,KAAK,SAA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ACR;AACA,SAAS,oBAAoB,SAAS,WAAW;CAChD,MAAM,cAAc,cAAc,SAAS,SAAS;CACpD,UAAU,gBAAgB,KAAK,GAAG,iBAAiB,UAAU,WAAW,kBAAkB,UAAU,YAAY,0FAA0F;CAC1M,OAAO;AACR;AACA,SAAS,eAAe,SAAS,WAAW;CAC3C,MAAM,WAAW,OAAO,OAAO,QAAQ,YAAY,UAAU,WAAW,IAAI,QAAQ,WAAW,UAAU,YAAY,EAAE,UAAU,WAAW,GAAG,UAAU,cAAc,KAAK;CAC5K,UAAU,kBAAkB,QAAQ,GAAG,cAAc,UAAU,WAAW,kBAAkB,UAAU,YAAY,qGAAqG;CACvN,OAAO,SAAS,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,UAAU,QAAQ;AAChG;AACA,SAAS,aAAa,WAAW;CAChC,OAAO,KAAK,UAAU,CAAC,UAAU,aAAa,UAAU,UAAU,CAAC;AACpE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { n as CheckKind } from "./naming-CLfASFf7-HRjmKe43.mjs";
|
|
2
|
+
import { n as JsonType } from "./codec-json-type-BdWPJ6T5-BhmIyNyb.mjs";
|
|
3
|
+
import { EntityCoordinate, StorageBase } from "@prisma/orm-framework/contract/types";
|
|
4
|
+
import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
|
|
5
|
+
//#region ../../../2-sql-family/1-core/contract/dist/check-expressions.d.mts
|
|
6
|
+
//#region src/check-expressions.d.ts
|
|
7
|
+
type CodecDescriptors = Pick<CodecLookupWithDescriptors, 'descriptorFor'>;
|
|
8
|
+
/** A value object with each nested value object inlined, as the target's check renderer reads it. */
|
|
9
|
+
interface ResolvedValueObject {
|
|
10
|
+
readonly fields: Readonly<Record<string, ResolvedValueObjectField>>;
|
|
11
|
+
}
|
|
12
|
+
interface ResolvedValueObjectField {
|
|
13
|
+
readonly nullable: boolean;
|
|
14
|
+
readonly many: false | {
|
|
15
|
+
readonly elementNullable: boolean;
|
|
16
|
+
};
|
|
17
|
+
readonly type: ResolvedValueObjectFieldType;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `jsonType` is the JSON type the member's codec declares. `values` holds the stored values of the value set an enum member refers to. `anyObject` stands where a value object that contains itself refers back into itself: any object is accepted there, as the MongoDB validator does.
|
|
21
|
+
*/
|
|
22
|
+
type ResolvedValueObjectFieldType = {
|
|
23
|
+
readonly kind: 'scalar';
|
|
24
|
+
readonly jsonType: JsonType;
|
|
25
|
+
readonly values: readonly (string | number)[] | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
readonly kind: 'valueObject';
|
|
28
|
+
readonly valueObject: ResolvedValueObject;
|
|
29
|
+
} | {
|
|
30
|
+
readonly kind: 'anyObject';
|
|
31
|
+
};
|
|
32
|
+
/** One column's shape, as the contract builder hands it to a target's check renderer. */
|
|
33
|
+
interface CheckExpressionInput {
|
|
34
|
+
readonly tableName: string;
|
|
35
|
+
readonly columnName: string;
|
|
36
|
+
readonly many: false | {
|
|
37
|
+
readonly elementNullable: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** The values a column typed by a domain enum, or a discriminator column, may hold. */
|
|
40
|
+
readonly memberValues: readonly (string | number)[] | undefined;
|
|
41
|
+
/** The value object the column holds, or `undefined` when it holds none. */
|
|
42
|
+
readonly valueObject: ResolvedColumnValueObject | undefined;
|
|
43
|
+
}
|
|
44
|
+
/** The value object a column holds, with the column's nullability, and whether the column's JSON value is an array of them. */
|
|
45
|
+
interface ResolvedColumnValueObject {
|
|
46
|
+
readonly nullable: boolean;
|
|
47
|
+
readonly many: false | {
|
|
48
|
+
readonly elementNullable: boolean;
|
|
49
|
+
};
|
|
50
|
+
readonly valueObject: ResolvedValueObject;
|
|
51
|
+
}
|
|
52
|
+
/** A check the target wants written: what it enforces, the column it constrains, and the predicate body without the surrounding `CHECK (…)`. The family names it. */
|
|
53
|
+
interface CheckExpressionCandidate {
|
|
54
|
+
readonly kind: CheckKind;
|
|
55
|
+
readonly columnName: string;
|
|
56
|
+
readonly expression: string;
|
|
57
|
+
}
|
|
58
|
+
type CheckExpressionRenderer = (input: CheckExpressionInput) => ReadonlyArray<CheckExpressionCandidate>;
|
|
59
|
+
/**
|
|
60
|
+
* What the check of a column that holds a value object reads. The contract build and `contract print` both derive it here, so print recognises exactly the check the build writes.
|
|
61
|
+
*/
|
|
62
|
+
declare function resolveColumnValueObject(storage: Pick<StorageBase, 'namespaces'>, column: {
|
|
63
|
+
readonly reference: EntityCoordinate<'storage', 'valueObject'>;
|
|
64
|
+
readonly nullable: boolean;
|
|
65
|
+
readonly many: false | {
|
|
66
|
+
readonly elementNullable: boolean;
|
|
67
|
+
};
|
|
68
|
+
}, codecs: CodecDescriptors): ResolvedColumnValueObject;
|
|
69
|
+
/**
|
|
70
|
+
* The value set a discriminator column names (ADR 309): keyed `<Base>.<field>`, and holding the variants' values sorted, so the order variants are declared in does not change the storage hash. The contract build writes it and `contract print` compares a contract's value set with it.
|
|
71
|
+
*/
|
|
72
|
+
declare function discriminatorValueSet(baseModelName: string, discriminatorField: string, variantValues: readonly string[]): {
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly values: readonly string[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* The value object a reference names, with nested value objects inlined, enum members' values read from their storage value sets, and each scalar member's JSON type read from its codec.
|
|
78
|
+
*/
|
|
79
|
+
declare function resolveValueObject(storage: Pick<StorageBase, 'namespaces'>, reference: EntityCoordinate<'storage', 'valueObject'>, codecs: CodecDescriptors): ResolvedValueObject;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { ResolvedValueObject as a, discriminatorValueSet as c, ResolvedColumnValueObject as i, resolveColumnValueObject as l, CheckExpressionInput as n, ResolvedValueObjectField as o, CheckExpressionRenderer as r, ResolvedValueObjectFieldType as s, CheckExpressionCandidate as t, resolveValueObject as u };
|
|
82
|
+
//# sourceMappingURL=check-expressions-DuWjvG4h.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-expressions-DuWjvG4h.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/check-expressions.d.mts"],"mappings":";;;;;;KAKK,mBAAmB,KAAK;;UAEnB;WACC,QAAQ,SAAS,eAAe;;UAEjC;WACC;WACA;aACE;;WAEF,MAAM;;;;;KAKZ;WACM;WACA,UAAU;WACV;;WAEA;WACA,aAAa;;WAEb;;;UAGD;WACC;WACA;WACA;aACE;;;WAGF;;WAEA,aAAa;;;UAGd;WACC;WACA;aACE;;WAEF,aAAa;;;UAGd;WACC,MAAM;WACN;WACA;;KAEN,2BAA2B,OAAO,yBAAyB,cAAc;;;;iBAI7D,yBAAyB,SAAS,KAAK,4BAA4B;WACzE,WAAW;WACX;WACA;aACE;;GAEV,QAAQ,mBAAmB;;;;iBAIb,sBAAsB,uBAAuB,4BAA4B;WAC/E;WACA;;;;;iBAKM,mBAAmB,SAAS,KAAK,4BAA4B,WAAW,4CAA4C,QAAQ,mBAAmB"}
|
package/dist/{codec-descriptor-registry-CiiFzMtb.mjs → codec-descriptor-registry-UiFDvDj4.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-BHLQsOza.mjs";
|
|
2
|
-
import { d as nonEmptyTypeParams } from "./types-
|
|
2
|
+
import { d as nonEmptyTypeParams } from "./types-CISwoRED.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-family/4-lanes/relational-core/dist/exports/codec-descriptor-registry.mjs
|
|
@@ -66,4 +66,4 @@ function buildCodecDescriptorRegistry(allDescriptors, storage) {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
export { codecRefForStorageColumn as n, buildCodecDescriptorRegistry as t };
|
|
68
68
|
|
|
69
|
-
//# sourceMappingURL=codec-descriptor-registry-
|
|
69
|
+
//# sourceMappingURL=codec-descriptor-registry-UiFDvDj4.mjs.map
|