@prisma/orm-family-sql 8.0.0-rc.14-dev.35 → 8.0.0-rc.14-dev.37
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-CQZn-6Wd.mjs → ast-B2W9tHy1.mjs} +6 -6
- package/dist/ast-B2W9tHy1.mjs.map +1 -0
- package/dist/{ast-BUbHXpzG.d.mts → ast-DgUdnFtz.d.mts} +4 -4
- package/dist/{ast-BUbHXpzG.d.mts.map → ast-DgUdnFtz.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-C25VGQVB.d.mts → authoring-entity-types-CZ-vdwYS-BDKo-VHB.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-C25VGQVB.d.mts.map → authoring-entity-types-CZ-vdwYS-BDKo-VHB.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-dihiQslc-hldmqa1r.mjs → authoring-type-constructors-dihiQslc-BcIPoPEn.mjs} +2 -2
- package/dist/{authoring-type-constructors-dihiQslc-hldmqa1r.mjs.map → authoring-type-constructors-dihiQslc-BcIPoPEn.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-BW0REwkz.mjs → codec-descriptor-registry-DoGFktu5.mjs} +2 -2
- package/dist/{codec-descriptor-registry-BW0REwkz.mjs.map → codec-descriptor-registry-DoGFktu5.mjs.map} +1 -1
- package/dist/{config-types-ump1oN82.mjs → config-types-BvoqAKkw.mjs} +2 -2
- package/dist/{config-types-ump1oN82.mjs.map → config-types-BvoqAKkw.mjs.map} +1 -1
- package/dist/{config-types-Dxhmk983.d.mts → config-types-LClcQOkt.d.mts} +4 -4
- package/dist/{config-types-Dxhmk983.d.mts.map → config-types-LClcQOkt.d.mts.map} +1 -1
- package/dist/{contract-builder-CQvwPGAW.mjs → contract-builder-BRrG-DWN.mjs} +7 -8
- package/dist/contract-builder-BRrG-DWN.mjs.map +1 -0
- package/dist/{contract-builder-BXxFihYc.d.mts → contract-builder-DoT-AH8l.d.mts} +24 -27
- package/dist/{contract-builder-BXxFihYc.d.mts.map → contract-builder-DoT-AH8l.d.mts.map} +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +4 -4
- package/dist/contract-psl.d.mts +3 -3
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -2
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- 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-CH3F_tqg.d.mts → contract-view-Cd6_tdxU.d.mts} +2 -2
- package/dist/{contract-view-CH3F_tqg.d.mts.map → contract-view-Cd6_tdxU.d.mts.map} +1 -1
- package/dist/contract.d.mts +12 -13
- package/dist/contract.mjs +8 -8
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__data-type-support.d.mts +1 -1
- package/dist/contract__data-type-support.mjs +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__index-type-validation.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +5 -5
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +3 -3
- package/dist/{control-AYMohAq_.mjs → control-C4PkND9K.mjs} +151 -91
- package/dist/control-C4PkND9K.mjs.map +1 -0
- package/dist/control-adapter-BoQobwpe.d.mts +1 -0
- package/dist/{control-adapter-BVN98SzR-C-H_T7s-.d.mts → control-adapter-CkFfBVei-N-jSb9WR.d.mts} +19 -11
- package/dist/{control-adapter-BVN98SzR-C-H_T7s-.d.mts.map → control-adapter-CkFfBVei-N-jSb9WR.d.mts.map} +1 -1
- package/dist/{control-Bpk8PtSL.d.mts → control-qkDZstn6.d.mts} +24 -27
- package/dist/control-qkDZstn6.d.mts.map +1 -0
- package/dist/{data-type-support-rpD1jyZd.mjs → data-type-support-DeL6iJt8.mjs} +2 -2
- package/dist/{data-type-support-rpD1jyZd.mjs.map → data-type-support-DeL6iJt8.mjs.map} +1 -1
- package/dist/{data-type-support-B_Dr1cxB.d.mts → data-type-support-DoxtCfXq.d.mts} +3 -3
- package/dist/{data-type-support-B_Dr1cxB.d.mts.map → data-type-support-DoxtCfXq.d.mts.map} +1 -1
- package/dist/{db-DLjWu9-f-T8QbxDGY.d.mts → db-DLjWu9-f-ldboYM8A.d.mts} +9 -9
- package/dist/{db-DLjWu9-f-T8QbxDGY.d.mts.map → db-DLjWu9-f-ldboYM8A.d.mts.map} +1 -1
- package/dist/{ddl-types-BUqZdoZK-vyWnW2PW.d.mts → ddl-types-CWIiJxsH-BixiHVIr.d.mts} +5 -24
- package/dist/ddl-types-CWIiJxsH-BixiHVIr.d.mts.map +1 -0
- package/dist/{derived-checks-CILnJKoa-D42YRW01.mjs → derived-checks-CsB3zLJ--C7ymzzbW.mjs} +14 -17
- package/dist/derived-checks-CsB3zLJ--C7ymzzbW.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-BSShXJmp.d.mts → derived-checks-DPdD01O0-CABDLeK0.d.mts} +3 -3
- package/dist/{derived-checks-DPdD01O0-BSShXJmp.d.mts.map → derived-checks-DPdD01O0-CABDLeK0.d.mts.map} +1 -1
- package/dist/diff-B16bL_IR.mjs.map +1 -1
- package/dist/{diff-BsHizC0z.d.mts → diff-B1ThXQkW.d.mts} +8 -8
- package/dist/{diff-BsHizC0z.d.mts.map → diff-B1ThXQkW.d.mts.map} +1 -1
- package/dist/{dist-C_HYPisk.mjs → dist-ljGeuCdK.mjs} +8 -8
- package/dist/dist-ljGeuCdK.mjs.map +1 -0
- package/dist/{driver-types-DYGFEcyv-DPaNalPf.d.mts → driver-types-DRsYeq3j-X_D6hNMZ.d.mts} +8 -2
- package/dist/driver-types-DRsYeq3j-X_D6hNMZ.d.mts.map +1 -0
- package/dist/{entity-kinds-DRPMASi3.d.mts → entity-kinds-DCwkg9t7.d.mts} +2 -2
- package/dist/{entity-kinds-DRPMASi3.d.mts.map → entity-kinds-DCwkg9t7.d.mts.map} +1 -1
- package/dist/{entity-kinds-BNQFeECV-BOJmOArY.mjs → entity-kinds-JlqzyFoo-BR7NtlZL.mjs} +6 -5
- package/dist/entity-kinds-JlqzyFoo-BR7NtlZL.mjs.map +1 -0
- package/dist/{expression-Bf_MkeQS.d.mts → expression-o74FOqh6.d.mts} +8 -8
- package/dist/{expression-Bf_MkeQS.d.mts.map → expression-o74FOqh6.d.mts.map} +1 -1
- package/dist/{factories-Di9PoiQh.d.mts → factories-CgVRbL8l.d.mts} +4 -4
- package/dist/{factories-Di9PoiQh.d.mts.map → factories-CgVRbL8l.d.mts.map} +1 -1
- package/dist/{factories-D6haP7by.mjs → factories-WPleYaty.mjs} +4 -4
- package/dist/factories-WPleYaty.mjs.map +1 -0
- package/dist/family.d.mts +15 -15
- package/dist/family.mjs +5 -5
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{index-D2ho4por.d.mts → index-DCKjTi7L.d.mts} +11 -11
- package/dist/{index-D2ho4por.d.mts.map → index-DCKjTi7L.d.mts.map} +1 -1
- package/dist/{index-DZbfFGBA.d.mts → index-qOLTnfYz.d.mts} +3 -3
- package/dist/{index-DZbfFGBA.d.mts.map → index-qOLTnfYz.d.mts.map} +1 -1
- package/dist/{index-type-validation-9yBRmaQK.d.mts → index-type-validation-BHppm9U-.d.mts} +3 -3
- package/dist/{index-type-validation-9yBRmaQK.d.mts.map → index-type-validation-BHppm9U-.d.mts.map} +1 -1
- package/dist/{interpreter-Cn_CHpKv-V5WRLkBQ.mjs → interpreter-D50jf6Dd-DQMtcGPt.mjs} +24 -16
- package/dist/interpreter-D50jf6Dd-DQMtcGPt.mjs.map +1 -0
- package/dist/{ir-D7wRE9X4.d.mts → ir-BYHqe2mj.d.mts} +3 -3
- package/dist/{ir-D7wRE9X4.d.mts.map → ir-BYHqe2mj.d.mts.map} +1 -1
- package/dist/ir-I-xciGUH.mjs.map +1 -1
- package/dist/middleware-Bn2R6ocx.d.mts +1 -0
- package/dist/{middleware-BtMX6nSF-DUnzMyGl.d.mts → middleware-BtMX6nSF-DM55ZeCo.d.mts} +2 -2
- package/dist/{middleware-BtMX6nSF-DUnzMyGl.d.mts.map → middleware-BtMX6nSF-DM55ZeCo.d.mts.map} +1 -1
- package/dist/{migration-oet2BBxc.d.mts → migration-DV5extx2.d.mts} +4 -4
- package/dist/{migration-oet2BBxc.d.mts.map → migration-DV5extx2.d.mts.map} +1 -1
- package/dist/{opaque-sql-CwvHZSr8-Ch9goXqx.mjs → opaque-sql-BWxbqe5a-GGKfyakq.mjs} +2 -8
- package/dist/opaque-sql-BWxbqe5a-GGKfyakq.mjs.map +1 -0
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +15 -15
- package/dist/orm-client.mjs +2 -2
- package/dist/{pack-C-JTs3HQ.d.mts → pack-B-_m58dV.d.mts} +2 -2
- package/dist/{pack-C-JTs3HQ.d.mts.map → pack-B-_m58dV.d.mts.map} +1 -1
- package/dist/{plan-BlQITcbP-DvbDlHXA.d.mts → plan-BlQITcbP-B2q80evU.d.mts} +4 -4
- package/dist/{plan-BlQITcbP-DvbDlHXA.d.mts.map → plan-BlQITcbP-B2q80evU.d.mts.map} +1 -1
- package/dist/plan-D11FmUVM.d.mts +2 -0
- package/dist/{prepared-statement-Cv54gpY_-dg9Qr8sK.d.mts → prepared-statement-YtgdlN7e-BryEFERH.d.mts} +26 -19
- package/dist/{prepared-statement-Cv54gpY_-dg9Qr8sK.d.mts.map → prepared-statement-YtgdlN7e-BryEFERH.d.mts.map} +1 -1
- package/dist/{psl-build-B6nw6MAM.mjs → psl-build-C1P-sV0c.mjs} +12 -10
- package/dist/psl-build-C1P-sV0c.mjs.map +1 -0
- package/dist/{psl-build-BrW7lQMO.d.mts → psl-build-ClK2AyY1.d.mts} +2 -2
- package/dist/psl-build-ClK2AyY1.d.mts.map +1 -0
- package/dist/{psl-column-resolution-BegCa1-t-BJJ9WB1c.d.mts → psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts} +2 -2
- package/dist/{psl-column-resolution-BegCa1-t-BJJ9WB1c.d.mts.map → psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-Bf8vUaoK-CanSt2s1.mjs → psl-field-resolution-Bi-CSeoQ-BjACY_53.mjs} +105 -22
- package/dist/psl-field-resolution-Bi-CSeoQ-BjACY_53.mjs.map +1 -0
- package/dist/{psl-infer-DzH2Khty.d.mts → psl-infer-B91bSSdN.d.mts} +4 -4
- package/dist/{psl-infer-DzH2Khty.d.mts.map → psl-infer-B91bSSdN.d.mts.map} +1 -1
- package/dist/{query-lane-context-OSV9X636-CcPv1TZj.d.mts → query-lane-context-OSV9X636-DFRkNeXq.d.mts} +5 -5
- package/dist/{query-lane-context-OSV9X636-CcPv1TZj.d.mts.map → query-lane-context-OSV9X636-DFRkNeXq.d.mts.map} +1 -1
- package/dist/query-lane-context-SRmvD9-J.d.mts +1 -0
- package/dist/relational-core.d.mts +13 -13
- package/dist/relational-core.mjs +2 -2
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +5 -5
- package/dist/relational-core__ast.mjs +2 -2
- 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 +3 -3
- package/dist/relational-core__contract-free.mjs +1 -1
- package/dist/relational-core__contract-free.mjs.map +1 -1
- 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-GpIWDdpo.d.mts → resolve-storage-table-Ba33K41A.d.mts} +3 -3
- package/dist/{resolve-storage-table-GpIWDdpo.d.mts.map → resolve-storage-table-Ba33K41A.d.mts.map} +1 -1
- package/dist/{runtime-BbhrIR5H.d.mts → runtime-BUemUdMk.d.mts} +2 -2
- package/dist/{runtime-BbhrIR5H.d.mts.map → runtime-BUemUdMk.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +87 -45
- package/dist/runtime.mjs.map +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DpG_gnur-if2KDxZC.d.mts → schema-differ-CqWOkoW9--uxNOini.d.mts} +6 -6
- package/dist/{schema-differ-DpG_gnur-if2KDxZC.d.mts.map → schema-differ-CqWOkoW9--uxNOini.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-lPfqY_aE-CZCO8my1.mjs → schema-verify-DIfHSB4I-BK55V2WO.mjs} +3 -3
- package/dist/{schema-verify-lPfqY_aE-CZCO8my1.mjs.map → schema-verify-DIfHSB4I-BK55V2WO.mjs.map} +1 -1
- package/dist/{serialized-index-BeGqqsrC-PymnV1h-.mjs → serialized-index-QAYy0fjm-BW4shnLC.mjs} +3 -3
- package/dist/{serialized-index-BeGqqsrC-PymnV1h-.mjs.map → serialized-index-QAYy0fjm-BW4shnLC.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-C90xg7_q-4UVEMTWO.mjs → sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs} +6 -6
- package/dist/sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs.map +1 -0
- package/dist/{sql-execution-plan-CV6K4o9N-DAIvJbkb.d.mts → sql-execution-plan-CV6K4o9N-B3EzlMwJ.d.mts} +2 -2
- package/dist/{sql-execution-plan-CV6K4o9N-DAIvJbkb.d.mts.map → sql-execution-plan-CV6K4o9N-B3EzlMwJ.d.mts.map} +1 -1
- package/dist/{sql-storage-jJySr7bL-C_xAiyzH.d.mts → sql-storage-DSnnRQAf-DaHPnley.d.mts} +13 -20
- package/dist/sql-storage-DSnnRQAf-DaHPnley.d.mts.map +1 -0
- package/dist/{storage-table-DLFvP77v-DLfqYsHX.d.mts → storage-table-BBcKoAuF-CssyCQhM.d.mts} +5 -4
- package/dist/storage-table-BBcKoAuF-CssyCQhM.d.mts.map +1 -0
- package/dist/{storage-table-BwwDKQkD-BN9cZrGX.mjs → storage-table-CyL4CNMi-zOQ-vTUd.mjs} +4 -4
- package/dist/{storage-table-BwwDKQkD-BN9cZrGX.mjs.map → storage-table-CyL4CNMi-zOQ-vTUd.mjs.map} +1 -1
- package/dist/{type-map-DmIbL4o--BfPMblbZ.d.mts → type-map-dnvRKl9o-avUb9OLv.d.mts} +5 -5
- package/dist/type-map-dnvRKl9o-avUb9OLv.d.mts.map +1 -0
- package/dist/types-Bb6De1yt.d.mts +1 -0
- package/dist/{types-Cn4JEguu.mjs → types-BlcZJEoC.mjs} +4 -4
- package/dist/types-BlcZJEoC.mjs.map +1 -0
- package/dist/{types-Da1Y_OI7-BPyFwdFU.d.mts → types-CLsPsUiw-Db1BsN9R.d.mts} +25 -19
- package/dist/types-CLsPsUiw-Db1BsN9R.d.mts.map +1 -0
- package/dist/{types-CcGO_LSh-BKHiJvvA.d.mts → types-CvuS68sy-CIYfMFuu.d.mts} +10 -11
- package/dist/{types-CcGO_LSh-BKHiJvvA.d.mts.map → types-CvuS68sy-CIYfMFuu.d.mts.map} +1 -1
- package/dist/types-D6XuABFQ.d.mts +1 -0
- package/dist/{types-Bl6ohp1g-CL4_GDuc.d.mts → types-DV040Uuq-Bu8CnbMa.d.mts} +4 -4
- package/dist/{types-Bl6ohp1g-CL4_GDuc.d.mts.map → types-DV040Uuq-Bu8CnbMa.d.mts.map} +1 -1
- package/dist/{types-CyPuXMTn-pumFirZ6.mjs → types-D_7dH1ie-CN5Dgmgh.mjs} +17 -16
- package/dist/types-D_7dH1ie-CN5Dgmgh.mjs.map +1 -0
- package/dist/{types-B11MGgKr.d.mts → types-DkOYK86-.d.mts} +4 -4
- package/dist/{types-B11MGgKr.d.mts.map → types-DkOYK86-.d.mts.map} +1 -1
- package/dist/{types-Dskga3R1-BtXuRmbf.d.mts → types-Dskga3R1-DeSwpS4A.d.mts} +2 -2
- package/dist/{types-Dskga3R1-BtXuRmbf.d.mts.map → types-Dskga3R1-DeSwpS4A.d.mts.map} +1 -1
- package/dist/{types-DpwLgzPO-Cb9nQ-Wt.d.mts → types-flbim7l7-BbzcJZpz.d.mts} +12 -12
- package/dist/{types-DpwLgzPO-Cb9nQ-Wt.d.mts.map → types-flbim7l7-BbzcJZpz.d.mts.map} +1 -1
- package/dist/{validators-IGdAEEIM.mjs → validators-BF_JSK38.mjs} +50 -27
- package/dist/validators-BF_JSK38.mjs.map +1 -0
- package/dist/{validators-B-4g3vwP.d.mts → validators-BLkHaNpd.d.mts} +10 -8
- package/dist/{validators-B-4g3vwP.d.mts.map → validators-BLkHaNpd.d.mts.map} +1 -1
- package/package.json +18 -19
- package/dist/ast-CQZn-6Wd.mjs.map +0 -1
- package/dist/contract-builder-CQvwPGAW.mjs.map +0 -1
- package/dist/contract__pack-types.d.mts +0 -2
- package/dist/contract__pack-types.mjs +0 -1
- package/dist/control-AYMohAq_.mjs.map +0 -1
- package/dist/control-Bpk8PtSL.d.mts.map +0 -1
- package/dist/control-adapter-DSGwSagr.d.mts +0 -1
- package/dist/ddl-types-BUqZdoZK-vyWnW2PW.d.mts.map +0 -1
- package/dist/derived-checks-CILnJKoa-D42YRW01.mjs.map +0 -1
- package/dist/dist-C_HYPisk.mjs.map +0 -1
- package/dist/driver-types-DYGFEcyv-DPaNalPf.d.mts.map +0 -1
- package/dist/entity-kinds-BNQFeECV-BOJmOArY.mjs.map +0 -1
- package/dist/factories-D6haP7by.mjs.map +0 -1
- package/dist/interpreter-Cn_CHpKv-V5WRLkBQ.mjs.map +0 -1
- package/dist/middleware-pBMsszaq.d.mts +0 -1
- package/dist/opaque-sql-CwvHZSr8-Ch9goXqx.mjs.map +0 -1
- package/dist/pack-types-BcLTpwbv.d.mts +0 -14
- package/dist/pack-types-BcLTpwbv.d.mts.map +0 -1
- package/dist/plan-BbkBYyGR.d.mts +0 -2
- package/dist/psl-build-B6nw6MAM.mjs.map +0 -1
- package/dist/psl-build-BrW7lQMO.d.mts.map +0 -1
- package/dist/psl-field-resolution-Bf8vUaoK-CanSt2s1.mjs.map +0 -1
- package/dist/query-lane-context-CLtywrTY.d.mts +0 -1
- package/dist/sql-contract-serializer-C90xg7_q-4UVEMTWO.mjs.map +0 -1
- package/dist/sql-storage-jJySr7bL-C_xAiyzH.d.mts.map +0 -1
- package/dist/storage-table-DLFvP77v-DLfqYsHX.d.mts.map +0 -1
- package/dist/type-map-DmIbL4o--BfPMblbZ.d.mts.map +0 -1
- package/dist/types-Cn4JEguu.mjs.map +0 -1
- package/dist/types-CyPuXMTn-pumFirZ6.mjs.map +0 -1
- package/dist/types-DZA5xxDT.d.mts +0 -1
- package/dist/types-Da1Y_OI7-BPyFwdFU.d.mts.map +0 -1
- package/dist/types-QvcS13Qc.d.mts +0 -1
- package/dist/validators-IGdAEEIM.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-BlQITcbP-
|
|
1
|
+
{"version":3,"file":"plan-BlQITcbP-B2q80evU.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/plan-BlQITcbP.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;UAED,WAAW,OAAO;WACjB,MAAM,aAAa;EAC5B,QAAQ,MAAM,oBAAoB,SAAS;;;;;;;;;;;;;;;;;;;;iBAoB5B,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
3
|
-
import { r as SqlOperationDescriptors } from "./index-
|
|
4
|
-
import { At as SqlCodecCallContext, E as CodecRef$1, S as Codec$1, dt as LoweredStatement, h as AnyQueryAst, k as ContractCodecRegistry, ut as LoweredParam } from "./types-Dskga3R1-
|
|
5
|
-
import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConnection } from "./driver-types-
|
|
6
|
-
import { c as MarkerReadResult, t as Adapter } from "./ast-
|
|
7
|
-
import { n as SqlQueryPlan } from "./plan-BlQITcbP-
|
|
8
|
-
import { a as CodecValue, i as CodecTypesBase, l as RawCodecInferer, o as Expression, t as AffectedCount } from "./expression-
|
|
9
|
-
import { t as SqlExecutionPlan } from "./sql-execution-plan-CV6K4o9N-
|
|
10
|
-
import "./plan-
|
|
11
|
-
import { n as ExecutionContext } from "./query-lane-context-OSV9X636-
|
|
12
|
-
import "./query-lane-context-
|
|
13
|
-
import { h as RuntimeScope } from "./types-
|
|
14
|
-
import "./types-
|
|
15
|
-
import { i as SqlParamRefMutator } from "./middleware-BtMX6nSF-
|
|
16
|
-
import "./middleware-
|
|
1
|
+
import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
|
|
2
|
+
import "./types-DkOYK86-.mjs";
|
|
3
|
+
import { r as SqlOperationDescriptors } from "./index-qOLTnfYz.mjs";
|
|
4
|
+
import { At as SqlCodecCallContext, E as CodecRef$1, S as Codec$1, dt as LoweredStatement, h as AnyQueryAst, k as ContractCodecRegistry, ut as LoweredParam } from "./types-Dskga3R1-DeSwpS4A.mjs";
|
|
5
|
+
import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConnection, u as SqlTransaction } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
|
|
6
|
+
import { c as MarkerReadResult, t as Adapter } from "./ast-DgUdnFtz.mjs";
|
|
7
|
+
import { n as SqlQueryPlan } from "./plan-BlQITcbP-B2q80evU.mjs";
|
|
8
|
+
import { a as CodecValue, i as CodecTypesBase, l as RawCodecInferer, o as Expression, t as AffectedCount } from "./expression-o74FOqh6.mjs";
|
|
9
|
+
import { t as SqlExecutionPlan } from "./sql-execution-plan-CV6K4o9N-B3EzlMwJ.mjs";
|
|
10
|
+
import "./plan-D11FmUVM.mjs";
|
|
11
|
+
import { n as ExecutionContext } from "./query-lane-context-OSV9X636-DFRkNeXq.mjs";
|
|
12
|
+
import "./query-lane-context-SRmvD9-J.mjs";
|
|
13
|
+
import { h as RuntimeScope } from "./types-flbim7l7-BbzcJZpz.mjs";
|
|
14
|
+
import "./types-Bb6De1yt.mjs";
|
|
15
|
+
import { i as SqlParamRefMutator } from "./middleware-BtMX6nSF-DM55ZeCo.mjs";
|
|
16
|
+
import "./middleware-Bn2R6ocx.mjs";
|
|
17
17
|
import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
|
|
18
18
|
import { Contract, JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
|
|
19
19
|
import { AfterExecuteResult, AfterQueryResult, AsyncIterableResult, ExecuteInterceptResult, ExecutionPlan, MutationDefaultGeneratorContributor, QueryInterceptResult, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeMiddleware, RuntimeMiddlewareContext } from "@prisma/orm-framework/components/runtime";
|
|
20
20
|
import { ExecutionStack, RuntimeAdapterDescriptor, RuntimeAdapterInstance, RuntimeDriverDescriptor, RuntimeDriverInstance, RuntimeExtensionDescriptor, RuntimeExtensionInstance, RuntimeTargetDescriptor, RuntimeTargetInstance } from "@prisma/orm-framework/components/execution";
|
|
21
|
-
//#region ../../../2-sql/5-runtime/dist/prepared-statement-
|
|
21
|
+
//#region ../../../2-sql/5-runtime/dist/prepared-statement-YtgdlN7e.d.mts
|
|
22
22
|
//#region src/codecs/encoding.d.ts
|
|
23
23
|
interface ParamMetadata {
|
|
24
24
|
readonly codec: CodecRef$1 | undefined;
|
|
@@ -456,8 +456,10 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
|
|
|
456
456
|
protected acquireRawConnection(): Promise<SqlConnection>;
|
|
457
457
|
private setupDriverExecution;
|
|
458
458
|
private beginOperation;
|
|
459
|
+
private scheduleAfterTransaction;
|
|
459
460
|
protected getListDecoder(): ListDecoder;
|
|
460
461
|
private streamRows;
|
|
462
|
+
private streamDecodedRows;
|
|
461
463
|
private createQueryContexts;
|
|
462
464
|
private prepareQueryExecution;
|
|
463
465
|
private prepareExecuteExecution;
|
|
@@ -467,6 +469,7 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
|
|
|
467
469
|
/** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. */
|
|
468
470
|
protected executeStatisticsAgainstQueryable(plan: SqlExecutionPlan<unknown> | SqlQueryPlan<unknown>, queryable: SqlQueryable, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
|
|
469
471
|
private executeStatisticsInFlight;
|
|
472
|
+
private executeEncodedPlan;
|
|
470
473
|
prepare<D extends Declaration<CT>, Row, CT extends CodecTypesBase = CodecTypesBase>(declaration: D, callback: PrepareCallback<D, Row>): Promise<PreparedFor<ParamsFromDeclaration<D, CT>, Row>>;
|
|
471
474
|
/** Query prepared rows against a caller-supplied queryable through the full pipeline. */
|
|
472
475
|
protected runPreparedQueryAgainstQueryable<P, Row>(ps: PreparedStatementImpl<P, Row>, userParams: unknown, queryable: SqlQueryable, options?: RuntimeExecuteOptions): AsyncIterableResult<Row>;
|
|
@@ -475,7 +478,11 @@ declare abstract class SqlRuntimeBase<TContract extends Contract<SqlStorage> = C
|
|
|
475
478
|
protected runPreparedExecuteAgainstQueryable<P>(ps: PreparedExecutionImpl<P>, userParams: unknown, queryable: SqlQueryable, options?: RuntimeExecuteOptions): Promise<SqlStatementStats>;
|
|
476
479
|
private runPreparedExecuteInFlight;
|
|
477
480
|
connection(): Promise<RuntimeConnection>;
|
|
478
|
-
|
|
481
|
+
/**
|
|
482
|
+
* Wraps a driver transaction so every query run on it passes through the runtime with `scope: 'transaction'`, and fires each query's `afterTransaction` stage once when the transaction ends. `connection` is the connection `driverTx` was begun on. A query sent on it, or on the transaction, from now until `commit()` or `rollback()` is called runs inside the transaction, so its stage also fires when the transaction ends. A subclass that begins a driver transaction itself returns it through this wrapper. A transaction a subclass wraps reads the contract marker through the driver; only the connections and transactions this class hands out read it through themselves.
|
|
483
|
+
*/
|
|
484
|
+
protected wrapTransaction(driverTx: SqlTransaction, connection: SqlConnection): RuntimeTransaction;
|
|
485
|
+
private rememberQueriesUntilEnd;
|
|
479
486
|
telemetry(): RuntimeTelemetryEvent | null;
|
|
480
487
|
close(): Promise<void>;
|
|
481
488
|
private closeDriverAfterWork;
|
|
@@ -529,4 +536,4 @@ declare class PreparedExecutionImpl<Params> implements PreparedExecution<Params>
|
|
|
529
536
|
}
|
|
530
537
|
//#endregion
|
|
531
538
|
export { SqlMiddlewareContext as A, TransactionContext as B, RuntimeParameterizedCodecDescriptor as C, SqlExecutionStack as D, RuntimeTransaction as E, SqlRuntimeExtensionDescriptor as F, encodeParamsWithMetadata as G, createExecutionContext as H, SqlRuntimeExtensionInstance as I, withTransaction as J, preparedStatementExecute as K, SqlRuntimeTargetDescriptor as L, SqlRuntimeAdapterInstance as M, SqlRuntimeBase as N, SqlExecutionStackWithDriver as O, SqlRuntimeDriverInstance as P, SqlStaticContributions as R, RuntimeOptions as S, RuntimeTelemetryEvent as T, createSqlExecutionStack as U, VerifyMarkerOption as V, deriveParamMetadata as W, PreparedStatementInternals as _, DeclaredCodecId as a, RuntimeConnection as b, ParamSpec as c, PreparedExecution as d, PreparedExecutionImpl as f, PreparedStatementImpl as g, PreparedStatementExecuteTarget as h, Declaration as i, SqlRuntimeAdapterDescriptor as j, SqlMiddleware as k, ParamsFromDeclaration as l, PreparedStatement as m, CloseRefusal as n, DeclaredNullable as o, PreparedFor as p, preparedStatementQuery as q, ConnectionProvider as r, MarkerReader as s, BindSiteParams as t, PrepareCallback as u, PreparedStatementQueryTarget as v, RuntimeQueryable as w, RuntimeFamilyAdapter as x, Runtime as y, TelemetryOutcome as z };
|
|
532
|
-
//# sourceMappingURL=prepared-statement-
|
|
539
|
+
//# sourceMappingURL=prepared-statement-YtgdlN7e-BryEFERH.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-statement-
|
|
1
|
+
{"version":3,"file":"prepared-statement-YtgdlN7e-BryEFERH.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/prepared-statement-YtgdlN7e.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;UAaU;WACC,OAAO;WACP;;iBAEM,oBAAoB,KAAK,uBAAuB;iBAChD,yBAAyB,4BAA4B,mBAAmB,iBAAiB,KAAK,qBAAqB,iBAAiB,wBAAwB;;;UAGnK,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA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AAW,cAAc,UAAU,wBAAwB,QAAQ;UAC9J;EACR,cAAc,QAAQ;;;;YAIZ,gBAAgB,UAAU,gBAAgB,YAAY,gBAAgB;UACxE;EACR,aAAa;EACb,SAAS;UACD;UACA;UACA;UACA;UACA;;;UAGA;EACR,cAAc,QAAQ;;iBAEP,gBAAgB,GAAG,SAAS,oBAAoB,KAAK,IAAI,uBAAuB,YAAY,KAAK,QAAQ;;;UAGhH;WACC;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;;cAErB,sBAAsB,QAAQ,gBAAgB,kBAAkB,QAAQ,MAAM;WACjF;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,MAAM,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;;;;cAU1F,sBAAsB,mBAAmB,kBAAkB,SAAS;WACvE;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,QAAQ,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,QAAQ"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as numeralText } from "./numeral-text-Cqu87pVe-DJCqBaSC.mjs";
|
|
2
|
-
import { i as escapePslString } from "./data-type-support-
|
|
2
|
+
import { i as escapePslString } from "./data-type-support-DeL6iJt8.mjs";
|
|
3
3
|
import { i as printSqlExpressionLiteral } from "./sql-expression-D7GsLgDM.mjs";
|
|
4
|
-
import { m as defaultInCanonicalForm } from "./types-
|
|
5
|
-
import { printTaggedLiteral } from "@prisma/orm-framework/components/authoring";
|
|
6
|
-
import { dataTypeId } from "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { m as defaultInCanonicalForm } from "./types-D_7dH1ie-CN5Dgmgh.mjs";
|
|
5
|
+
import { authoringEntryType, printTaggedLiteral } from "@prisma/orm-framework/components/authoring";
|
|
6
|
+
import { canonicalFormOf, dataTypeId } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
//#region ../../../2-sql/9-family/dist/psl-build.mjs
|
|
8
8
|
const DEFAULT_FUNCTION_ATTRIBUTES = {
|
|
9
9
|
"autoincrement()": "@default(autoincrement())",
|
|
@@ -31,8 +31,9 @@ function writingSurface(entries) {
|
|
|
31
31
|
for (const [key, entry] of Object.entries(entries)) {
|
|
32
32
|
const written = entry.written;
|
|
33
33
|
if (written.kind === "tag") {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const type = dataTypeId(authoringEntryType(key, entry));
|
|
35
|
+
if (!entryOf.has(type)) entryOf.set(type, entry);
|
|
36
|
+
tagTypes.push(type);
|
|
36
37
|
continue;
|
|
37
38
|
}
|
|
38
39
|
if (written.syntax === "number") {
|
|
@@ -176,9 +177,10 @@ function writeListCast(value, columnDataType, dataTypeLookup, surface) {
|
|
|
176
177
|
}
|
|
177
178
|
function writeDefaultLiteral(stored, options) {
|
|
178
179
|
if (stored instanceof Date) return void 0;
|
|
179
|
-
const { dataTypeEntries, dataTypeLookup,
|
|
180
|
-
if (dataTypeEntries === void 0 || dataTypeLookup === void 0 ||
|
|
181
|
-
const
|
|
180
|
+
const { dataTypeEntries, dataTypeLookup, columnCodec } = options ?? {};
|
|
181
|
+
if (dataTypeEntries === void 0 || dataTypeLookup === void 0 || columnCodec === void 0) return;
|
|
182
|
+
const columnDataType = columnCodec.dataType;
|
|
183
|
+
const { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec, dataTypeLookup), options?.list === true);
|
|
182
184
|
if (value instanceof Date) return void 0;
|
|
183
185
|
const surface = writingSurface(dataTypeEntries);
|
|
184
186
|
if (options?.list === true) {
|
|
@@ -210,4 +212,4 @@ function sameForm(left, right) {
|
|
|
210
212
|
//#endregion
|
|
211
213
|
export { mapDefault as t };
|
|
212
214
|
|
|
213
|
-
//# sourceMappingURL=psl-build-
|
|
215
|
+
//# sourceMappingURL=psl-build-C1P-sV0c.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-build-C1P-sV0c.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/psl-build.mjs"],"sourcesContent":["import { s as toEnumMemberName } from \"./psl-names-C3cwe0rg.mjs\";\nimport { printSqlExpressionLiteral } from \"@internal/sql-contract/sql-expression\";\nimport { authoringEntryType, printTaggedLiteral } from \"@internal/framework-components/authoring\";\nimport { canonicalFormOf, dataTypeId } from \"@internal/framework-components/codec\";\nimport { numeralText } from \"@internal/sql-contract/data-type\";\nimport { defaultInCanonicalForm } from \"@internal/sql-schema-ir/types\";\nimport { escapePslString } from \"@internal/sql-contract/data-type-support\";\n//#region src/core/psl-build/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\n/**\n* The attribute a stored default prints as: a named function, a literal the column takes, or any\n* other expression as a `sql` literal. `undefined` when a literal has no written form.\n*/\nfunction mapDefault(columnDefault, options) {\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": {\n\t\t\tconst text = writeDefaultLiteral(columnDefault.value, options);\n\t\t\treturn text === void 0 ? void 0 : { attribute: `@default(${text})` };\n\t\t}\n\t\tcase \"function\": return { attribute: options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? `@default(${printSqlExpressionLiteral(columnDefault.expression)})` };\n\t}\n}\nfunction writingSurface(entries) {\n\tconst entryOf = /* @__PURE__ */ new Map();\n\tlet classify;\n\tlet plainStringType;\n\tlet plainBooleanType;\n\tconst tagTypes = [];\n\tfor (const [key, entry] of Object.entries(entries)) {\n\t\tconst written = entry.written;\n\t\tif (written.kind === \"tag\") {\n\t\t\tconst type = dataTypeId(authoringEntryType(key, entry));\n\t\t\tif (!entryOf.has(type)) entryOf.set(type, entry);\n\t\t\ttagTypes.push(type);\n\t\t\tcontinue;\n\t\t}\n\t\tif (written.syntax === \"number\") {\n\t\t\tclassify = written.classify;\n\t\t\tfor (const type of written.types) entryOf.set(type, entry);\n\t\t\tcontinue;\n\t\t}\n\t\tentryOf.set(key, entry);\n\t\tif (written.syntax === \"string\") plainStringType = dataTypeId(key);\n\t\telse plainBooleanType = dataTypeId(key);\n\t}\n\treturn {\n\t\tentryOf,\n\t\tclassify,\n\t\tplainStringType,\n\t\tplainBooleanType,\n\t\ttagTypes\n\t};\n}\n/**\n* Every type the stored form could be a value of, in the order a written value would be read: a\n* number or numeral text through the classifier first, then the plain syntax that matches the\n* shape, then each tag, whose canonical form is a whole document.\n*/\nfunction classifications(value, surface) {\n\tconst found = [];\n\tif (typeof value === \"number\") {\n\t\tconst classified = surface.classify?.(numeralText(value));\n\t\treturn classified === void 0 ? [] : [classified];\n\t}\n\tif (typeof value === \"boolean\") return surface.plainBooleanType === void 0 ? [] : [{\n\t\ttype: surface.plainBooleanType,\n\t\tvalue\n\t}];\n\tif (typeof value === \"string\") {\n\t\tconst classified = surface.classify?.(value);\n\t\tif (classified !== void 0) found.push(classified);\n\t\tif (surface.plainStringType !== void 0) found.push({\n\t\t\ttype: surface.plainStringType,\n\t\t\tvalue\n\t\t});\n\t}\n\tfor (const type of surface.tagTypes) found.push({\n\t\ttype,\n\t\tvalue\n\t});\n\treturn found;\n}\n/** The stored form the column takes this value as, or `undefined` when its type takes no such value. */\nfunction admitted(candidate, columnDataType, dataTypeLookup) {\n\tif (candidate.type === columnDataType) return candidate.value;\n\tconst cast = dataTypeLookup.get(columnDataType)?.casts[candidate.type];\n\tif (cast === void 0) return void 0;\n\ttry {\n\t\treturn cast(candidate.value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The body of the literal: what the entry prints, before the syntax that fences it. */\nfunction printedBody(entry, value) {\n\ttry {\n\t\treturn entry.print(value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** What the entry reads the printed body back as, which for a number is the classifier's answer. */\nfunction readBack(entry, type, body) {\n\tconst written = entry.written;\n\ttry {\n\t\treturn written.kind === \"plain\" && written.syntax === \"number\" ? written.classify(body) : {\n\t\t\ttype,\n\t\t\tvalue: written.parse(body)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction literalText(entry, body) {\n\tconst written = entry.written;\n\tif (written.kind === \"tag\") return printTaggedLiteral(written.tag, body);\n\treturn written.syntax === \"string\" ? `\"${escapePslString(body)}\"` : body;\n}\n/**\n* The value written as the literal of one of its types, proven by reading the text straight back:\n* the same entry, the same cast, and the stored form again.\n*/\nfunction writeScalar(value, columnDataType, dataTypeLookup, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst stored = admitted(candidate, columnDataType, dataTypeLookup);\n\t\tif (stored === void 0 || !sameForm(stored, value)) continue;\n\t\tconst body = printedBody(entry, candidate.value);\n\t\tif (body === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, body);\n\t\tif (reread === void 0) continue;\n\t\tconst restored = admitted(reread, columnDataType, dataTypeLookup);\n\t\tif (restored === void 0 || !sameForm(restored, value)) continue;\n\t\treturn literalText(entry, body);\n\t}\n}\n/** One written element of a list, printed as a value of any type, with no column type to admit it. */\nfunction writeElement(value, of, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tif (!of.includes(candidate.type)) continue;\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst body = printedBody(entry, candidate.value);\n\t\tif (body === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, body);\n\t\tif (reread === void 0 || !of.includes(reread.type)) continue;\n\t\treturn {\n\t\t\ttext: literalText(entry, body),\n\t\t\tvalue: reread.value\n\t\t};\n\t}\n}\n/**\n* A written list on a scalar column, which the column type's list cast turns into its one value.\n* Each element is classified on its own and must be of a type the cast takes.\n*/\nfunction writeListCast(value, columnDataType, dataTypeLookup, surface) {\n\tconst listCast = dataTypeLookup.get(columnDataType)?.listCast;\n\tif (listCast === void 0) return void 0;\n\tconst parts = [];\n\tconst elements = [];\n\tfor (const element of value) {\n\t\tconst written = writeElement(element, listCast.of, surface);\n\t\tif (written === void 0) return void 0;\n\t\tparts.push(written.text);\n\t\telements.push(written.value);\n\t}\n\ttry {\n\t\tif (!sameForm(listCast.cast(elements), value)) return void 0;\n\t} catch {\n\t\treturn;\n\t}\n\treturn `[${parts.join(\", \")}]`;\n}\nfunction writeDefaultLiteral(stored, options) {\n\tif (stored instanceof Date) return void 0;\n\tconst { dataTypeEntries, dataTypeLookup, columnCodec } = options ?? {};\n\tif (dataTypeEntries === void 0 || dataTypeLookup === void 0 || columnCodec === void 0) return;\n\tconst columnDataType = columnCodec.dataType;\n\tconst { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec, dataTypeLookup), options?.list === true);\n\tif (value instanceof Date) return void 0;\n\tconst surface = writingSurface(dataTypeEntries);\n\tif (options?.list === true) {\n\t\tif (!Array.isArray(value)) return void 0;\n\t\tconst parts = [];\n\t\tfor (const element of value) {\n\t\t\tconst written = writeScalar(element, columnDataType, dataTypeLookup, surface);\n\t\t\tif (written === void 0) return void 0;\n\t\t\tparts.push(written);\n\t\t}\n\t\treturn `[${parts.join(\", \")}]`;\n\t}\n\tconst written = writeScalar(value, columnDataType, dataTypeLookup, surface);\n\tif (written !== void 0) return written;\n\treturn Array.isArray(value) ? writeListCast(value, columnDataType, dataTypeLookup, surface) : void 0;\n}\n/** Whether two canonical forms are the same JSON value, member by member and element by element. */\nfunction sameForm(left, right) {\n\tif (left === right) return true;\n\tif (Array.isArray(left) !== Array.isArray(right)) return false;\n\tif (typeof left !== \"object\" || typeof right !== \"object\" || left === null || right === null) return false;\n\tconst members = Object.entries(left);\n\tconst others = new Map(Object.entries(right));\n\treturn members.length === others.size && members.every(([key, member]) => {\n\t\tconst other = others.get(key);\n\t\treturn other !== void 0 && sameForm(member, other);\n\t});\n}\n//#endregion\nexport { mapDefault, toEn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Ac,OAAO,gBAAgB,gBAAgB,OAAO,IAAI,KAAK;AACpG;;AAEA,SAAS,SAAS,MAAM,OAAO;CAC9B,IAAI,SAAS,OAAO,OAAO;CAC3B,IAAI,MAAM,QAAQ,IAAI,MAAM,MAAM,QAAQ,KAAK,GAAG,OAAO;CACzD,IAAI,OAAO,SAAS,YAAY,OAAO,UAAU,YAAY,SAAS,QAAQ,UAAU,MAAM,OAAO;CACrG,MAAM,UAAU,OAAO,QAAQ,IAAI;CACnC,MAAM,SAAS,IAAI,IAAI,OAAO,QAAQ,KAAK,CAAC;CAC5C,OAAO,QAAQ,WAAW,OAAO,QAAQ,QAAQ,OAAO,CAAC,KAAK,YAAY;EACzE,MAAM,QAAQ,OAAO,IAAI,GAAG;EAC5B,OAAO,UAAU,KAAK,KAAK,SAAS,QAAQ,KAAK;CAClD,CAAC;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./type-map-
|
|
1
|
+
import "./type-map-dnvRKl9o-avUb9OLv.mjs";
|
|
2
2
|
//#region ../../../2-sql/9-family/dist/psl-build.d.mts
|
|
3
3
|
//#region src/core/psl-build/psl-names.d.ts
|
|
4
4
|
/**
|
|
@@ -10,4 +10,4 @@ import "./type-map-DmIbL4o--BfPMblbZ.mjs";
|
|
|
10
10
|
declare function toEnumMemberName(value: string): string;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { toEnumMemberName as t };
|
|
13
|
-
//# sourceMappingURL=psl-build-
|
|
13
|
+
//# sourceMappingURL=psl-build-ClK2AyY1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-build-ClK2AyY1.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-build.d.mts"],"mappings":";;;;;;;;;iBAQiB,iBAAiB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./contract-builder-
|
|
1
|
+
import "./contract-builder-DoT-AH8l.mjs";
|
|
2
2
|
import { AuthoringTypeConstructorDescriptor, DataTypeAuthoringEntry } from "@prisma/orm-framework/components/authoring";
|
|
3
3
|
import { CodecLookupWithDescriptors, DataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
4
4
|
import { ColumnDefault, ExecutionMutationDefaultPhases, JsonValue, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
@@ -24,4 +24,4 @@ type ColumnDescriptor = {
|
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ColumnDescriptor as t };
|
|
27
|
-
//# sourceMappingURL=psl-column-resolution-BegCa1-t-
|
|
27
|
+
//# sourceMappingURL=psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-column-resolution-BegCa1-t-
|
|
1
|
+
{"version":3,"file":"psl-column-resolution-BegCa1-t-o2A6uWWC.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-BegCa1-t.d.mts"],"mappings":";;;;;;;;;;KA8FK;WACM;WACA;WACA,aAAa;;;;;;;;;WASb,WAAW"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as sqlTextFromCanonical, t as SQL_EXPRESSION_DATA_TYPE_ID } from "./sql-expression-D7GsLgDM.mjs";
|
|
2
|
-
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-
|
|
3
|
-
import { a as storedAsListColumn, i as isValueObjectMember } from "./derived-checks-
|
|
2
|
+
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-BF_JSK38.mjs";
|
|
3
|
+
import { a as storedAsListColumn, i as isValueObjectMember } from "./derived-checks-CsB3zLJ--C7ymzzbW.mjs";
|
|
4
4
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
|
-
import { instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
|
|
6
|
-
import { codecForRef } from "@prisma/orm-framework/components/codec";
|
|
5
|
+
import { authoringEntryType, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
|
|
6
|
+
import { canonicalFormOf, codecForRef } from "@prisma/orm-framework/components/codec";
|
|
7
7
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
8
8
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
9
9
|
import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -13,7 +13,7 @@ import { describeTaggedLiteralFailure } from "@prisma/orm-framework/components/c
|
|
|
13
13
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
14
14
|
import { bool, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, identifier, interpretAttribute, leafDiagnostic, list, modelAttribute, nodePslSpan, numLiteral, oneOf, optional, record, referencedFieldRef, str, taggedLiteral, typeReferenceNode } from "@prisma/orm-framework/psl-parser";
|
|
15
15
|
import { instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled } from "@prisma/orm-framework/psl-parser/interpret";
|
|
16
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-
|
|
16
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-Bi-CSeoQ.mjs
|
|
17
17
|
function storageName(symbol, physicalNames) {
|
|
18
18
|
const name = physicalNames.get(symbol);
|
|
19
19
|
assertDefined(name, "Physical names are populated for every model and field before lowering");
|
|
@@ -123,7 +123,7 @@ function readValue(support, written, elementIndex) {
|
|
|
123
123
|
return {
|
|
124
124
|
ok: true,
|
|
125
125
|
typed: {
|
|
126
|
-
type: blindCast(found.key),
|
|
126
|
+
type: blindCast(authoringEntryType(found.key, found.entry)),
|
|
127
127
|
value: form.parse(text)
|
|
128
128
|
}
|
|
129
129
|
};
|
|
@@ -174,8 +174,31 @@ function castInto(support, columnType, typed, elementIndex) {
|
|
|
174
174
|
function codecRefTypeParams(typeParams) {
|
|
175
175
|
return typeParams === void 0 ? void 0 : blindCast(typeParams);
|
|
176
176
|
}
|
|
177
|
+
/** A value in the canonical form of the column's values, when they have one. */
|
|
178
|
+
function inCanonicalForm(toCanonicalForm, value, elementIndex) {
|
|
179
|
+
if (toCanonicalForm === void 0) return {
|
|
180
|
+
ok: true,
|
|
181
|
+
value
|
|
182
|
+
};
|
|
183
|
+
try {
|
|
184
|
+
return {
|
|
185
|
+
ok: true,
|
|
186
|
+
value: toCanonicalForm(value)
|
|
187
|
+
};
|
|
188
|
+
} catch (error) {
|
|
189
|
+
if (isInternalError(error)) throw error;
|
|
190
|
+
return {
|
|
191
|
+
ok: false,
|
|
192
|
+
refusal: {
|
|
193
|
+
kind: "unreadable",
|
|
194
|
+
message: messageOf(error),
|
|
195
|
+
elementIndex
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}
|
|
177
200
|
/**
|
|
178
|
-
* The column's codec descriptor, and `read`, which reads a value in its stored JSON form with the column's codec, built with the column's type parameters.
|
|
201
|
+
* The column's codec descriptor, and `read`, which reads a value in its stored JSON form with the column's codec, built with the column's type parameters, and gives it the canonical form of the column's values.
|
|
179
202
|
*/
|
|
180
203
|
function storedValueReader(input) {
|
|
181
204
|
const descriptor = input.codecLookup.descriptorFor(input.column.codecId);
|
|
@@ -184,13 +207,10 @@ function storedValueReader(input) {
|
|
|
184
207
|
...ifDefined("typeParams", codecRefTypeParams(input.column.typeParams))
|
|
185
208
|
});
|
|
186
209
|
if (codec === void 0 || descriptor === void 0) throw new InternalError(`Field "${input.fieldPath}": no codec descriptor is registered for "${input.column.codecId}", but the column was resolved from one.`);
|
|
187
|
-
const
|
|
210
|
+
const toCanonicalForm = canonicalFormOf(descriptor, input.dataTypeLookup);
|
|
211
|
+
const read = (written, elementIndex) => {
|
|
188
212
|
try {
|
|
189
|
-
codec.decodeJson(
|
|
190
|
-
return {
|
|
191
|
-
ok: true,
|
|
192
|
-
value
|
|
193
|
-
};
|
|
213
|
+
codec.decodeJson(written);
|
|
194
214
|
} catch (error) {
|
|
195
215
|
if (isInternalError(error)) throw error;
|
|
196
216
|
return {
|
|
@@ -203,6 +223,7 @@ function storedValueReader(input) {
|
|
|
203
223
|
}
|
|
204
224
|
};
|
|
205
225
|
}
|
|
226
|
+
return inCanonicalForm(toCanonicalForm, written, elementIndex);
|
|
206
227
|
};
|
|
207
228
|
return {
|
|
208
229
|
descriptor,
|
|
@@ -214,7 +235,7 @@ function storedValueReader(input) {
|
|
|
214
235
|
*/
|
|
215
236
|
function readStoredValue(input) {
|
|
216
237
|
const reading = storedValueReader(input).read(input.value, void 0);
|
|
217
|
-
return reading.ok ? reading : refusalDiagnostic(reading.refusal, input.fieldPath);
|
|
238
|
+
return reading.ok ? reading : refusalDiagnostic(reading.refusal, `Field "${input.fieldPath}"`);
|
|
218
239
|
}
|
|
219
240
|
/**
|
|
220
241
|
* Read one `@default(...)` value for a column, refusing in parts so each contract source words its
|
|
@@ -223,7 +244,10 @@ function readStoredValue(input) {
|
|
|
223
244
|
* its type's list cast — which is how `pgvector.Vector(3) @default([0.1, 0.2])` is read.
|
|
224
245
|
*/
|
|
225
246
|
function readDataTypeDefault(input) {
|
|
226
|
-
const { descriptor, read: readStored } = storedValueReader(
|
|
247
|
+
const { descriptor, read: readStored } = storedValueReader({
|
|
248
|
+
...input,
|
|
249
|
+
dataTypeLookup: input.support.lookup
|
|
250
|
+
});
|
|
227
251
|
const columnType = descriptor.dataType;
|
|
228
252
|
const readOne = (written, elementIndex) => {
|
|
229
253
|
const read = readValue(input.support, written, elementIndex);
|
|
@@ -327,11 +351,28 @@ function at(elementIndex) {
|
|
|
327
351
|
/** {@link readDataTypeDefault} worded as a PSL diagnostic's code and message. */
|
|
328
352
|
function lowerDataTypeDefault(input) {
|
|
329
353
|
const read = readDataTypeDefault(input);
|
|
330
|
-
return read.ok ? read : refusalDiagnostic(read.refusal, input.fieldPath);
|
|
354
|
+
return read.ok ? read : refusalDiagnostic(read.refusal, `Field "${input.fieldPath}"`);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Reads one number literal written in a contract source outside a default, such as an enum member's value, from its source text for a codec, as {@link lowerDataTypeDefault} reads a default: the number's entry gives it a data type, the codec's data type takes it directly or through a cast, and the codec checks it. A refusal is worded for `subject`.
|
|
358
|
+
*/
|
|
359
|
+
function readWrittenNumberForCodec(input) {
|
|
360
|
+
const read = readDataTypeDefault({
|
|
361
|
+
written: {
|
|
362
|
+
kind: "number",
|
|
363
|
+
text: input.text
|
|
364
|
+
},
|
|
365
|
+
isList: false,
|
|
366
|
+
column: { codecId: input.codecId },
|
|
367
|
+
codecLookup: input.codecLookup,
|
|
368
|
+
support: input.support,
|
|
369
|
+
fieldPath: input.subject
|
|
370
|
+
});
|
|
371
|
+
return read.ok ? read : refusalDiagnostic(read.refusal, input.subject);
|
|
331
372
|
}
|
|
332
373
|
/** A refusal worded as a PSL diagnostic's code and message. */
|
|
333
|
-
function refusalDiagnostic(refusal,
|
|
334
|
-
const where =
|
|
374
|
+
function refusalDiagnostic(refusal, subject) {
|
|
375
|
+
const where = `${subject}${at(refusal.elementIndex)}`;
|
|
335
376
|
switch (refusal.kind) {
|
|
336
377
|
case "unreadable": return {
|
|
337
378
|
ok: false,
|
|
@@ -833,6 +874,35 @@ const sqlAttributeSpecs = {
|
|
|
833
874
|
default: defaultFieldSpec
|
|
834
875
|
}
|
|
835
876
|
};
|
|
877
|
+
/**
|
|
878
|
+
* The value-object column's default as the document it holds, and in the form the column stores. A
|
|
879
|
+
* column may store the document's JSON text, as `sqlite/json@1` does, so its codec reads the stored
|
|
880
|
+
* value into the document the composite type describes. A list literal on a list of value objects
|
|
881
|
+
* is read element by element; the column stores the list's document in its own form.
|
|
882
|
+
*/
|
|
883
|
+
function valueObjectDefaultDocument(input) {
|
|
884
|
+
const codec = codecForRef(input.codecLookup, { codecId: input.codecId });
|
|
885
|
+
if (codec === void 0) return {
|
|
886
|
+
document: input.stored,
|
|
887
|
+
stored: input.stored
|
|
888
|
+
};
|
|
889
|
+
if (input.elementwise && Array.isArray(input.stored)) {
|
|
890
|
+
const document = input.stored.map((element) => readDocument(codec, element));
|
|
891
|
+
return {
|
|
892
|
+
document,
|
|
893
|
+
stored: codec.encodeJson(document)
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
return {
|
|
897
|
+
document: readDocument(codec, input.stored),
|
|
898
|
+
stored: input.stored
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
/** The column's codec has already read `stored` while the default was lowered, so it reads again. */
|
|
902
|
+
function readDocument(codec, stored) {
|
|
903
|
+
if (stored === null) return null;
|
|
904
|
+
return blindCast(codec.decodeJson(stored));
|
|
905
|
+
}
|
|
836
906
|
/** Each way the default does not match the composite type. */
|
|
837
907
|
function valueObjectDefaultMismatches(input) {
|
|
838
908
|
const mismatches = [];
|
|
@@ -880,6 +950,7 @@ function valueObjectDefaultMismatches(input) {
|
|
|
880
950
|
value,
|
|
881
951
|
column: member.descriptor,
|
|
882
952
|
codecLookup: input.codecLookup,
|
|
953
|
+
dataTypeLookup: input.dataTypeLookup,
|
|
883
954
|
fieldPath: path
|
|
884
955
|
});
|
|
885
956
|
if (!reading.ok) {
|
|
@@ -1381,14 +1452,21 @@ function lowerDefaultForField(input) {
|
|
|
1381
1452
|
restoredValue = value.map((element) => element === null ? null : nonNullValues[index++] ?? null);
|
|
1382
1453
|
}
|
|
1383
1454
|
if (input.valueObjectDefault !== void 0) {
|
|
1455
|
+
const { document, stored } = valueObjectDefaultDocument({
|
|
1456
|
+
stored: restoredValue,
|
|
1457
|
+
elementwise: readsListElements(written) && !input.isListColumn,
|
|
1458
|
+
codecId: input.columnDescriptor.codecId,
|
|
1459
|
+
codecLookup: input.codecLookup
|
|
1460
|
+
});
|
|
1384
1461
|
const mismatches = valueObjectDefaultMismatches({
|
|
1385
1462
|
fieldPath: `${input.modelName}.${input.fieldName}`,
|
|
1386
|
-
value:
|
|
1463
|
+
value: document,
|
|
1387
1464
|
list: input.field.list,
|
|
1388
1465
|
nullable: input.field.optional,
|
|
1389
1466
|
elementNullable: input.field.elementOptional,
|
|
1390
1467
|
...input.valueObjectDefault,
|
|
1391
|
-
codecLookup: input.codecLookup
|
|
1468
|
+
codecLookup: input.codecLookup,
|
|
1469
|
+
dataTypeLookup: input.dataTypeSupport.lookup
|
|
1392
1470
|
});
|
|
1393
1471
|
for (const { code, message } of mismatches) input.diagnostics.push({
|
|
1394
1472
|
code,
|
|
@@ -1396,6 +1474,11 @@ function lowerDefaultForField(input) {
|
|
|
1396
1474
|
...source.at()
|
|
1397
1475
|
});
|
|
1398
1476
|
if (mismatches.length > 0) return {};
|
|
1477
|
+
return { defaultValue: {
|
|
1478
|
+
kind: "literal",
|
|
1479
|
+
value: stored,
|
|
1480
|
+
canonical: true
|
|
1481
|
+
} };
|
|
1399
1482
|
}
|
|
1400
1483
|
return { defaultValue: {
|
|
1401
1484
|
kind: "literal",
|
|
@@ -1918,6 +2001,6 @@ function collectResolvedFields(input) {
|
|
|
1918
2001
|
return resolvedFields;
|
|
1919
2002
|
}
|
|
1920
2003
|
//#endregion
|
|
1921
|
-
export { toNamedTypeFieldDescriptor as S, modelCoordinateKey as _, describeUnsupportedSqlAttribute as a,
|
|
2004
|
+
export { toNamedTypeFieldDescriptor as C, storageName as S, modelCoordinateKey as _, describeUnsupportedSqlAttribute as a, resolveFieldTypeDescriptor as b, getAttribute as c, instantiateFieldTypeConstructor as d, instantiatePslTypeConstructor as f, modelAttributeSpecsFrom as g, mapFieldNamesToColumns as h, contractError as i, getAuthoringEntity as l, interpretModelAttribute as m, bareTypeConstructorOf as n, entryForTag as o, interpretFieldAttribute as p, collectResolvedFields as r, formatDbAttributeMigrationMessage as s, PSL_CHECK_ON_STI_VARIANT as t, getNamedArgument as u, readDataTypeDefault as v, sqlAttributeSpecs as x, readWrittenNumberForCodec as y };
|
|
1922
2005
|
|
|
1923
|
-
//# sourceMappingURL=psl-field-resolution-
|
|
2006
|
+
//# sourceMappingURL=psl-field-resolution-Bi-CSeoQ-BjACY_53.mjs.map
|