@prisma/orm-family-sql 8.0.0-rc.2-dev.2 → 8.0.0-rc.20
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/README.md +2 -6
- package/dist/{aggregate-descriptor-registry-C7hel5O7.mjs → aggregate-descriptor-registry-ZrKjxwQe.mjs} +5 -5
- package/dist/aggregate-descriptor-registry-ZrKjxwQe.mjs.map +1 -0
- package/dist/ast-D0miQ1B6.mjs +372 -0
- package/dist/ast-D0miQ1B6.mjs.map +1 -0
- package/dist/ast-YEMe_B8z.d.mts +292 -0
- package/dist/ast-YEMe_B8z.d.mts.map +1 -0
- package/dist/attribute-specs-DA_RwQFB.d.mts +114 -0
- package/dist/attribute-specs-DA_RwQFB.d.mts.map +1 -0
- package/dist/{authored-check-naming-Hf9990DV.mjs → authored-check-naming-BHGJhjqn.mjs} +5 -5
- package/dist/authored-check-naming-BHGJhjqn.mjs.map +1 -0
- package/dist/{authored-check-naming-BWBe-PVE.d.mts → authored-check-naming-D-o196ry.d.mts} +3 -3
- package/dist/authored-check-naming-D-o196ry.d.mts.map +1 -0
- package/dist/authoring-entity-types-CgKIgWq5-pEdfjam5.d.mts +9 -0
- package/dist/authoring-entity-types-CgKIgWq5-pEdfjam5.d.mts.map +1 -0
- package/dist/builder.d.mts +4 -3
- package/dist/builder__runtime.d.mts +29 -31
- package/dist/builder__runtime.d.mts.map +1 -1
- package/dist/builder__runtime.mjs +261 -191
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +6 -3
- package/dist/{canonicalization-hooks-dmXkOR4a.mjs → canonicalization-hooks-Ce1v_TDl.mjs} +2 -2
- package/dist/canonicalization-hooks-Ce1v_TDl.mjs.map +1 -0
- package/dist/{canonicalization-hooks-CYnW_sGn.d.mts → canonicalization-hooks-DyapQ0my.d.mts} +2 -2
- package/dist/canonicalization-hooks-DyapQ0my.d.mts.map +1 -0
- package/dist/{check-constraint-B7qGu6rc-HvQjjX82.d.mts → check-constraint-B7qGu6rc-Bk2ezWXu.d.mts} +4 -4
- package/dist/check-constraint-B7qGu6rc-Bk2ezWXu.d.mts.map +1 -0
- package/dist/{codec-descriptor-registry-N0dhtKaH.mjs → codec-descriptor-registry-CiiFzMtb.mjs} +13 -40
- package/dist/codec-descriptor-registry-CiiFzMtb.mjs.map +1 -0
- package/dist/collection-methods-BB8YH69u.d.mts +1 -0
- package/dist/collection-methods-D2UnCS0S-DOy2qHYS.d.mts +77 -0
- package/dist/collection-methods-D2UnCS0S-DOy2qHYS.d.mts.map +1 -0
- package/dist/{config-types-D9fdKG3g.d.mts → config-types-C-1mIiJO.d.mts} +5 -5
- package/dist/config-types-C-1mIiJO.d.mts.map +1 -0
- package/dist/{config-types-gAm54C_v.mjs → config-types-DkEeq_qq.mjs} +10 -6
- package/dist/config-types-DkEeq_qq.mjs.map +1 -0
- package/dist/{contract-builder-D4a5dT7j.mjs → contract-builder-50lF0kz1.mjs} +431 -226
- package/dist/contract-builder-50lF0kz1.mjs.map +1 -0
- package/dist/contract-builder-C_Zi57iD.d.mts +1967 -0
- package/dist/contract-builder-C_Zi57iD.d.mts.map +1 -0
- package/dist/contract-emitter.d.mts +4 -7
- package/dist/contract-emitter.d.mts.map +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/{contract-errors-BCN6RVI5-5IHBF_lg.mjs → contract-errors-BCN6RVI5-DoH6b_KZ.mjs} +2 -2
- package/dist/contract-errors-BCN6RVI5-DoH6b_KZ.mjs.map +1 -0
- package/dist/contract-prisma7__provider.d.mts +97 -0
- package/dist/contract-prisma7__provider.d.mts.map +1 -0
- package/dist/contract-prisma7__provider.mjs +2011 -0
- package/dist/contract-prisma7__provider.mjs.map +1 -0
- package/dist/contract-psl.d.mts +18 -29
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -0
- package/dist/contract-psl__attribute-specs.mjs +2 -0
- package/dist/contract-psl__default-table-name.d.mts +7 -0
- package/dist/contract-psl__default-table-name.d.mts.map +1 -0
- package/dist/contract-psl__default-table-name.mjs +2 -0
- package/dist/contract-psl__diagnostics.d.mts +12 -0
- package/dist/contract-psl__diagnostics.d.mts.map +1 -0
- package/dist/contract-psl__diagnostics.mjs +2 -0
- package/dist/contract-psl__map-names.d.mts +16 -0
- package/dist/contract-psl__map-names.d.mts.map +1 -0
- package/dist/contract-psl__map-names.mjs +21 -0
- package/dist/contract-psl__map-names.mjs.map +1 -0
- package/dist/contract-psl__provider.d.mts +3 -3
- package/dist/contract-psl__provider.d.mts.map +1 -1
- package/dist/contract-psl__provider.mjs +95 -46
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +5 -5
- package/dist/contract-ts.mjs +5 -4
- 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 +4 -4
- package/dist/contract-ts__contract-builder.mjs +4 -3
- package/dist/{contract-view-BMR5IWk4.mjs → contract-view-DqpzeYeE.mjs} +2 -2
- package/dist/contract-view-DqpzeYeE.mjs.map +1 -0
- package/dist/{contract-view-CPHxoAEX.d.mts → contract-view-DuB35or0.d.mts} +3 -3
- package/dist/contract-view-DuB35or0.d.mts.map +1 -0
- package/dist/contract.d.mts +30 -28
- package/dist/contract.mjs +23 -18
- package/dist/contract__authored-check-naming.d.mts +1 -1
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__canonicalization-hooks.d.mts +1 -1
- package/dist/contract__canonicalization-hooks.mjs +1 -1
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__contract-view.mjs +1 -1
- package/dist/contract__data-type-support.d.mts +2 -0
- package/dist/contract__data-type-support.mjs +2 -0
- package/dist/contract__data-type.d.mts +2 -0
- package/dist/contract__data-type.mjs +3 -0
- package/dist/contract__entity-handle-lowering-hook.d.mts +2 -2
- package/dist/contract__entity-handle-lowering-hook.mjs +2 -2
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__factories.mjs +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +2 -2
- package/dist/contract__foreign-key-materialization.mjs +3 -2
- package/dist/contract__index-naming.d.mts +2 -2
- package/dist/contract__index-naming.mjs +2 -2
- package/dist/contract__index-type-validation.d.mts +2 -2
- package/dist/contract__index-type-validation.mjs +1 -1
- package/dist/contract__index-types.d.mts +3 -3
- package/dist/contract__index-types.mjs +2 -2
- package/dist/contract__referential-action-sql.d.mts +1 -1
- package/dist/contract__referential-action-sql.mjs +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__resolve-storage-table.mjs +1 -1
- package/dist/contract__sql-expression.d.mts +2 -0
- package/dist/contract__sql-expression.mjs +2 -0
- package/dist/contract__types.d.mts +12 -12
- package/dist/contract__types.mjs +4 -4
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +3 -3
- package/dist/contract__value-set-derivation-hook.d.mts +1 -1
- package/dist/contract__value-set-derivation-hook.mjs +1 -1
- package/dist/control-BK50zF6c.mjs +2721 -0
- package/dist/control-BK50zF6c.mjs.map +1 -0
- package/dist/control-ChAUdOOu.d.mts +1416 -0
- package/dist/control-ChAUdOOu.d.mts.map +1 -0
- package/dist/{control-adapter-C99J7aEF-B7eQd7vD.d.mts → control-adapter-Bn0uhplA-BzP2uPqJ.d.mts} +27 -44
- package/dist/control-adapter-Bn0uhplA-BzP2uPqJ.d.mts.map +1 -0
- package/dist/control-adapter-NZ2kKc4x.d.mts +13 -0
- package/dist/control-adapter-NZ2kKc4x.d.mts.map +1 -0
- package/dist/control-adapter-SlQkTEwT.mjs +16 -0
- package/dist/control-adapter-SlQkTEwT.mjs.map +1 -0
- package/dist/data-type-BFSpaotu.mjs +52 -0
- package/dist/data-type-BFSpaotu.mjs.map +1 -0
- package/dist/data-type-DJIvKQHf.d.mts +158 -0
- package/dist/data-type-DJIvKQHf.d.mts.map +1 -0
- package/dist/data-type-support-BhSoPUFj.mjs +9 -0
- package/dist/data-type-support-BhSoPUFj.mjs.map +1 -0
- package/dist/data-type-support-CXpA0ex-.d.mts +7 -0
- package/dist/data-type-support-CXpA0ex-.d.mts.map +1 -0
- package/dist/{db-D18PrXKW-DvTv4JFn.d.mts → db-D1d75IvM-D4mRDC6w.d.mts} +123 -128
- package/dist/db-D1d75IvM-D4mRDC6w.d.mts.map +1 -0
- package/dist/{ddl-types-CXx4vPz6-BsgrnSUY.d.mts → ddl-types-By5mT2_S-CdaaFvsX.d.mts} +24 -29
- package/dist/ddl-types-By5mT2_S-CdaaFvsX.d.mts.map +1 -0
- package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts +39 -0
- package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts.map +1 -0
- package/dist/default-table-name-BfFY8qYR-CWZFDX6v.mjs +9 -0
- package/dist/default-table-name-BfFY8qYR-CWZFDX6v.mjs.map +1 -0
- package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs +1508 -0
- package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-DGqOFjs6.d.mts → derived-checks-DpPkO6Dt-9U9UJZOo.d.mts} +4 -4
- package/dist/derived-checks-DpPkO6Dt-9U9UJZOo.d.mts.map +1 -0
- package/dist/diagnostics-RHJxoiIk.mjs +23 -0
- package/dist/diagnostics-RHJxoiIk.mjs.map +1 -0
- package/dist/{diff-DbTNVm2f.d.mts → diff-1qHOLoUB.d.mts} +23 -10
- package/dist/diff-1qHOLoUB.d.mts.map +1 -0
- package/dist/diff-C1rFOhek.mjs +21 -0
- package/dist/diff-C1rFOhek.mjs.map +1 -0
- package/dist/{dist-ZK6oeI5e.mjs → dist-C8Y-PPuE.mjs} +36 -212
- package/dist/dist-C8Y-PPuE.mjs.map +1 -0
- package/dist/{dist-C_q1_QR9.mjs → dist-CHz1hF8M.mjs} +2 -2
- package/dist/dist-CHz1hF8M.mjs.map +1 -0
- package/dist/{dist-x6jvtkKM.mjs → dist-CMDXybwm.mjs} +2 -2
- package/dist/dist-CMDXybwm.mjs.map +1 -0
- package/dist/{driver-types-BQtRkOJ0-Bv2RPSfr.d.mts → driver-types-DRsYeq3j-BimeCnUk.d.mts} +11 -2
- package/dist/driver-types-DRsYeq3j-BimeCnUk.d.mts.map +1 -0
- package/dist/entity-handle-lowering-hook-BJZSlVVF.mjs +16 -0
- package/dist/entity-handle-lowering-hook-BJZSlVVF.mjs.map +1 -0
- package/dist/{entity-handle-lowering-hook-CIvRKBfa.d.mts → entity-handle-lowering-hook-BuvLtgFi.d.mts} +8 -11
- package/dist/entity-handle-lowering-hook-BuvLtgFi.d.mts.map +1 -0
- package/dist/{entity-kinds-B5cUFU22.d.mts → entity-kinds-BPG2xCZV.d.mts} +7 -7
- package/dist/entity-kinds-BPG2xCZV.d.mts.map +1 -0
- package/dist/{entity-kinds-D7vwoN_T-CCBwFJy0.mjs → entity-kinds-JR5SAm5h-DOH6VUtL.mjs} +31 -28
- package/dist/entity-kinds-JR5SAm5h-DOH6VUtL.mjs.map +1 -0
- package/dist/{errors-B5g0xWro-mWH2C07F.mjs → errors-B5g0xWro-C8plbqga.mjs} +2 -2
- package/dist/errors-B5g0xWro-C8plbqga.mjs.map +1 -0
- package/dist/errors.d.mts +1 -1
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/exports-C3wGYtID-D65DEUTC.mjs +2389 -0
- package/dist/exports-C3wGYtID-D65DEUTC.mjs.map +1 -0
- package/dist/{expression-FJK6Ar-d.d.mts → expression-6ld_ZQL6-fOuazzzm.d.mts} +37 -16
- package/dist/expression-6ld_ZQL6-fOuazzzm.d.mts.map +1 -0
- package/dist/expression-CieaNuRM-B1uVqxwd.d.mts +22 -0
- package/dist/expression-CieaNuRM-B1uVqxwd.d.mts.map +1 -0
- package/dist/expression-D8HstQiB.d.mts +2 -0
- package/dist/{expression-CX5mTA-z.mjs → expression-impl-B-XNINxr-BhN2sysZ.mjs} +41 -18
- package/dist/expression-impl-B-XNINxr-BhN2sysZ.mjs.map +1 -0
- package/dist/{factories-SVor5xIT.mjs → factories-Crobuxwn.mjs} +27 -20
- package/dist/factories-Crobuxwn.mjs.map +1 -0
- package/dist/{factories-P3qBQhO-.d.mts → factories-DbNP9qfs.d.mts} +16 -10
- package/dist/factories-DbNP9qfs.d.mts.map +1 -0
- package/dist/family.d.mts +17 -13
- package/dist/family.mjs +17 -12
- package/dist/family__control-adapter.d.mts +3 -3
- package/dist/family__control-adapter.mjs +2 -1
- package/dist/family__control.d.mts +5 -4
- package/dist/family__control.mjs +4 -4
- package/dist/family__diff.d.mts +2 -3
- package/dist/family__diff.mjs +2 -2
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +2 -2
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__migration.mjs +1 -1
- package/dist/family__pack.d.mts +2 -249
- package/dist/family__pack.mjs +3 -18
- package/dist/family__psl-build.d.mts +3 -0
- package/dist/family__psl-build.mjs +3 -0
- package/dist/family__psl-infer.d.mts +2 -2
- package/dist/family__psl-infer.mjs +2 -2
- package/dist/family__runtime.d.mts +2 -2
- package/dist/family__runtime.mjs +2 -2
- package/dist/family__verify.d.mts +1 -1
- package/dist/family__verify.mjs +1 -1
- package/dist/foreign-key-materialization-48P2V8on.d.mts +98 -0
- package/dist/foreign-key-materialization-48P2V8on.d.mts.map +1 -0
- package/dist/foreign-key-materialization-BM59w_Xg.mjs +287 -0
- package/dist/foreign-key-materialization-BM59w_Xg.mjs.map +1 -0
- package/dist/{foreign-key-C-iTPuRT-C9ip8zFx.d.mts → foreign-key-qkDFfG8t-TaK_GYWR.d.mts} +21 -5
- package/dist/foreign-key-qkDFfG8t-TaK_GYWR.d.mts.map +1 -0
- package/dist/functions-CsOoN7I3.mjs +88 -0
- package/dist/functions-CsOoN7I3.mjs.map +1 -0
- package/dist/functions-EW-RrRn3.d.mts +73 -0
- package/dist/functions-EW-RrRn3.d.mts.map +1 -0
- package/dist/generator-functions-D_qdqBV--Bq296cED.mjs +544 -0
- package/dist/generator-functions-D_qdqBV--Bq296cED.mjs.map +1 -0
- package/dist/index-7nHHQsAj.d.mts +606 -0
- package/dist/index-7nHHQsAj.d.mts.map +1 -0
- package/dist/{index-C5I8D-MB.d.mts → index-Nqc3OHR_.d.mts} +4 -5
- package/dist/index-Nqc3OHR_.d.mts.map +1 -0
- package/dist/index-equivalence-DswCiq5l-CGsyPP9B.mjs +109 -0
- package/dist/index-equivalence-DswCiq5l-CGsyPP9B.mjs.map +1 -0
- package/dist/{index-naming-DREt6js7-CRH27yUv.mjs → index-naming-BOcJT1B3-mG8Fd6KN.mjs} +35 -9
- package/dist/index-naming-BOcJT1B3-mG8Fd6KN.mjs.map +1 -0
- package/dist/{index-naming-Ct65z5Xk.d.mts → index-naming-Cs6wwia3.d.mts} +15 -5
- package/dist/index-naming-Cs6wwia3.d.mts.map +1 -0
- package/dist/index-reference-4wsdeB7v-DCwswK-q.d.mts +67 -0
- package/dist/index-reference-4wsdeB7v-DCwswK-q.d.mts.map +1 -0
- package/dist/index-reference-BQSrkRfT.mjs +55 -0
- package/dist/index-reference-BQSrkRfT.mjs.map +1 -0
- package/dist/index-reference-D8ewQRJr.d.mts +1 -0
- package/dist/index-type-validation-DJEMmmw0.mjs +42 -0
- package/dist/index-type-validation-DJEMmmw0.mjs.map +1 -0
- package/dist/index-type-validation-fGGwAHWc.d.mts +16 -0
- package/dist/index-type-validation-fGGwAHWc.d.mts.map +1 -0
- package/dist/index-types-H1O43iYT-BD0VwPqV.d.mts +66 -0
- package/dist/index-types-H1O43iYT-BD0VwPqV.d.mts.map +1 -0
- package/dist/index-types-pC_5vADQ-BOOBi14R.mjs +95 -0
- package/dist/index-types-pC_5vADQ-BOOBi14R.mjs.map +1 -0
- package/dist/index-types-snhtt_Fo.d.mts +1 -0
- package/dist/interpreter-D5qk4B---CG0C7kdx.mjs +2280 -0
- package/dist/interpreter-D5qk4B---CG0C7kdx.mjs.map +1 -0
- package/dist/{ir-Bghjt-FG.d.mts → ir-BvptQsFW.d.mts} +11 -5
- package/dist/ir-BvptQsFW.d.mts.map +1 -0
- package/dist/{ir-I-xciGUH.mjs → ir-DzsUDO8e.mjs} +2 -2
- package/dist/ir-DzsUDO8e.mjs.map +1 -0
- package/dist/{middleware-AhTz1BOW-th-Suxuf.d.mts → middleware-DHkW6pRr-DM6hd9iZ.d.mts} +5 -5
- package/dist/middleware-DHkW6pRr-DM6hd9iZ.d.mts.map +1 -0
- package/dist/middleware-gqy3l13N.d.mts +1 -0
- package/dist/{middleware-CMr4CHNz-DHIUdxlm.mjs → middleware-yBAfiVWn-DZO0vCRQ.mjs} +3 -3
- package/dist/middleware-yBAfiVWn-DZO0vCRQ.mjs.map +1 -0
- package/dist/{migration-CK4oePIo.mjs → migration-BJQjkqFz.mjs} +4 -4
- package/dist/migration-BJQjkqFz.mjs.map +1 -0
- package/dist/{migration-CjDRZNep.d.mts → migration-Cxmpzaz0.d.mts} +6 -6
- package/dist/migration-Cxmpzaz0.d.mts.map +1 -0
- package/dist/{naming-CV9j2pXl-KARaDReS.d.mts → naming-BcD36g9T-Mfe_xGGL.d.mts} +9 -14
- package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +1 -0
- package/dist/{naming-DKr4TJd7-Cszhq9RV.mjs → naming-bM5qm5PY-jOg3JFMb.mjs} +20 -31
- package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +1 -0
- package/dist/{ddl-types-BGdnAbXo-DKPHPUGx.mjs → opaque-sql-Dset3kln-CtsPDTXn.mjs} +24 -11
- package/dist/opaque-sql-Dset3kln-CtsPDTXn.mjs.map +1 -0
- package/dist/operations.d.mts +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/orm-client.d.mts +817 -267
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +4719 -2942
- package/dist/orm-client.mjs.map +1 -1
- package/dist/pack-DA8HZ2mo.d.mts +535 -0
- package/dist/pack-DA8HZ2mo.d.mts.map +1 -0
- package/dist/pack-gSvGQWqs.mjs +80 -0
- package/dist/pack-gSvGQWqs.mjs.map +1 -0
- package/dist/{plan-CDxduYaN-pLIyyJaB.d.mts → plan-Cr4azjnG-CuL8FqXC.d.mts} +12 -8
- package/dist/plan-Cr4azjnG-CuL8FqXC.d.mts.map +1 -0
- package/dist/{plan-Dh0LbYIv-Crx5-ThG.mjs → plan-Dh0LbYIv-ubBSdUgl.mjs} +2 -2
- package/dist/plan-Dh0LbYIv-ubBSdUgl.mjs.map +1 -0
- package/dist/plan-Di6Gs2JD.d.mts +2 -0
- package/dist/psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs +42 -0
- package/dist/psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs.map +1 -0
- package/dist/psl-build-DFBG6vhz.mjs +426 -0
- package/dist/psl-build-DFBG6vhz.mjs.map +1 -0
- package/dist/psl-build-RelubU2E.d.mts +112 -0
- package/dist/psl-build-RelubU2E.d.mts.map +1 -0
- package/dist/psl-column-resolution-ChZqioOc-BREg4J7d.d.mts +24 -0
- package/dist/psl-column-resolution-ChZqioOc-BREg4J7d.d.mts.map +1 -0
- package/dist/psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs +1960 -0
- package/dist/psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs.map +1 -0
- package/dist/psl-infer--g4i84Go.mjs +201 -0
- package/dist/psl-infer--g4i84Go.mjs.map +1 -0
- package/dist/psl-infer-DzoxPZGd.d.mts +80 -0
- package/dist/psl-infer-DzoxPZGd.d.mts.map +1 -0
- package/dist/psl-names-C3cwe0rg-D1CTmC3a.mjs +66 -0
- package/dist/psl-names-C3cwe0rg-D1CTmC3a.mjs.map +1 -0
- package/dist/{query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts → query-lane-context-BCEoKy0_-CzmyavC9.d.mts} +20 -49
- package/dist/query-lane-context-BCEoKy0_-CzmyavC9.d.mts.map +1 -0
- package/dist/query-lane-context-VqH0mS9B.d.mts +1 -0
- package/dist/{referential-action-sql-DJ9ps6-S.d.mts → referential-action-sql-B2vKoUK6.d.mts} +3 -3
- package/dist/referential-action-sql-B2vKoUK6.d.mts.map +1 -0
- package/dist/{referential-action-sql-DSqkrySN.mjs → referential-action-sql-BLzCtTi8.mjs} +2 -2
- package/dist/referential-action-sql-BLzCtTi8.mjs.map +1 -0
- package/dist/relational-core.d.mts +14 -13
- package/dist/relational-core.mjs +8 -8
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +2 -2
- package/dist/relational-core__aggregate-descriptor-registry.d.mts.map +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
- package/dist/relational-core__ast.d.mts +5 -5
- package/dist/relational-core__ast.mjs +5 -5
- package/dist/relational-core__codec-descriptor-registry.d.mts +7 -8
- package/dist/relational-core__codec-descriptor-registry.d.mts.map +1 -1
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__collection-methods.d.mts +3 -0
- package/dist/relational-core__contract-free.d.mts +18 -8
- package/dist/relational-core__contract-free.d.mts.map +1 -1
- package/dist/relational-core__contract-free.mjs +26 -10
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +4 -2
- package/dist/relational-core__expression.mjs +2 -2
- package/dist/relational-core__functions.d.mts +2 -0
- package/dist/relational-core__functions.mjs +2 -0
- package/dist/relational-core__index-reference.d.mts +3 -0
- package/dist/relational-core__index-reference.mjs +2 -0
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__middleware.mjs +1 -1
- package/dist/relational-core__plan.d.mts +4 -4
- package/dist/relational-core__plan.mjs +1 -1
- package/dist/relational-core__query-lane-context.d.mts +3 -3
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{resolve-storage-table-DZsfnzeW.mjs → resolve-storage-table-BHLQsOza.mjs} +3 -3
- package/dist/resolve-storage-table-BHLQsOza.mjs.map +1 -0
- package/dist/{resolve-storage-table-Nyrgk4h8.d.mts → resolve-storage-table-DCqtmnSU.d.mts} +4 -4
- package/dist/resolve-storage-table-DCqtmnSU.d.mts.map +1 -0
- package/dist/{runtime-tIHpGCcG.mjs → runtime-6tH1yOxK.mjs} +6 -6
- package/dist/runtime-6tH1yOxK.mjs.map +1 -0
- package/dist/{runtime-DpKF2Yu2.d.mts → runtime-CF6rAlE5.d.mts} +7 -8
- package/dist/runtime-CF6rAlE5.d.mts.map +1 -0
- package/dist/runtime.d.mts +5 -5
- package/dist/runtime.mjs +2 -1799
- package/dist/runtime__internal__prepared-query.d.mts +2 -2
- package/dist/runtime__internal__prepared-query.mjs +2 -2
- package/dist/{schema-differ-DpG_gnur-DFAtGezx.d.mts → schema-differ-DmP74bB8-tqHKiJ88.d.mts} +6 -6
- package/dist/schema-differ-DmP74bB8-tqHKiJ88.d.mts.map +1 -0
- package/dist/schema-ir.d.mts +2 -2
- package/dist/schema-ir.mjs +2 -2
- package/dist/schema-ir__naming.d.mts +1 -1
- package/dist/schema-ir__naming.mjs +1 -1
- package/dist/schema-ir__types.d.mts +3 -3
- package/dist/schema-ir__types.mjs +2 -2
- package/dist/{schema-verify-C_PEdlAr-Dxxjm6EM.mjs → schema-verify-C3wbdviw-DMjIubOr.mjs} +50 -8
- package/dist/schema-verify-C3wbdviw-DMjIubOr.mjs.map +1 -0
- package/dist/{serialized-index-CrgG8ct1-DG3JpHc7.d.mts → serialized-index-CrgG8ct1-DKVJ7TDX.d.mts} +4 -4
- package/dist/serialized-index-CrgG8ct1-DKVJ7TDX.d.mts.map +1 -0
- package/dist/{serialized-index-nBTwanKy-_ddEK4tk.mjs → serialized-index-DjCCnXB1-DMA7BtO2.mjs} +4 -4
- package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +1 -0
- package/dist/{sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs → sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs} +41 -16
- package/dist/sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map +1 -0
- package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs +400 -0
- package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +1 -0
- package/dist/{sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts → sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts} +3 -3
- package/dist/sql-execution-plan-3uxYjHyu-DLknM-Pj.d.mts.map +1 -0
- package/dist/sql-expression-B4BrhGPi.d.mts +62 -0
- package/dist/sql-expression-B4BrhGPi.d.mts.map +1 -0
- package/dist/sql-expression-CKgKznXS.mjs +137 -0
- package/dist/sql-expression-CKgKznXS.mjs.map +1 -0
- package/dist/{sql-index-ByAAE7K8-DKj2V86p.d.mts → sql-index-ByAAE7K8-Dqtn_vUL.d.mts} +4 -4
- package/dist/sql-index-ByAAE7K8-Dqtn_vUL.d.mts.map +1 -0
- package/dist/{sql-node-kEz6YFZo-v2F7delx.d.mts → sql-node-kEz6YFZo-1ogT6Cxt.d.mts} +2 -2
- package/dist/sql-node-kEz6YFZo-1ogT6Cxt.d.mts.map +1 -0
- package/dist/{sql-storage-8LqxeLAY-DH4DdUXx.d.mts → sql-storage-DeCAh5Hi-CEM-m8cs.d.mts} +19 -22
- package/dist/sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map +1 -0
- package/dist/{storage-table-DSeWszOL-CI-cItEK.d.mts → storage-table-Bf1ZjnxO-pUj6pyP0.d.mts} +17 -24
- package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +1 -0
- package/dist/{storage-table-ZzbR-xzQ-BRoTQE_2.mjs → storage-table-DDvN83mw-DkbBFmK9.mjs} +12 -9
- package/dist/storage-table-DDvN83mw-DkbBFmK9.mjs.map +1 -0
- package/dist/{storage-value-set-BGlj5Uus-CvZD--GG.d.mts → storage-value-set-BGlj5Uus-ny2k-0PA.d.mts} +3 -3
- package/dist/storage-value-set-BGlj5Uus-ny2k-0PA.d.mts.map +1 -0
- package/dist/transaction-state-BfXhs7D7-DhmbySW9.mjs +45 -0
- package/dist/transaction-state-BfXhs7D7-DhmbySW9.mjs.map +1 -0
- package/dist/transaction-state-DR3nKTmH-D29jmVE-.d.mts +115 -0
- package/dist/transaction-state-DR3nKTmH-D29jmVE-.d.mts.map +1 -0
- package/dist/types-B9wSEUsV.d.mts +1 -0
- package/dist/{types-CUsJrvEl.mjs → types-CTdSkl0s.mjs} +13 -6
- package/dist/types-CTdSkl0s.mjs.map +1 -0
- package/dist/types-CkAd8SWm.d.mts +57 -0
- package/dist/types-CkAd8SWm.d.mts.map +1 -0
- package/dist/{types-IqZMLrFC-DcH8v_u3.d.mts → types-Cq6ImLAB-RlU4jJAX.d.mts} +27 -41
- package/dist/types-Cq6ImLAB-RlU4jJAX.d.mts.map +1 -0
- package/dist/{types-YStFFkKs-D9UAmnON.d.mts → types-CuCxAQat-Dz8P4xyt.d.mts} +141 -86
- package/dist/types-CuCxAQat-Dz8P4xyt.d.mts.map +1 -0
- package/dist/types-DfKvtJwS-CrpWTGBJ.d.mts +273 -0
- package/dist/types-DfKvtJwS-CrpWTGBJ.d.mts.map +1 -0
- package/dist/{types-4YenawkP-CwaaZSid.mjs → types-DoyiTsjg-2YMhMJDA.mjs} +181 -80
- package/dist/types-DoyiTsjg-2YMhMJDA.mjs.map +1 -0
- package/dist/{types-v3qxLLxo-DCeKv7yY.d.mts → types-DriMIMNQ-BkbsW7w3.d.mts} +68 -34
- package/dist/types-DriMIMNQ-BkbsW7w3.d.mts.map +1 -0
- package/dist/{types-Dt4e_jC--COeP8xzN.mjs → types-NTQsD2MS-xcLtvKO9.mjs} +83 -17
- package/dist/types-NTQsD2MS-xcLtvKO9.mjs.map +1 -0
- package/dist/{types-CyxGtOOh-BggSa6Fe.d.mts → types-TXO7x1BA-CYYIY8NI.d.mts} +14 -14
- package/dist/types-TXO7x1BA-CYYIY8NI.d.mts.map +1 -0
- package/dist/types-ljUNyiWe.d.mts +1 -0
- package/dist/{unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts → unique-constraint-M5TlQnJQ-qX-maNUV.d.mts} +3 -3
- package/dist/unique-constraint-M5TlQnJQ-qX-maNUV.d.mts.map +1 -0
- package/dist/{util-DQQgv2j1-D6INZaRG.mjs → util-BBgcP3gI-CpL-0VuC.mjs} +12 -3
- package/dist/util-BBgcP3gI-CpL-0VuC.mjs.map +1 -0
- package/dist/{validators-CrWD6bSP.mjs → validators-BwA7ttZM.mjs} +0 -0
- package/dist/validators-BwA7ttZM.mjs.map +1 -0
- package/dist/{validators-Belo8QqM.d.mts → validators-FJs8HvFr.d.mts} +54 -16
- package/dist/validators-FJs8HvFr.d.mts.map +1 -0
- package/dist/{value-set-derivation-hook-BhgGVtw0.d.mts → value-set-derivation-hook-3E437jPU.d.mts} +3 -3
- package/dist/value-set-derivation-hook-3E437jPU.d.mts.map +1 -0
- package/dist/{value-set-derivation-hook-Di9JZ0X7.mjs → value-set-derivation-hook-HVaxhALD.mjs} +2 -2
- package/dist/value-set-derivation-hook-HVaxhALD.mjs.map +1 -0
- package/dist/{verify-u0UTdZgD-DSAaz9rW.mjs → verify-BVk5bjdH-DhKm6hB3.mjs} +8 -7
- package/dist/verify-BVk5bjdH-DhKm6hB3.mjs.map +1 -0
- package/dist/{verify-zDRnw0Rn.d.mts → verify-DHXbuZPB.d.mts} +2 -2
- package/dist/verify-DHXbuZPB.d.mts.map +1 -0
- package/package.json +33 -22
- package/dist/aggregate-descriptor-registry-C7hel5O7.mjs.map +0 -1
- package/dist/ast-HFcfQZr-.d.mts +0 -206
- package/dist/ast-HFcfQZr-.d.mts.map +0 -1
- package/dist/ast-Lbl4VwqP.mjs +0 -325
- package/dist/ast-Lbl4VwqP.mjs.map +0 -1
- package/dist/authored-check-naming-BWBe-PVE.d.mts.map +0 -1
- package/dist/authored-check-naming-Hf9990DV.mjs.map +0 -1
- package/dist/authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs +0 -316
- package/dist/authoring-type-constructors-Blqoa2Ua-DqvNCOb2.mjs.map +0 -1
- package/dist/canonicalization-hooks-CYnW_sGn.d.mts.map +0 -1
- package/dist/canonicalization-hooks-dmXkOR4a.mjs.map +0 -1
- package/dist/check-constraint-B7qGu6rc-HvQjjX82.d.mts.map +0 -1
- package/dist/codec-descriptor-registry-N0dhtKaH.mjs.map +0 -1
- package/dist/config-types-D9fdKG3g.d.mts.map +0 -1
- package/dist/config-types-gAm54C_v.mjs.map +0 -1
- package/dist/contract-builder-CG_tGDbB.d.mts +0 -1360
- package/dist/contract-builder-CG_tGDbB.d.mts.map +0 -1
- package/dist/contract-builder-D4a5dT7j.mjs.map +0 -1
- package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs.map +0 -1
- package/dist/contract-view-BMR5IWk4.mjs.map +0 -1
- package/dist/contract-view-CPHxoAEX.d.mts.map +0 -1
- package/dist/contract__pack-types.d.mts +0 -2
- package/dist/control-D3cB5YQp.mjs +0 -1267
- package/dist/control-D3cB5YQp.mjs.map +0 -1
- package/dist/control-DTLJ1WtZ.d.mts +0 -945
- package/dist/control-DTLJ1WtZ.d.mts.map +0 -1
- package/dist/control-adapter-C99J7aEF-B7eQd7vD.d.mts.map +0 -1
- package/dist/control-adapter-MZJQiwcE.d.mts +0 -1
- package/dist/db-D18PrXKW-DvTv4JFn.d.mts.map +0 -1
- package/dist/ddl-types-BGdnAbXo-DKPHPUGx.mjs.map +0 -1
- package/dist/ddl-types-CXx4vPz6-BsgrnSUY.d.mts.map +0 -1
- package/dist/derived-checks-DFMRmiAu-DGfB8aS4.mjs +0 -1057
- package/dist/derived-checks-DFMRmiAu-DGfB8aS4.mjs.map +0 -1
- package/dist/derived-checks-DPdD01O0-DGqOFjs6.d.mts.map +0 -1
- package/dist/diff-B16bL_IR.mjs +0 -13
- package/dist/diff-B16bL_IR.mjs.map +0 -1
- package/dist/diff-DbTNVm2f.d.mts.map +0 -1
- package/dist/dist-C_q1_QR9.mjs.map +0 -1
- package/dist/dist-ZK6oeI5e.mjs.map +0 -1
- package/dist/dist-x6jvtkKM.mjs.map +0 -1
- package/dist/driver-types-BQtRkOJ0-Bv2RPSfr.d.mts.map +0 -1
- package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts.map +0 -1
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs +0 -11
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs.map +0 -1
- package/dist/entity-kinds-B5cUFU22.d.mts.map +0 -1
- package/dist/entity-kinds-D7vwoN_T-CCBwFJy0.mjs.map +0 -1
- package/dist/errors-B5g0xWro-mWH2C07F.mjs.map +0 -1
- package/dist/expression-CX5mTA-z.mjs.map +0 -1
- package/dist/expression-FJK6Ar-d.d.mts.map +0 -1
- package/dist/factories-P3qBQhO-.d.mts.map +0 -1
- package/dist/factories-SVor5xIT.mjs.map +0 -1
- package/dist/family__pack.d.mts.map +0 -1
- package/dist/family__pack.mjs.map +0 -1
- package/dist/foreign-key-C-iTPuRT-C9ip8zFx.d.mts.map +0 -1
- package/dist/foreign-key-materialization-CkvOzJWy.d.mts +0 -65
- package/dist/foreign-key-materialization-CkvOzJWy.d.mts.map +0 -1
- package/dist/foreign-key-materialization-Cu7-7LHl.mjs +0 -73
- package/dist/foreign-key-materialization-Cu7-7LHl.mjs.map +0 -1
- package/dist/index-C-vQOMY_.d.mts +0 -84
- package/dist/index-C-vQOMY_.d.mts.map +0 -1
- package/dist/index-C5I8D-MB.d.mts.map +0 -1
- package/dist/index-naming-Ct65z5Xk.d.mts.map +0 -1
- package/dist/index-naming-DREt6js7-CRH27yUv.mjs.map +0 -1
- package/dist/index-type-validation-COH4d78M.mjs +0 -17
- package/dist/index-type-validation-COH4d78M.mjs.map +0 -1
- package/dist/index-type-validation-CZ5L2lli.d.mts +0 -10
- package/dist/index-type-validation-CZ5L2lli.d.mts.map +0 -1
- package/dist/index-types-CNhHgKHi.d.mts +0 -1
- package/dist/index-types-DJQ_xwaE.mjs +0 -40
- package/dist/index-types-DJQ_xwaE.mjs.map +0 -1
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +0 -31
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +0 -1
- package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs +0 -3680
- package/dist/interpreter-DyiUUAWh-DYdjIpiE.mjs.map +0 -1
- package/dist/ir-Bghjt-FG.d.mts.map +0 -1
- package/dist/ir-I-xciGUH.mjs.map +0 -1
- package/dist/lane-query-builder.d.mts +0 -236
- package/dist/lane-query-builder.d.mts.map +0 -1
- package/dist/lane-query-builder.mjs +0 -67
- package/dist/lane-query-builder.mjs.map +0 -1
- package/dist/middleware--TtoxUiW.d.mts +0 -1
- package/dist/middleware-AhTz1BOW-th-Suxuf.d.mts.map +0 -1
- package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs.map +0 -1
- package/dist/migration-CK4oePIo.mjs.map +0 -1
- package/dist/migration-CjDRZNep.d.mts.map +0 -1
- package/dist/naming-CV9j2pXl-KARaDReS.d.mts.map +0 -1
- package/dist/naming-DKr4TJd7-Cszhq9RV.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-BHLdb0Z7.d.mts +0 -2
- package/dist/plan-CDxduYaN-pLIyyJaB.d.mts.map +0 -1
- package/dist/plan-Dh0LbYIv-Crx5-ThG.mjs.map +0 -1
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs +0 -22
- package/dist/prepared-query-BJr50wPm-ChoqfJbX.mjs.map +0 -1
- package/dist/prepared-statement-9QpkE6JG-C430V3MO.d.mts +0 -529
- package/dist/prepared-statement-9QpkE6JG-C430V3MO.d.mts.map +0 -1
- package/dist/psl-infer-CCAD6FWA.d.mts +0 -119
- package/dist/psl-infer-CCAD6FWA.d.mts.map +0 -1
- package/dist/psl-infer-Dk5kgKre.mjs +0 -362
- package/dist/psl-infer-Dk5kgKre.mjs.map +0 -1
- package/dist/query-lane-context-Qa-eddrE-kuZ8Z86-.d.mts.map +0 -1
- package/dist/query-lane-context-XMvk7fmY.d.mts +0 -1
- package/dist/referential-action-sql-DJ9ps6-S.d.mts.map +0 -1
- package/dist/referential-action-sql-DSqkrySN.mjs.map +0 -1
- package/dist/resolve-storage-table-DZsfnzeW.mjs.map +0 -1
- package/dist/resolve-storage-table-Nyrgk4h8.d.mts.map +0 -1
- package/dist/runtime-DpKF2Yu2.d.mts.map +0 -1
- package/dist/runtime-tIHpGCcG.mjs.map +0 -1
- package/dist/runtime.mjs.map +0 -1
- package/dist/schema-differ-DpG_gnur-DFAtGezx.d.mts.map +0 -1
- package/dist/schema-verify-C_PEdlAr-Dxxjm6EM.mjs.map +0 -1
- package/dist/serialized-index-CrgG8ct1-DG3JpHc7.d.mts.map +0 -1
- package/dist/serialized-index-nBTwanKy-_ddEK4tk.mjs.map +0 -1
- package/dist/sql-contract-serializer-2oBWuxTe-DKZTf2n8.mjs.map +0 -1
- package/dist/sql-execution-plan--jKyLpe5-CMGhgO0M.d.mts.map +0 -1
- package/dist/sql-index-ByAAE7K8-DKj2V86p.d.mts.map +0 -1
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts.map +0 -1
- package/dist/sql-storage-8LqxeLAY-DH4DdUXx.d.mts.map +0 -1
- package/dist/storage-table-DSeWszOL-CI-cItEK.d.mts.map +0 -1
- package/dist/storage-table-ZzbR-xzQ-BRoTQE_2.mjs.map +0 -1
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts.map +0 -1
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs +0 -173
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs.map +0 -1
- package/dist/types-4YenawkP-CwaaZSid.mjs.map +0 -1
- package/dist/types-B0msOnBM.d.mts +0 -1
- package/dist/types-BDUG29Df-LE85dIXP.d.mts +0 -161
- package/dist/types-BDUG29Df-LE85dIXP.d.mts.map +0 -1
- package/dist/types-CUsJrvEl.mjs.map +0 -1
- package/dist/types-CyxGtOOh-BggSa6Fe.d.mts.map +0 -1
- package/dist/types-Dt4e_jC--COeP8xzN.mjs.map +0 -1
- package/dist/types-Dwcw0F8X.d.mts +0 -1
- package/dist/types-IqZMLrFC-DcH8v_u3.d.mts.map +0 -1
- package/dist/types-UcHa2cTe.d.mts +0 -17
- package/dist/types-UcHa2cTe.d.mts.map +0 -1
- package/dist/types-YStFFkKs-D9UAmnON.d.mts.map +0 -1
- package/dist/types-v3qxLLxo-DCeKv7yY.d.mts.map +0 -1
- package/dist/unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts.map +0 -1
- package/dist/util-DQQgv2j1-D6INZaRG.mjs.map +0 -1
- package/dist/validators-Belo8QqM.d.mts.map +0 -1
- package/dist/validators-CrWD6bSP.mjs.map +0 -1
- package/dist/value-set-derivation-hook-BhgGVtw0.d.mts.map +0 -1
- package/dist/value-set-derivation-hook-Di9JZ0X7.mjs.map +0 -1
- package/dist/verify-u0UTdZgD-DSAaz9rW.mjs.map +0 -1
- package/dist/verify-zDRnw0Rn.d.mts.map +0 -1
- /package/dist/{contract__pack-types.mjs → relational-core__collection-methods.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @prisma/orm-family-sql
|
|
2
2
|
|
|
3
|
-
The SQL family domain of Prisma
|
|
3
|
+
The SQL family domain of Prisma 8: the SQL contract surface, schema IR, query lanes, SQL builder, and the SQL runtime shared by every SQL target (Postgres, SQLite).
|
|
4
4
|
|
|
5
5
|
Applications receive it as an exact-pinned dependency of a SQL facade (`@prisma/orm-postgres`, `@prisma/orm-sqlite`); app developers install the facade. Extension authors and decomposed installs building against the SQL family import it directly.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ Applications receive it as an exact-pinned dependency of a SQL facade (`@prisma/
|
|
|
12
12
|
| `/schema-ir` | SQL schema intermediate representation |
|
|
13
13
|
| `/contract-psl`, `/contract-ts` | PSL and TypeScript contract authoring for SQL |
|
|
14
14
|
| `/contract-emitter` | SQL contract emission |
|
|
15
|
-
| `/relational-core`, `/
|
|
15
|
+
| `/relational-core`, `/builder` | query lanes, relational AST, SQL builder |
|
|
16
16
|
| `/runtime` | SQL runtime |
|
|
17
17
|
| `/orm-client` | the fluent, type-safe ORM client over SQL model collections |
|
|
18
18
|
| `/family` | the family pack: control, migration, diff, IR, verification |
|
|
@@ -22,7 +22,3 @@ Applications receive it as an exact-pinned dependency of a SQL facade (`@prisma/
|
|
|
22
22
|
Everything SQL databases share and nothing any one of them owns: contract semantics, relational query building, the ORM client, and the family-level control/migration surface. Target-specific behavior (Postgres or SQLite DDL, drivers) lives in the `@prisma/orm-target-*` packages.
|
|
23
23
|
|
|
24
24
|
The ORM client sits here rather than in a facade because both SQL facades use it and a module may be published from only one package. Its source still lives in `packages/3-extensions/sql-orm-client/` for historical reasons; the directory does not make it a user-installed extension.
|
|
25
|
-
|
|
26
|
-
## Dependencies
|
|
27
|
-
|
|
28
|
-
`@prisma/orm-framework` and `@prisma/orm-toolchain` (exact lockstep pins) plus small third-party runtime libraries. No database drivers.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { B as aggregateFnNames, H as frozenCodecRef, U as isAggregateFn } from "./types-NTQsD2MS-xcLtvKO9.mjs";
|
|
2
2
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from "@prisma/orm-framework/components/components";
|
|
5
|
-
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs
|
|
5
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs
|
|
6
6
|
/** Structural validation of a contributed SQL aggregate descriptor: the declarative shape plus a callable lowering hook where one is declared. */
|
|
7
7
|
function isSqlAggregateDescriptor(value) {
|
|
8
8
|
if (!isAggregateDescriptor(value)) return false;
|
|
@@ -18,7 +18,7 @@ function namedOutputRef(output, input) {
|
|
|
18
18
|
function resultNullability(descriptor) {
|
|
19
19
|
return descriptor.nullable ? { nullable: true } : {
|
|
20
20
|
nullable: false,
|
|
21
|
-
|
|
21
|
+
emptyResultWire: descriptor.emptyResultWire
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -32,7 +32,7 @@ function buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {
|
|
|
32
32
|
for (const candidate of descriptors) {
|
|
33
33
|
if (!isSqlAggregateDescriptor(candidate)) throw structuredError("RUNTIME.AGGREGATE_DESCRIPTOR_INVALID", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {
|
|
34
34
|
why: "Aggregate resolution reads a declared operation, input match, result codec, and nullability — plus, for a non-nullable result, the empty-result value; a lowering hook, where present, must be callable.",
|
|
35
|
-
fix: "Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `
|
|
35
|
+
fix: "Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultWire` where `nullable` is false.",
|
|
36
36
|
meta: { descriptor: describeCandidate(candidate) }
|
|
37
37
|
});
|
|
38
38
|
const key = aggregateDescriptorKey(candidate);
|
|
@@ -123,4 +123,4 @@ function describeCandidate(value) {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
export { isSqlAggregateDescriptor as n, buildSqlAggregateDescriptorRegistry as t };
|
|
125
125
|
|
|
126
|
-
//# sourceMappingURL=aggregate-descriptor-registry-
|
|
126
|
+
//# sourceMappingURL=aggregate-descriptor-registry-ZrKjxwQe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate-descriptor-registry-ZrKjxwQe.mjs","names":[],"sources":["../../../../2-sql-family/4-lanes/relational-core/dist/exports/aggregate-descriptor-registry.mjs"],"sourcesContent":["import { B as aggregateFnNames, H as isAggregateFn, Y as frozenCodecRef } from \"../types-NTQsD2MS.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { aggregateDescriptorKey, isAggregateDescriptor, isAnyInputAggregateDescriptor, isNoInputAggregateDescriptor, settleAggregateOverloads } from \"@internal/framework-components/components\";\n//#region src/aggregate-descriptor.ts\n/** Structural validation of a contributed SQL aggregate descriptor: the declarative shape plus a callable lowering hook where one is declared. */\nfunction isSqlAggregateDescriptor(value) {\n\tif (!isAggregateDescriptor(value)) return false;\n\treturn !(\"lower\" in value) || value.lower === void 0 || typeof value.lower === \"function\";\n}\n//#endregion\n//#region src/aggregate-descriptor-registry.ts\nfunction namedOutputRef(output, input) {\n\treturn frozenCodecRef({\n\t\tcodecId: output.codecId,\n\t\t...ifDefined(\"typeParams\", output.typeParams?.(input))\n\t});\n}\n/** The descriptor's own answer for a result set carrying no row, carried into resolution unchanged. */\nfunction resultNullability(descriptor) {\n\treturn descriptor.nullable ? { nullable: true } : {\n\t\tnullable: false,\n\t\temptyResultWire: descriptor.emptyResultWire\n\t};\n}\n/**\n* Validate every contributed aggregate descriptor and settle its matches against the composed codec set.\n*\n* Validation covers the descriptor's own shape, the lowering rule — an operation outside the closed SQL aggregate alphabet must carry a `lower` hook, there being no plain `AggregateExpr` form for it — a second claim on one `(operation, input)` pair, and two trait descriptors that both claim a registered codec for one operation — the last of which only a composed stack can detect, which is why it is settled here rather than at contribution.\n*/\nfunction buildSqlAggregateDescriptorRegistry(descriptors, codecDescriptors) {\n\tconst validated = [];\n\tconst claimedKeys = /* @__PURE__ */ new Set();\n\tfor (const candidate of descriptors) {\n\t\tif (!isSqlAggregateDescriptor(candidate)) throw structuredError(\"RUNTIME.AGGREGATE_DESCRIPTOR_INVALID\", `Contributed value ${describeCandidate(candidate)} is not a valid SQL aggregate descriptor.`, {\n\t\t\twhy: \"Aggregate resolution reads a declared operation, input match, result codec, and nullability — plus, for a non-nullable result, the empty-result value; a lowering hook, where present, must be callable.\",\n\t\t\tfix: \"Declare `operation`, `input` (`none` / `any` / `codec` / `trait`), `output` (`self` / `codec`), and `nullable` on the descriptor, adding `emptyResultWire` where `nullable` is false.\",\n\t\t\tmeta: { descriptor: describeCandidate(candidate) }\n\t\t});\n\t\tconst key = aggregateDescriptorKey(candidate);\n\t\tif (!isAggregateFn(candidate.operation) && candidate.lower === void 0) throw structuredError(\"RUNTIME.AGGREGATE_LOWERING_MISSING\", `Aggregate descriptor '${key}' declares operation '${candidate.operation}', which is outside the SQL aggregate alphabet (${[...aggregateFnNames].join(\", \")}) and carries no lowering hook.`, {\n\t\t\twhy: \"An operation in the alphabet lowers to a plain aggregate call; renderers know no other operation, so any other name must build its expression through a `lower` hook from existing nodes.\",\n\t\t\tfix: \"Declare a `lower` hook on the descriptor, or use an operation name from the SQL aggregate alphabet.\",\n\t\t\tmeta: {\n\t\t\t\toperation: candidate.operation,\n\t\t\t\tkey\n\t\t\t}\n\t\t});\n\t\tif (claimedKeys.has(key)) throw structuredError(\"RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR\", `Duplicate aggregate descriptor for '${key}'.`, {\n\t\t\twhy: \"Each operation/input pair resolves to exactly one result codec, so exactly one component may claim it.\",\n\t\t\tfix: \"Remove the duplicate target, adapter, or extension contribution.\",\n\t\t\tmeta: { key }\n\t\t});\n\t\tclaimedKeys.add(key);\n\t\tvalidated.push(candidate);\n\t}\n\tconst settled = settleAggregateOverloads(validated, codecDescriptors.values());\n\tconst ambiguity = settled.ambiguities[0];\n\tif (ambiguity !== void 0) throw structuredError(\"RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR\", `Ambiguous aggregate descriptors for '${ambiguity.operation}' over codec '${ambiguity.codecId}': traits ${ambiguity.traits.join(\", \")} all claim it.`, {\n\t\twhy: \"A codec advertising several claimed traits leaves the result codec undetermined.\",\n\t\tfix: `Contribute an exact descriptor for '${ambiguity.operation}' over '${ambiguity.codecId}', or narrow the overlapping trait contributions.`,\n\t\tmeta: {\n\t\t\toperation: ambiguity.operation,\n\t\t\tcodecId: ambiguity.codecId,\n\t\t\ttraits: ambiguity.traits\n\t\t}\n\t});\n\tfor (const descriptor of validated) {\n\t\tconst outputCodecId = descriptor.output.kind === \"codec\" ? descriptor.output.codecId : descriptor.input.kind === \"codec\" ? descriptor.input.codecId : void 0;\n\t\tif (outputCodecId !== void 0 && codecDescriptors.descriptorFor(outputCodecId) === void 0) {\n\t\t\tconst key = aggregateDescriptorKey(descriptor);\n\t\t\tthrow structuredError(\"RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING\", `Aggregate descriptor '${key}' names result codec '${outputCodecId}', which the composed stack does not register.`, {\n\t\t\t\twhy: \"A resolved aggregate decodes its result through the declared codec; a codec the stack does not compose cannot decode anything.\",\n\t\t\t\tfix: \"Register the codec on the composed stack, or declare a result codec the stack composes.\",\n\t\t\t\tmeta: {\n\t\t\t\t\toperation: descriptor.operation,\n\t\t\t\t\tkey,\n\t\t\t\t\toutputCodecId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tconst tables = /* @__PURE__ */ new Map();\n\tfor (const [operation, entry] of settled.operations) tables.set(operation, {\n\t\twithoutInput: resolveWithoutInput(operation, entry.noInput) ?? resolveWithoutInput(operation, entry.anyInput),\n\t\tbyCodecId: entry.byCodecId,\n\t\tanyInput: entry.anyInput\n\t});\n\treturn {\n\t\tresolve(operation, input) {\n\t\t\tconst table = tables.get(operation);\n\t\t\tif (table === void 0) return void 0;\n\t\t\tif (input === void 0) return table.withoutInput;\n\t\t\tconst descriptor = table.byCodecId.get(input.codecId) ?? table.anyInput;\n\t\t\tif (descriptor === void 0) return void 0;\n\t\t\treturn {\n\t\t\t\toperation,\n\t\t\t\toutput: descriptor.output.kind === \"self\" ? frozenCodecRef(input) : namedOutputRef(descriptor.output, input),\n\t\t\t\t...resultNullability(descriptor),\n\t\t\t\tlower: descriptor.lower\n\t\t\t};\n\t\t},\n\t\t*values() {\n\t\t\tyield* validated;\n\t\t}\n\t};\n}\n/**\n* Resolve the overload that answers a call carrying no input. Both kinds that qualify name their result codec outright, there being no input codec to reuse.\n*/\nfunction resolveWithoutInput(operation, descriptor) {\n\tif (descriptor === void 0) return void 0;\n\tif (!isNoInputAggregateDescriptor(descriptor) && !isAnyInputAggregateDescriptor(descriptor)) return;\n\treturn {\n\t\toperation,\n\t\toutput: namedOutputRef(descriptor.output, void 0),\n\t\t...resultNullability(descriptor),\n\t\tlower: descriptor.lower\n\t};\n}\nfunction describeCandidate(value) {\n\tif (typeof value === \"object\" && value !== null && \"operation\" in value) return `'${String(value.operation)}'`;\n\treturn `of type ${typeof value}`;\n}\n//#endregion\nexport { buildSqlAggregateDescriptorRegistry, isSqlAggregateDescriptor };\n\n//# sourceMappingURL=aggregate-descriptor-registry.mjs.map"],"mappings":";;;;;;AAMA,SAAS,yBAAyB,OAAO;CACxC,IAAI,CAAC,sBAAsB,KAAK,GAAG,OAAO;CAC1C,OAAO,EAAE,WAAW,UAAU,MAAM,UAAU,KAAK,KAAK,OAAO,MAAM,UAAU;AAChF;AAGA,SAAS,eAAe,QAAQ,OAAO;CACtC,OAAO,eAAe;EACrB,SAAS,OAAO;EAChB,GAAG,UAAU,cAAc,OAAO,aAAa,KAAK,CAAC;CACtD,CAAC;AACF;;AAEA,SAAS,kBAAkB,YAAY;CACtC,OAAO,WAAW,WAAW,EAAE,UAAU,KAAK,IAAI;EACjD,UAAU;EACV,iBAAiB,WAAW;CAC7B;AACD;;;;;;AAMA,SAAS,oCAAoC,aAAa,kBAAkB;CAC3E,MAAM,YAAY,CAAC;CACnB,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,aAAa,aAAa;EACpC,IAAI,CAAC,yBAAyB,SAAS,GAAG,MAAM,gBAAgB,wCAAwC,qBAAqB,kBAAk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@@
|
|
|
1
|
+
import { H as frozenCodecRef } from "./types-NTQsD2MS-xcLtvKO9.mjs";
|
|
2
|
+
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
|
+
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
|
+
import { withoutTrailing } from "@prisma/orm-framework/utils/text";
|
|
5
|
+
import { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, floatToJson, readContractValue, readJsonFloat, readJsonInteger } from "@prisma/orm-framework/components/codec";
|
|
6
|
+
import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
7
|
+
//#region ../../../2-sql-family/4-lanes/relational-core/dist/exports/ast.mjs
|
|
8
|
+
/**
|
|
9
|
+
* 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.
|
|
10
|
+
*
|
|
11
|
+
* 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.
|
|
12
|
+
*/
|
|
13
|
+
async function encodeLiteralDefault(codecLookup, codecRef, value, where) {
|
|
14
|
+
const codec = codecForRef(codecLookup, codecRef);
|
|
15
|
+
if (codec === void 0) return void 0;
|
|
16
|
+
const refused = (cause) => refusedDefault(where, codecRef.codecId, value, void 0, cause);
|
|
17
|
+
if (value instanceof Date) return encodeDate(codec, value, refused);
|
|
18
|
+
return encodeWithCodec(codec, codecRef, value, refused);
|
|
19
|
+
}
|
|
20
|
+
async function encodeDate(codec, value, refused) {
|
|
21
|
+
let decoded;
|
|
22
|
+
try {
|
|
23
|
+
decoded = codec.fromDataTypeValue(codec.toDataTypeValue(value));
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (isInternalError(error)) throw error;
|
|
26
|
+
throw refused(error);
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
kind: "wire",
|
|
30
|
+
wire: await codec.toWire(decoded, {})
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 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.
|
|
35
|
+
*/
|
|
36
|
+
async function encodeListLiteralDefault(codecLookup, codecRef, elements, where) {
|
|
37
|
+
const codec = codecForRef(codecLookup, codecRef);
|
|
38
|
+
if (codec === void 0) return void 0;
|
|
39
|
+
return Promise.all(elements.map((element, index) => encodeWithCodec(codec, codecRef, element, (cause) => refusedDefault(where, codecRef.codecId, element, index + 1, cause))));
|
|
40
|
+
}
|
|
41
|
+
async function encodeWithCodec(codec, codecRef, value, refused) {
|
|
42
|
+
let decoded;
|
|
43
|
+
try {
|
|
44
|
+
decoded = readContractValue(codec, value, codecRef.typeParams);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (isInternalError(error)) throw error;
|
|
47
|
+
if (value === null) return { kind: "sql-null" };
|
|
48
|
+
throw refused(error);
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
kind: "wire",
|
|
52
|
+
wire: await codec.toWire(decoded, {})
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function refusedDefault(where, codecId, value, elementPosition, cause) {
|
|
56
|
+
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
57
|
+
const subject = elementPosition === void 0 ? "default" : `default (element ${elementPosition})`;
|
|
58
|
+
return structuredError("CONTRACT.DEFAULT_INVALID", `Column "${where.table}"."${where.column}" has a ${subject} its codec ${codecId} refuses: ${reason}`, {
|
|
59
|
+
why: "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.",
|
|
60
|
+
fix: "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.",
|
|
61
|
+
cause,
|
|
62
|
+
meta: {
|
|
63
|
+
table: where.table,
|
|
64
|
+
column: where.column,
|
|
65
|
+
codecId,
|
|
66
|
+
value,
|
|
67
|
+
...ifDefined("elementPosition", elementPosition),
|
|
68
|
+
reason: "codec-refused-default"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
var JsonValueProjection = class {
|
|
73
|
+
value;
|
|
74
|
+
constructor(value) {
|
|
75
|
+
this.value = value;
|
|
76
|
+
}
|
|
77
|
+
fold(folder) {
|
|
78
|
+
return this.value.fold(folder);
|
|
79
|
+
}
|
|
80
|
+
collectColumnRefs() {
|
|
81
|
+
return this.value.collectColumnRefs();
|
|
82
|
+
}
|
|
83
|
+
collectParamRefs() {
|
|
84
|
+
return this.value.collectParamRefs();
|
|
85
|
+
}
|
|
86
|
+
freeze() {
|
|
87
|
+
Object.freeze(this);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {
|
|
91
|
+
kind = "codec";
|
|
92
|
+
codec;
|
|
93
|
+
constructor(value, codec) {
|
|
94
|
+
super(value);
|
|
95
|
+
this.codec = frozenCodecRef(codec);
|
|
96
|
+
this.freeze();
|
|
97
|
+
}
|
|
98
|
+
accept(visitor) {
|
|
99
|
+
return visitor.codec(this);
|
|
100
|
+
}
|
|
101
|
+
rewrite(rewriter) {
|
|
102
|
+
return new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {
|
|
106
|
+
kind = "native";
|
|
107
|
+
constructor(value) {
|
|
108
|
+
super(value);
|
|
109
|
+
this.freeze();
|
|
110
|
+
}
|
|
111
|
+
accept(visitor) {
|
|
112
|
+
return visitor.native(this);
|
|
113
|
+
}
|
|
114
|
+
rewrite(rewriter) {
|
|
115
|
+
return new NativeJsonValueProjection(this.value.rewrite(rewriter));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {
|
|
119
|
+
kind = "document";
|
|
120
|
+
constructor(value) {
|
|
121
|
+
super(value);
|
|
122
|
+
this.freeze();
|
|
123
|
+
}
|
|
124
|
+
accept(visitor) {
|
|
125
|
+
return visitor.document(this);
|
|
126
|
+
}
|
|
127
|
+
rewrite(rewriter) {
|
|
128
|
+
return new JsonDocumentProjection(this.value.rewrite(rewriter));
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
/** The `ORM.LOCK_INCOMPATIBLE` error for a lock refused because of `conflict`. */
|
|
132
|
+
function lockIncompatible(conflict, message) {
|
|
133
|
+
return structuredError("ORM.LOCK_INCOMPATIBLE", message, { meta: { conflict } });
|
|
134
|
+
}
|
|
135
|
+
/** The capability each lock strength needs. */
|
|
136
|
+
const lockStrengthCapabilities = {
|
|
137
|
+
forUpdate: { sql: { forUpdate: true } },
|
|
138
|
+
forNoKeyUpdate: { postgres: { forNoKeyUpdate: true } },
|
|
139
|
+
forShare: { sql: { forShare: true } },
|
|
140
|
+
forKeyShare: { postgres: { forKeyShare: true } }
|
|
141
|
+
};
|
|
142
|
+
/** The capability each locking option needs; the wait-policy keys equal the `LockWaitPolicy` values. */
|
|
143
|
+
const lockOptionCapabilities = {
|
|
144
|
+
of: { sql: { lockOf: true } },
|
|
145
|
+
nowait: { sql: { lockNowait: true } },
|
|
146
|
+
skipLocked: { sql: { lockSkipLocked: true } }
|
|
147
|
+
};
|
|
148
|
+
/** The first flag in `requirement` that `capabilities` does not report as `true`, as `group.flag`. */
|
|
149
|
+
function missingCapability(capabilities, requirement) {
|
|
150
|
+
for (const [group, flags] of Object.entries(requirement)) for (const flag of Object.keys(flags)) if (capabilities[group]?.[flag] !== true) return `${group}.${flag}`;
|
|
151
|
+
}
|
|
152
|
+
/** Turns `{ nowait, skipLocked }` into a wait policy, refusing both together with `ORM.ARGUMENT_INVALID`. */
|
|
153
|
+
function lockWaitPolicyOf(methodName, options) {
|
|
154
|
+
if (options?.nowait && options.skipLocked) throw structuredError("ORM.ARGUMENT_INVALID", `${methodName}() takes nowait or skipLocked, not both`, { meta: { method: methodName } });
|
|
155
|
+
if (options?.nowait) return "nowait";
|
|
156
|
+
if (options?.skipLocked) return "skipLocked";
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 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`).
|
|
160
|
+
*
|
|
161
|
+
* 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.
|
|
162
|
+
*/
|
|
163
|
+
const SQL_CHAR_CODEC_ID = "sql/char@1";
|
|
164
|
+
const SQL_VARCHAR_CODEC_ID = "sql/varchar@1";
|
|
165
|
+
const SQL_INT_CODEC_ID = "sql/int@1";
|
|
166
|
+
const SQL_FLOAT_CODEC_ID = "sql/float@1";
|
|
167
|
+
const SQL_TEXT_CODEC_ID = "sql/text@1";
|
|
168
|
+
const SQL_RAW_CODEC_ID = "sql/raw@1";
|
|
169
|
+
const sqlCharEncode = (value) => value;
|
|
170
|
+
/** 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. */
|
|
171
|
+
const sqlCharDecode = (wire) => withoutTrailing(wire, " ");
|
|
172
|
+
const sqlVarcharEncode = (value) => value;
|
|
173
|
+
const sqlVarcharDecode = (wire) => wire;
|
|
174
|
+
const sqlIntEncode = (value) => value;
|
|
175
|
+
const sqlIntDecode = (wire) => wire;
|
|
176
|
+
const sqlFloatEncode = (value) => value;
|
|
177
|
+
const sqlFloatDecode = (wire) => wire;
|
|
178
|
+
const sqlTextEncode = (value) => value;
|
|
179
|
+
const sqlTextDecode = (wire) => wire;
|
|
180
|
+
/** 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. */
|
|
181
|
+
function unadapted(codecId) {
|
|
182
|
+
throw 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.`);
|
|
183
|
+
}
|
|
184
|
+
var SqlTextCodec = class extends CodecImpl {
|
|
185
|
+
async toWire(value, _ctx) {
|
|
186
|
+
return sqlTextEncode(value);
|
|
187
|
+
}
|
|
188
|
+
async fromWire(wire, _ctx) {
|
|
189
|
+
return sqlTextDecode(wire);
|
|
190
|
+
}
|
|
191
|
+
fromDataTypeValue(value) {
|
|
192
|
+
return value.value;
|
|
193
|
+
}
|
|
194
|
+
toDataTypeValue(input) {
|
|
195
|
+
return this.dataTypeValueOf(input);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var SqlTextDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
199
|
+
codecId = SQL_TEXT_CODEC_ID;
|
|
200
|
+
traits = [
|
|
201
|
+
"equality",
|
|
202
|
+
"order",
|
|
203
|
+
"textual"
|
|
204
|
+
];
|
|
205
|
+
paramsSchema = void 0;
|
|
206
|
+
factory() {
|
|
207
|
+
return () => unadapted(this.codecId);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const sqlTextDescriptor = new SqlTextDescriptor();
|
|
211
|
+
const sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0);
|
|
212
|
+
var SqlIntCodec = class extends CodecImpl {
|
|
213
|
+
async toWire(value, _ctx) {
|
|
214
|
+
return sqlIntEncode(value);
|
|
215
|
+
}
|
|
216
|
+
async fromWire(wire, _ctx) {
|
|
217
|
+
return sqlIntDecode(wire);
|
|
218
|
+
}
|
|
219
|
+
/** A `number` holds an integer exactly only within the safe integer range. */
|
|
220
|
+
fromDataTypeValue(value) {
|
|
221
|
+
return readJsonInteger(this.id, value.value, SAFE_INTEGER_RANGE);
|
|
222
|
+
}
|
|
223
|
+
toDataTypeValue(input) {
|
|
224
|
+
return this.dataTypeValueOf(input);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
var SqlIntDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
228
|
+
codecId = SQL_INT_CODEC_ID;
|
|
229
|
+
traits = [
|
|
230
|
+
"equality",
|
|
231
|
+
"order",
|
|
232
|
+
"numeric"
|
|
233
|
+
];
|
|
234
|
+
paramsSchema = void 0;
|
|
235
|
+
factory() {
|
|
236
|
+
return () => unadapted(this.codecId);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const sqlIntDescriptor = new SqlIntDescriptor();
|
|
240
|
+
const sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0);
|
|
241
|
+
var SqlFloatCodec = class extends CodecImpl {
|
|
242
|
+
async toWire(value, _ctx) {
|
|
243
|
+
return sqlFloatEncode(value);
|
|
244
|
+
}
|
|
245
|
+
async fromWire(wire, _ctx) {
|
|
246
|
+
return sqlFloatDecode(wire);
|
|
247
|
+
}
|
|
248
|
+
fromDataTypeValue(value) {
|
|
249
|
+
return readJsonFloat(this.id, value.value);
|
|
250
|
+
}
|
|
251
|
+
toDataTypeValue(input) {
|
|
252
|
+
return this.dataTypeValueOf(floatToJson(input));
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
var SqlFloatDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
256
|
+
codecId = SQL_FLOAT_CODEC_ID;
|
|
257
|
+
traits = [
|
|
258
|
+
"equality",
|
|
259
|
+
"order",
|
|
260
|
+
"numeric"
|
|
261
|
+
];
|
|
262
|
+
paramsSchema = void 0;
|
|
263
|
+
factory() {
|
|
264
|
+
return () => unadapted(this.codecId);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const sqlFloatDescriptor = new SqlFloatDescriptor();
|
|
268
|
+
const sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0);
|
|
269
|
+
var SqlCharCodec = class extends CodecImpl {
|
|
270
|
+
async toWire(value, _ctx) {
|
|
271
|
+
return sqlCharEncode(value);
|
|
272
|
+
}
|
|
273
|
+
async fromWire(wire, _ctx) {
|
|
274
|
+
return sqlCharDecode(wire);
|
|
275
|
+
}
|
|
276
|
+
fromDataTypeValue(value) {
|
|
277
|
+
return value.value;
|
|
278
|
+
}
|
|
279
|
+
toDataTypeValue(input) {
|
|
280
|
+
return this.dataTypeValueOf(input);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
var SqlCharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
284
|
+
codecId = SQL_CHAR_CODEC_ID;
|
|
285
|
+
traits = [
|
|
286
|
+
"equality",
|
|
287
|
+
"order",
|
|
288
|
+
"textual"
|
|
289
|
+
];
|
|
290
|
+
paramsSchema = void 0;
|
|
291
|
+
factory(_params) {
|
|
292
|
+
return () => unadapted(this.codecId);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
const sqlCharDescriptor = new SqlCharDescriptor();
|
|
296
|
+
const sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params);
|
|
297
|
+
var SqlVarcharCodec = class extends CodecImpl {
|
|
298
|
+
async toWire(value, _ctx) {
|
|
299
|
+
return sqlVarcharEncode(value);
|
|
300
|
+
}
|
|
301
|
+
async fromWire(wire, _ctx) {
|
|
302
|
+
return sqlVarcharDecode(wire);
|
|
303
|
+
}
|
|
304
|
+
fromDataTypeValue(value) {
|
|
305
|
+
return value.value;
|
|
306
|
+
}
|
|
307
|
+
toDataTypeValue(input) {
|
|
308
|
+
return this.dataTypeValueOf(input);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
var SqlVarcharDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
312
|
+
codecId = SQL_VARCHAR_CODEC_ID;
|
|
313
|
+
traits = [
|
|
314
|
+
"equality",
|
|
315
|
+
"order",
|
|
316
|
+
"textual"
|
|
317
|
+
];
|
|
318
|
+
paramsSchema = void 0;
|
|
319
|
+
factory(_params) {
|
|
320
|
+
return () => unadapted(this.codecId);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
const sqlVarcharDescriptor = new SqlVarcharDescriptor();
|
|
324
|
+
const sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params);
|
|
325
|
+
function isJsonValue(value) {
|
|
326
|
+
if (value === null) return true;
|
|
327
|
+
switch (typeof value) {
|
|
328
|
+
case "string":
|
|
329
|
+
case "boolean": return true;
|
|
330
|
+
case "number": return Number.isFinite(value);
|
|
331
|
+
case "object":
|
|
332
|
+
if (Array.isArray(value)) return value.every(isJsonValue);
|
|
333
|
+
return Object.getPrototypeOf(value) === Object.prototype && Object.values(value).every(isJsonValue);
|
|
334
|
+
default: return false;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* The codec of a raw column, whose type no other data type claims. Values pass through unchanged and
|
|
339
|
+
* are typed `unknown`, since nothing is known about them beyond what the database returns. A raw
|
|
340
|
+
* column has no literal values, but that is its data type's rule: the data type's reader refuses
|
|
341
|
+
* every value, so `toDataTypeValue` refuses every literal. ADR 273.
|
|
342
|
+
*/
|
|
343
|
+
var SqlRawCodec = class extends CodecImpl {
|
|
344
|
+
async toWire(value, _ctx) {
|
|
345
|
+
return value;
|
|
346
|
+
}
|
|
347
|
+
async fromWire(wire, _ctx) {
|
|
348
|
+
return wire;
|
|
349
|
+
}
|
|
350
|
+
fromDataTypeValue(value) {
|
|
351
|
+
return value.value;
|
|
352
|
+
}
|
|
353
|
+
toDataTypeValue(input) {
|
|
354
|
+
if (isJsonValue(input)) return this.dataTypeValueOf(input);
|
|
355
|
+
throw structuredError("RUNTIME.ENCODE_FAILED", `${this.id} writes only JSON values as JSON`, { meta: { codecId: this.id } });
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
var SqlRawDescriptor = class extends CodecDescriptorTemplateImpl {
|
|
359
|
+
codecId = SQL_RAW_CODEC_ID;
|
|
360
|
+
traits = [];
|
|
361
|
+
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.";
|
|
362
|
+
paramsSchema = void 0;
|
|
363
|
+
factory(_params) {
|
|
364
|
+
return () => unadapted(this.codecId);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
const sqlRawDescriptor = new SqlRawDescriptor();
|
|
368
|
+
const sqlRawColumn = (sql) => column(sqlRawDescriptor.factory({ sql }), sqlRawDescriptor.codecId, { sql });
|
|
369
|
+
//#endregion
|
|
370
|
+
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
|
+
|
|
372
|
+
//# sourceMappingURL=ast-D0miQ1B6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-D0miQ1B6.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-NTQsD2MS.mjs\";\nimport { a as DdlColumn, c as ForeignKeyConstraint, d as PrimaryKeyConstraint, f as UniqueConstraint, i as CheckExpressionConstraint, l as FunctionColumnDefault, n as opaqueSql, o as DdlColumnDefault, p as isDdlNode, r as renderOpaqueSql, s as DdlNode, t as OpaqueSql, u as LiteralColumnDefault } from \"../opaque-sql-Dset3kln.mjs\";\nimport { n as compact, r as isAggregateProjection, t as collectOrderedParamRefs } from \"../util-BBgcP3gI.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { CodecDescriptorTemplateImpl, CodecImpl, SAFE_INTEGER_RANGE, codecForRef, column, 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\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\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\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\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\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\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,KAAK,CAAC,CAAC,C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