@prisma/orm-family-sql 8.0.0-rc.19-dev.8 → 8.0.0-rc.19-dev.10
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/{aggregate-descriptor-registry-Dd7Uj7DJ.mjs → aggregate-descriptor-registry-ZrKjxwQe.mjs} +3 -3
- package/dist/aggregate-descriptor-registry-ZrKjxwQe.mjs.map +1 -0
- package/dist/{ast-BJs2669T.mjs → ast-D0miQ1B6.mjs} +3 -3
- package/dist/ast-D0miQ1B6.mjs.map +1 -0
- package/dist/{ast-BySjcUKx.d.mts → ast-De1p3DM9.d.mts} +5 -5
- package/dist/ast-De1p3DM9.d.mts.map +1 -0
- package/dist/{attribute-specs-BsaemIyu.d.mts → attribute-specs-CTEOxEJS.d.mts} +5 -5
- package/dist/attribute-specs-CTEOxEJS.d.mts.map +1 -0
- package/dist/{authored-check-naming-CIX7Bbyh.mjs → authored-check-naming-BHGJhjqn.mjs} +5 -5
- package/dist/authored-check-naming-BHGJhjqn.mjs.map +1 -0
- package/dist/{authored-check-naming-CK6T_Dfh.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-Dxf_T0Ih.d.mts → authoring-entity-types-CgKIgWq5-CjIkEw1m.d.mts} +3 -3
- package/dist/authoring-entity-types-CgKIgWq5-CjIkEw1m.d.mts.map +1 -0
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +11 -11
- package/dist/builder__runtime.d.mts.map +1 -1
- package/dist/builder__runtime.mjs +8 -8
- package/dist/builder__runtime.mjs.map +1 -1
- package/dist/builder__types.d.mts +5 -5
- 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-CBVYAMwG.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-MG2bFxW_.mjs → codec-descriptor-registry-CiiFzMtb.mjs} +4 -4
- package/dist/codec-descriptor-registry-CiiFzMtb.mjs.map +1 -0
- package/dist/collection-methods-Bc8v7iVP.d.mts +1 -0
- package/dist/{collection-methods-D2UnCS0S-CRYoAOtB.d.mts → collection-methods-D2UnCS0S-CjdGDJ5y.d.mts} +5 -5
- package/dist/collection-methods-D2UnCS0S-CjdGDJ5y.d.mts.map +1 -0
- package/dist/{config-types-D8quwydu.d.mts → config-types-DGD0sYRS.d.mts} +5 -5
- package/dist/config-types-DGD0sYRS.d.mts.map +1 -0
- package/dist/{config-types-BbBY5_GQ.mjs → config-types-DkEeq_qq.mjs} +3 -3
- package/dist/config-types-DkEeq_qq.mjs.map +1 -0
- package/dist/{contract-builder-xFftVmD8.d.mts → contract-builder-BrpdASoV.d.mts} +12 -12
- package/dist/contract-builder-BrpdASoV.d.mts.map +1 -0
- package/dist/{contract-builder-D7cTmhfs.mjs → contract-builder-Dp7AOnHB.mjs} +8 -8
- package/dist/contract-builder-Dp7AOnHB.mjs.map +1 -0
- package/dist/contract-emitter.d.mts +1 -1
- 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 +3 -3
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +10 -10
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +4 -4
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__default-table-name.d.mts +1 -1
- package/dist/contract-psl__default-table-name.d.mts.map +1 -1
- package/dist/contract-psl__default-table-name.mjs +1 -1
- package/dist/contract-psl__diagnostics.d.mts +1 -1
- package/dist/contract-psl__diagnostics.d.mts.map +1 -1
- package/dist/contract-psl__diagnostics.mjs +1 -1
- package/dist/contract-psl__map-names.d.mts +1 -1
- package/dist/contract-psl__map-names.d.mts.map +1 -1
- package/dist/contract-psl__map-names.mjs +2 -2
- package/dist/contract-psl__map-names.mjs.map +1 -1
- 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 +3 -3
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- package/dist/contract-ts.mjs +4 -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 +3 -3
- package/dist/contract-ts__contract-builder.mjs +3 -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-BgpEwVz0.d.mts → contract-view-DuB35or0.d.mts} +3 -3
- package/dist/contract-view-DuB35or0.d.mts.map +1 -0
- package/dist/contract.d.mts +29 -29
- package/dist/contract.mjs +22 -22
- 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 +1 -1
- package/dist/contract__data-type-support.mjs +1 -1
- package/dist/contract__data-type.d.mts +1 -1
- package/dist/contract__data-type.mjs +2 -2
- package/dist/contract__entity-handle-lowering-hook.d.mts +1 -1
- package/dist/contract__entity-handle-lowering-hook.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__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +2 -2
- package/dist/contract__index-naming.d.mts +1 -1
- package/dist/contract__index-naming.mjs +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__index-type-validation.mjs +1 -1
- package/dist/contract__index-types.d.mts +2 -2
- package/dist/contract__index-types.mjs +1 -1
- 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 +1 -1
- package/dist/contract__sql-expression.mjs +1 -1
- package/dist/contract__types.d.mts +11 -11
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/contract__value-set-derivation-hook.d.mts +1 -1
- package/dist/contract__value-set-derivation-hook.mjs +1 -1
- package/dist/{control-BW6gbqvb.d.mts → control-0cDzwyu1.d.mts} +19 -19
- package/dist/control-0cDzwyu1.d.mts.map +1 -0
- package/dist/{control-adapter-El4czoUh.d.mts → control-adapter-BLLXAM9_.d.mts} +5 -5
- package/dist/control-adapter-BLLXAM9_.d.mts.map +1 -0
- package/dist/{control-adapter-Bn0uhplA-D0fhkvnJ.d.mts → control-adapter-Bn0uhplA-DYCjJlfN.d.mts} +10 -10
- package/dist/control-adapter-Bn0uhplA-DYCjJlfN.d.mts.map +1 -0
- package/dist/{control-adapter-DRlEXxsv.mjs → control-adapter-SlQkTEwT.mjs} +3 -3
- package/dist/control-adapter-SlQkTEwT.mjs.map +1 -0
- package/dist/{control-DnFJf5_F.mjs → control-ba0_VwlQ.mjs} +18 -18
- package/dist/control-ba0_VwlQ.mjs.map +1 -0
- package/dist/{data-type-BMnEHaW3.mjs → data-type-BFSpaotu.mjs} +3 -3
- package/dist/data-type-BFSpaotu.mjs.map +1 -0
- package/dist/{data-type-iatMyRs6.d.mts → data-type-DJIvKQHf.d.mts} +4 -4
- package/dist/data-type-DJIvKQHf.d.mts.map +1 -0
- package/dist/{data-type-support-juGV2d9c.mjs → data-type-support-BhSoPUFj.mjs} +2 -2
- package/dist/data-type-support-BhSoPUFj.mjs.map +1 -0
- package/dist/{data-type-support-a9BR-PbH.d.mts → data-type-support-CXpA0ex-.d.mts} +2 -2
- package/dist/data-type-support-CXpA0ex-.d.mts.map +1 -0
- package/dist/{db-BmrN9nRS-MT5cfCJy.d.mts → db-BmrN9nRS-BKdvl6Lv.d.mts} +14 -14
- package/dist/db-BmrN9nRS-BKdvl6Lv.d.mts.map +1 -0
- package/dist/{ddl-types-By5mT2_S--j4lTxme.d.mts → ddl-types-By5mT2_S-CEkSuvfl.d.mts} +5 -5
- package/dist/ddl-types-By5mT2_S-CEkSuvfl.d.mts.map +1 -0
- package/dist/{default-mapping-CAOONlKQ-v7GTIkjE.d.mts → default-mapping-CAOONlKQ-4m07nb-O.d.mts} +2 -2
- package/dist/default-mapping-CAOONlKQ-4m07nb-O.d.mts.map +1 -0
- package/dist/{default-table-name-BfFY8qYR-lHNcVmY5.mjs → default-table-name-BfFY8qYR-CWZFDX6v.mjs} +2 -2
- package/dist/default-table-name-BfFY8qYR-CWZFDX6v.mjs.map +1 -0
- package/dist/{derived-checks-D5HVRvqN-B37oe30Z.mjs → derived-checks-D5HVRvqN-BJx1gwPA.mjs} +16 -16
- package/dist/derived-checks-D5HVRvqN-BJx1gwPA.mjs.map +1 -0
- package/dist/{derived-checks-DpPkO6Dt-D6tfanWv.d.mts → derived-checks-DpPkO6Dt-BzFrQoFZ.d.mts} +4 -4
- package/dist/derived-checks-DpPkO6Dt-BzFrQoFZ.d.mts.map +1 -0
- package/dist/{diagnostics-IM48vCjC.mjs → diagnostics-RHJxoiIk.mjs} +4 -4
- package/dist/diagnostics-RHJxoiIk.mjs.map +1 -0
- package/dist/{diff-DZ82XaGR.mjs → diff-C1rFOhek.mjs} +2 -2
- package/dist/diff-C1rFOhek.mjs.map +1 -0
- package/dist/{diff-D2PJJkGv.d.mts → diff-DnJBqc_l.d.mts} +8 -8
- package/dist/diff-DnJBqc_l.d.mts.map +1 -0
- package/dist/{dist-D8RKUdwh.mjs → dist-C8Y-PPuE.mjs} +4 -4
- 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-DRsYeq3j-X_D6hNMZ.d.mts → driver-types-DRsYeq3j-BimeCnUk.d.mts} +2 -2
- package/dist/driver-types-DRsYeq3j-BimeCnUk.d.mts.map +1 -0
- package/dist/{entity-handle-lowering-hook-B3atrRKX.mjs → entity-handle-lowering-hook-BJZSlVVF.mjs} +2 -2
- package/dist/entity-handle-lowering-hook-BJZSlVVF.mjs.map +1 -0
- package/dist/{entity-handle-lowering-hook-93syhZ0p.d.mts → entity-handle-lowering-hook-BuvLtgFi.d.mts} +2 -2
- package/dist/entity-handle-lowering-hook-BuvLtgFi.d.mts.map +1 -0
- package/dist/{entity-kinds-OhCjfrIe.d.mts → entity-kinds-BPG2xCZV.d.mts} +7 -7
- package/dist/entity-kinds-BPG2xCZV.d.mts.map +1 -0
- package/dist/{entity-kinds-JR5SAm5h-ZkDejOUK.mjs → entity-kinds-JR5SAm5h-DOH6VUtL.mjs} +5 -5
- 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-Bg6ThaBe.mjs → exports-C3wGYtID-D65DEUTC.mjs} +9 -9
- package/dist/exports-C3wGYtID-D65DEUTC.mjs.map +1 -0
- package/dist/{expression-6ld_ZQL6-CQghHqQ4.d.mts → expression-6ld_ZQL6-Brvfpjqy.d.mts} +9 -9
- package/dist/expression-6ld_ZQL6-Brvfpjqy.d.mts.map +1 -0
- package/dist/{expression-CieaNuRM-BpwVyjJL.d.mts → expression-CieaNuRM-CI_2zExe.d.mts} +4 -4
- package/dist/expression-CieaNuRM-CI_2zExe.d.mts.map +1 -0
- package/dist/{expression-impl-B-XNINxr-vYwKVFeP.mjs → expression-impl-B-XNINxr-BhN2sysZ.mjs} +4 -4
- package/dist/expression-impl-B-XNINxr-BhN2sysZ.mjs.map +1 -0
- package/dist/expression-kBtMHj-W.d.mts +2 -0
- package/dist/{factories-C4JbtO84.mjs → factories-Crobuxwn.mjs} +5 -5
- package/dist/factories-Crobuxwn.mjs.map +1 -0
- package/dist/{factories-CfHDga-q.d.mts → factories-DbNP9qfs.d.mts} +7 -7
- package/dist/factories-DbNP9qfs.d.mts.map +1 -0
- package/dist/family.d.mts +16 -16
- package/dist/family.mjs +16 -16
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control-adapter.mjs +1 -1
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__diff.mjs +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 +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/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-CgW18KP-.d.mts → foreign-key-materialization-48P2V8on.d.mts} +8 -8
- package/dist/foreign-key-materialization-48P2V8on.d.mts.map +1 -0
- package/dist/{foreign-key-materialization-BPQqd0qF.mjs → foreign-key-materialization-BM59w_Xg.mjs} +7 -7
- package/dist/foreign-key-materialization-BM59w_Xg.mjs.map +1 -0
- package/dist/{foreign-key-qkDFfG8t-Fyrzd0VI.d.mts → foreign-key-qkDFfG8t-TaK_GYWR.d.mts} +3 -3
- package/dist/foreign-key-qkDFfG8t-TaK_GYWR.d.mts.map +1 -0
- package/dist/{functions-DTInIMZT.d.mts → functions-CRvEdiQM.d.mts} +7 -7
- package/dist/functions-CRvEdiQM.d.mts.map +1 -0
- package/dist/{functions-0YWByawj.mjs → functions-CsOoN7I3.mjs} +4 -4
- package/dist/functions-CsOoN7I3.mjs.map +1 -0
- package/dist/{generator-functions-D_qdqBV--BoeJwWsz.mjs → generator-functions-D_qdqBV--B2Q0WOf5.mjs} +4 -4
- package/dist/generator-functions-D_qdqBV--B2Q0WOf5.mjs.map +1 -0
- package/dist/{index-ffCr9ySU.d.mts → index-CUG8HKk_.d.mts} +4 -4
- package/dist/index-CUG8HKk_.d.mts.map +1 -0
- package/dist/{index-BAxGJxON.d.mts → index-ClfuhAEt.d.mts} +23 -23
- package/dist/index-ClfuhAEt.d.mts.map +1 -0
- package/dist/{index-equivalence-DswCiq5l-D5VK0qTy.mjs → index-equivalence-DswCiq5l-CGsyPP9B.mjs} +3 -3
- package/dist/index-equivalence-DswCiq5l-CGsyPP9B.mjs.map +1 -0
- package/dist/{index-naming-BOcJT1B3-18gQUduD.mjs → index-naming-BOcJT1B3-mG8Fd6KN.mjs} +5 -5
- package/dist/index-naming-BOcJT1B3-mG8Fd6KN.mjs.map +1 -0
- package/dist/{index-naming-C7pme5Pj.d.mts → index-naming-Cs6wwia3.d.mts} +4 -4
- package/dist/index-naming-Cs6wwia3.d.mts.map +1 -0
- package/dist/{index-reference-4wsdeB7v-DiTLLldN.d.mts → index-reference-4wsdeB7v-BTOzTNIT.d.mts} +5 -5
- package/dist/index-reference-4wsdeB7v-BTOzTNIT.d.mts.map +1 -0
- package/dist/{index-reference-DR62gjQS.mjs → index-reference-BQSrkRfT.mjs} +2 -2
- package/dist/index-reference-BQSrkRfT.mjs.map +1 -0
- package/dist/index-reference-DFUfnGcB.d.mts +1 -0
- package/dist/{index-type-validation-Bcme_Ust.mjs → index-type-validation-DJEMmmw0.mjs} +3 -3
- package/dist/index-type-validation-DJEMmmw0.mjs.map +1 -0
- package/dist/{index-type-validation-Ibtp3RKo.d.mts → index-type-validation-fGGwAHWc.d.mts} +5 -5
- package/dist/index-type-validation-fGGwAHWc.d.mts.map +1 -0
- package/dist/{index-types-H1O43iYT-ONvDbszL.d.mts → index-types-H1O43iYT-BD0VwPqV.d.mts} +2 -2
- package/dist/index-types-H1O43iYT-BD0VwPqV.d.mts.map +1 -0
- package/dist/{index-types-pC_5vADQ-TTUXAfmL.mjs → index-types-pC_5vADQ-BOOBi14R.mjs} +3 -3
- package/dist/index-types-pC_5vADQ-BOOBi14R.mjs.map +1 -0
- package/dist/index-types-snhtt_Fo.d.mts +1 -0
- package/dist/{interpreter-BDpym-rc-BZVFp5GU.mjs → interpreter-BDpym-rc-C3-vTcej.mjs} +12 -12
- package/dist/interpreter-BDpym-rc-C3-vTcej.mjs.map +1 -0
- package/dist/{ir-I-xciGUH.mjs → ir-DzsUDO8e.mjs} +2 -2
- package/dist/ir-DzsUDO8e.mjs.map +1 -0
- package/dist/{ir-BjC1VOuq.d.mts → ir-VGuTeCGp.d.mts} +4 -4
- package/dist/ir-VGuTeCGp.d.mts.map +1 -0
- package/dist/middleware-D5UhS_mW.d.mts +1 -0
- package/dist/{middleware-DHkW6pRr-CFiQojK4.d.mts → middleware-DHkW6pRr-B67Dujfd.d.mts} +3 -3
- package/dist/middleware-DHkW6pRr-B67Dujfd.d.mts.map +1 -0
- package/dist/{middleware-yBAfiVWn-CzNCthJT.mjs → middleware-yBAfiVWn-DZO0vCRQ.mjs} +3 -3
- package/dist/middleware-yBAfiVWn-DZO0vCRQ.mjs.map +1 -0
- package/dist/{migration-Dy_4Wmiy.mjs → migration-BJQjkqFz.mjs} +2 -2
- package/dist/migration-BJQjkqFz.mjs.map +1 -0
- package/dist/{migration-DWLbMM34.d.mts → migration-CXZQR3C_.d.mts} +5 -5
- package/dist/migration-CXZQR3C_.d.mts.map +1 -0
- package/dist/{naming-BcD36g9T-DFyaudUa.d.mts → naming-BcD36g9T-Mfe_xGGL.d.mts} +2 -2
- package/dist/naming-BcD36g9T-Mfe_xGGL.d.mts.map +1 -0
- package/dist/{naming-bM5qm5PY-DdginUhA.mjs → naming-bM5qm5PY-jOg3JFMb.mjs} +2 -2
- package/dist/naming-bM5qm5PY-jOg3JFMb.mjs.map +1 -0
- package/dist/{opaque-sql-Dset3kln-BzzXoO94.mjs → opaque-sql-Dset3kln-CtsPDTXn.mjs} +2 -2
- 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 +21 -21
- package/dist/orm-client.mjs +11 -11
- package/dist/{pack-CdaZMfI_.d.mts → pack-CGcsowo7.d.mts} +5 -5
- package/dist/pack-CGcsowo7.d.mts.map +1 -0
- package/dist/{pack-BifOs83a.mjs → pack-vaUY9-7E.mjs} +5 -5
- package/dist/pack-vaUY9-7E.mjs.map +1 -0
- package/dist/{plan-Cr4azjnG-lIrzIrmu.d.mts → plan-Cr4azjnG-B5MWRcqp.d.mts} +5 -5
- package/dist/plan-Cr4azjnG-B5MWRcqp.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-cqtZBj5m.d.mts +2 -0
- package/dist/{psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs → psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs} +2 -2
- package/dist/psl-attribute-parsing-BCsFWsSp-BJ-wGlY6.mjs.map +1 -0
- package/dist/{psl-build-fwoI6rBO.mjs → psl-build-DFBG6vhz.mjs} +6 -6
- package/dist/psl-build-DFBG6vhz.mjs.map +1 -0
- package/dist/{psl-build-BYXXz2XD.d.mts → psl-build-RelubU2E.d.mts} +6 -6
- package/dist/psl-build-RelubU2E.d.mts.map +1 -0
- package/dist/{psl-column-resolution-ChZqioOc-DcjGSXDp.d.mts → psl-column-resolution-ChZqioOc-DkKTu21I.d.mts} +3 -3
- package/dist/psl-column-resolution-ChZqioOc-DkKTu21I.d.mts.map +1 -0
- package/dist/{psl-field-resolution-C5KQ7kzP-DH8oSBIL.mjs → psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs} +7 -7
- package/dist/psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs.map +1 -0
- package/dist/{psl-infer-CaEnF_x3.mjs → psl-infer--g4i84Go.mjs} +5 -5
- package/dist/psl-infer--g4i84Go.mjs.map +1 -0
- package/dist/{psl-infer-CpTRaF5I.d.mts → psl-infer-DzoxPZGd.d.mts} +5 -5
- package/dist/psl-infer-DzoxPZGd.d.mts.map +1 -0
- package/dist/{psl-names-C3cwe0rg-CsuHOV7E.mjs → psl-names-C3cwe0rg-D1CTmC3a.mjs} +2 -2
- package/dist/psl-names-C3cwe0rg-D1CTmC3a.mjs.map +1 -0
- package/dist/{query-lane-context-BCEoKy0_-DQOOliDn.d.mts → query-lane-context-BCEoKy0_-CBzNngG3.d.mts} +8 -8
- package/dist/query-lane-context-BCEoKy0_-CBzNngG3.d.mts.map +1 -0
- package/dist/query-lane-context-DElm2VXX.d.mts +1 -0
- package/dist/{referential-action-sql-Cw1Q0YSd.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 +13 -13
- package/dist/relational-core.mjs +7 -7
- 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 +4 -4
- package/dist/relational-core__ast.mjs +4 -4
- package/dist/relational-core__codec-descriptor-registry.d.mts +5 -5
- 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 +2 -2
- package/dist/relational-core__contract-free.d.mts +6 -6
- package/dist/relational-core__contract-free.d.mts.map +1 -1
- package/dist/relational-core__contract-free.mjs +4 -4
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__expression.mjs +1 -1
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__functions.mjs +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- package/dist/relational-core__index-reference.mjs +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__middleware.mjs +1 -1
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__plan.mjs +1 -1
- 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-DZsfnzeW.mjs → resolve-storage-table-BHLQsOza.mjs} +3 -3
- package/dist/resolve-storage-table-BHLQsOza.mjs.map +1 -0
- package/dist/{resolve-storage-table-CxmU_MPu.d.mts → resolve-storage-table-DCqtmnSU.d.mts} +4 -4
- package/dist/resolve-storage-table-DCqtmnSU.d.mts.map +1 -0
- package/dist/{runtime-Z3nD7ix1.mjs → runtime-6tH1yOxK.mjs} +2 -2
- package/dist/runtime-6tH1yOxK.mjs.map +1 -0
- package/dist/{runtime-Bmndf-fm.d.mts → runtime-CF6rAlE5.d.mts} +3 -3
- package/dist/runtime-CF6rAlE5.d.mts.map +1 -0
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/runtime__internal__prepared-query.mjs +1 -1
- package/dist/{schema-differ-DmP74bB8-0ZupRJKb.d.mts → schema-differ-DmP74bB8-Be7PDHNx.d.mts} +6 -6
- package/dist/schema-differ-DmP74bB8-Be7PDHNx.d.mts.map +1 -0
- package/dist/schema-ir.d.mts +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__naming.d.mts +1 -1
- package/dist/schema-ir__naming.mjs +1 -1
- package/dist/schema-ir__types.d.mts +2 -2
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-C3wbdviw-BifQBCpu.mjs → schema-verify-C3wbdviw-DMjIubOr.mjs} +5 -5
- package/dist/schema-verify-C3wbdviw-DMjIubOr.mjs.map +1 -0
- package/dist/{serialized-index-CrgG8ct1-DDfHKUEK.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-DjCCnXB1-C_YccpTL.mjs → serialized-index-DjCCnXB1-DMA7BtO2.mjs} +4 -4
- package/dist/serialized-index-DjCCnXB1-DMA7BtO2.mjs.map +1 -0
- package/dist/{sql-contract-serializer-sMY3prTx-BkFoHhST.mjs → sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs} +7 -7
- package/dist/sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs.map +1 -0
- package/dist/{sql-data-type-D7M-YTTY-C9oWGZ3z.mjs → sql-data-type-D7M-YTTY-D2vRqDxn.mjs} +3 -3
- package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +1 -0
- package/dist/{sql-execution-plan-3uxYjHyu-C0Z4_RSY.d.mts → sql-execution-plan-3uxYjHyu-Cl0eB5av.d.mts} +3 -3
- package/dist/sql-execution-plan-3uxYjHyu-Cl0eB5av.d.mts.map +1 -0
- package/dist/{sql-expression-BAtH-2UU.d.mts → sql-expression-B4BrhGPi.d.mts} +2 -2
- package/dist/sql-expression-B4BrhGPi.d.mts.map +1 -0
- package/dist/{sql-expression-BJCuy-WI.mjs → sql-expression-CKgKznXS.mjs} +3 -3
- package/dist/sql-expression-CKgKznXS.mjs.map +1 -0
- package/dist/{sql-index-ByAAE7K8-BpbPBWPD.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-DeCAh5Hi-nJQUIgfL.d.mts → sql-storage-DeCAh5Hi-CEM-m8cs.d.mts} +5 -5
- package/dist/sql-storage-DeCAh5Hi-CEM-m8cs.d.mts.map +1 -0
- package/dist/{storage-table-Bf1ZjnxO-NvkG2pgq.d.mts → storage-table-Bf1ZjnxO-pUj6pyP0.d.mts} +7 -7
- package/dist/storage-table-Bf1ZjnxO-pUj6pyP0.d.mts.map +1 -0
- package/dist/{storage-table-DDvN83mw-CbCFr5wm.mjs → storage-table-DDvN83mw-DkbBFmK9.mjs} +4 -4
- 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-3k10jZ8I.mjs → transaction-state-BfXhs7D7-DhmbySW9.mjs} +2 -2
- package/dist/transaction-state-BfXhs7D7-DhmbySW9.mjs.map +1 -0
- package/dist/{transaction-state-DR3nKTmH-D6VdY7YX.d.mts → transaction-state-DR3nKTmH-Dcu5lbwd.d.mts} +11 -11
- package/dist/transaction-state-DR3nKTmH-Dcu5lbwd.d.mts.map +1 -0
- package/dist/{types-CRbj_WQf.d.mts → types-B0J6ZASy.d.mts} +12 -12
- package/dist/types-B0J6ZASy.d.mts.map +1 -0
- package/dist/{types-C7610W2l.mjs → types-CTdSkl0s.mjs} +3 -3
- package/dist/types-CTdSkl0s.mjs.map +1 -0
- package/dist/{types-Cq6ImLAB-BqOfLAYG.d.mts → types-Cq6ImLAB-BRpWMRJe.d.mts} +10 -10
- package/dist/types-Cq6ImLAB-BRpWMRJe.d.mts.map +1 -0
- package/dist/{types-CuCxAQat-BBGUHEku.d.mts → types-CuCxAQat-Dz8P4xyt.d.mts} +3 -3
- package/dist/types-CuCxAQat-Dz8P4xyt.d.mts.map +1 -0
- package/dist/types-CwP7Hgmt.d.mts +1 -0
- package/dist/{types-DfKvtJwS-tndgHh53.d.mts → types-DfKvtJwS-CrpWTGBJ.d.mts} +11 -11
- package/dist/types-DfKvtJwS-CrpWTGBJ.d.mts.map +1 -0
- package/dist/{types-DoyiTsjg-DDTmYyNY.mjs → types-DoyiTsjg-2YMhMJDA.mjs} +3 -3
- package/dist/types-DoyiTsjg-2YMhMJDA.mjs.map +1 -0
- package/dist/{types-DriMIMNQ-BBacSgaI.d.mts → types-DriMIMNQ-Cs5YW-O-.d.mts} +3 -3
- package/dist/types-DriMIMNQ-Cs5YW-O-.d.mts.map +1 -0
- package/dist/{types-NTQsD2MS-DAP2yVDn.mjs → types-NTQsD2MS-xcLtvKO9.mjs} +2 -2
- package/dist/types-NTQsD2MS-xcLtvKO9.mjs.map +1 -0
- package/dist/{types-TXO7x1BA-DuW4v0rw.d.mts → types-TXO7x1BA-B8fGzOYJ.d.mts} +12 -12
- package/dist/types-TXO7x1BA-B8fGzOYJ.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-BBgcP3gI-XJBkxo1K.mjs → util-BBgcP3gI-CpL-0VuC.mjs} +2 -2
- package/dist/util-BBgcP3gI-CpL-0VuC.mjs.map +1 -0
- package/dist/{validators-xXKEHvnw.mjs → validators-BwA7ttZM.mjs} +7 -7
- package/dist/validators-BwA7ttZM.mjs.map +1 -0
- package/dist/{validators-BDuMio1F.d.mts → validators-FJs8HvFr.d.mts} +6 -6
- 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-BVk5bjdH-dq5M4iIh.mjs → verify-BVk5bjdH-DhKm6hB3.mjs} +3 -3
- 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 +18 -18
- package/dist/aggregate-descriptor-registry-Dd7Uj7DJ.mjs.map +0 -1
- package/dist/ast-BJs2669T.mjs.map +0 -1
- package/dist/ast-BySjcUKx.d.mts.map +0 -1
- package/dist/attribute-specs-BsaemIyu.d.mts.map +0 -1
- package/dist/authored-check-naming-CIX7Bbyh.mjs.map +0 -1
- package/dist/authored-check-naming-CK6T_Dfh.d.mts.map +0 -1
- package/dist/authoring-entity-types-CgKIgWq5-Dxf_T0Ih.d.mts.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-CBVYAMwG.d.mts.map +0 -1
- package/dist/codec-descriptor-registry-MG2bFxW_.mjs.map +0 -1
- package/dist/collection-methods-BTknGdHI.d.mts +0 -1
- package/dist/collection-methods-D2UnCS0S-CRYoAOtB.d.mts.map +0 -1
- package/dist/config-types-BbBY5_GQ.mjs.map +0 -1
- package/dist/config-types-D8quwydu.d.mts.map +0 -1
- package/dist/contract-builder-D7cTmhfs.mjs.map +0 -1
- package/dist/contract-builder-xFftVmD8.d.mts.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-BgpEwVz0.d.mts.map +0 -1
- package/dist/control-BW6gbqvb.d.mts.map +0 -1
- package/dist/control-DnFJf5_F.mjs.map +0 -1
- package/dist/control-adapter-Bn0uhplA-D0fhkvnJ.d.mts.map +0 -1
- package/dist/control-adapter-DRlEXxsv.mjs.map +0 -1
- package/dist/control-adapter-El4czoUh.d.mts.map +0 -1
- package/dist/data-type-BMnEHaW3.mjs.map +0 -1
- package/dist/data-type-iatMyRs6.d.mts.map +0 -1
- package/dist/data-type-support-a9BR-PbH.d.mts.map +0 -1
- package/dist/data-type-support-juGV2d9c.mjs.map +0 -1
- package/dist/db-BmrN9nRS-MT5cfCJy.d.mts.map +0 -1
- package/dist/ddl-types-By5mT2_S--j4lTxme.d.mts.map +0 -1
- package/dist/default-mapping-CAOONlKQ-v7GTIkjE.d.mts.map +0 -1
- package/dist/default-table-name-BfFY8qYR-lHNcVmY5.mjs.map +0 -1
- package/dist/derived-checks-D5HVRvqN-B37oe30Z.mjs.map +0 -1
- package/dist/derived-checks-DpPkO6Dt-D6tfanWv.d.mts.map +0 -1
- package/dist/diagnostics-IM48vCjC.mjs.map +0 -1
- package/dist/diff-D2PJJkGv.d.mts.map +0 -1
- package/dist/diff-DZ82XaGR.mjs.map +0 -1
- package/dist/dist-C_q1_QR9.mjs.map +0 -1
- package/dist/dist-D8RKUdwh.mjs.map +0 -1
- package/dist/dist-x6jvtkKM.mjs.map +0 -1
- package/dist/driver-types-DRsYeq3j-X_D6hNMZ.d.mts.map +0 -1
- package/dist/entity-handle-lowering-hook-93syhZ0p.d.mts.map +0 -1
- package/dist/entity-handle-lowering-hook-B3atrRKX.mjs.map +0 -1
- package/dist/entity-kinds-JR5SAm5h-ZkDejOUK.mjs.map +0 -1
- package/dist/entity-kinds-OhCjfrIe.d.mts.map +0 -1
- package/dist/errors-B5g0xWro-mWH2C07F.mjs.map +0 -1
- package/dist/exports-C3wGYtID-Bg6ThaBe.mjs.map +0 -1
- package/dist/expression-6ld_ZQL6-CQghHqQ4.d.mts.map +0 -1
- package/dist/expression-BLiObOS8.d.mts +0 -2
- package/dist/expression-CieaNuRM-BpwVyjJL.d.mts.map +0 -1
- package/dist/expression-impl-B-XNINxr-vYwKVFeP.mjs.map +0 -1
- package/dist/factories-C4JbtO84.mjs.map +0 -1
- package/dist/factories-CfHDga-q.d.mts.map +0 -1
- package/dist/foreign-key-materialization-BPQqd0qF.mjs.map +0 -1
- package/dist/foreign-key-materialization-CgW18KP-.d.mts.map +0 -1
- package/dist/foreign-key-qkDFfG8t-Fyrzd0VI.d.mts.map +0 -1
- package/dist/functions-0YWByawj.mjs.map +0 -1
- package/dist/functions-DTInIMZT.d.mts.map +0 -1
- package/dist/generator-functions-D_qdqBV--BoeJwWsz.mjs.map +0 -1
- package/dist/index-BAxGJxON.d.mts.map +0 -1
- package/dist/index-equivalence-DswCiq5l-D5VK0qTy.mjs.map +0 -1
- package/dist/index-ffCr9ySU.d.mts.map +0 -1
- package/dist/index-naming-BOcJT1B3-18gQUduD.mjs.map +0 -1
- package/dist/index-naming-C7pme5Pj.d.mts.map +0 -1
- package/dist/index-reference-4wsdeB7v-DiTLLldN.d.mts.map +0 -1
- package/dist/index-reference-DR62gjQS.mjs.map +0 -1
- package/dist/index-reference-Da9mdOjD.d.mts +0 -1
- package/dist/index-type-validation-Bcme_Ust.mjs.map +0 -1
- package/dist/index-type-validation-Ibtp3RKo.d.mts.map +0 -1
- package/dist/index-types-ByX8MLso.d.mts +0 -1
- package/dist/index-types-H1O43iYT-ONvDbszL.d.mts.map +0 -1
- package/dist/index-types-pC_5vADQ-TTUXAfmL.mjs.map +0 -1
- package/dist/interpreter-BDpym-rc-BZVFp5GU.mjs.map +0 -1
- package/dist/ir-BjC1VOuq.d.mts.map +0 -1
- package/dist/ir-I-xciGUH.mjs.map +0 -1
- package/dist/middleware-DHkW6pRr-CFiQojK4.d.mts.map +0 -1
- package/dist/middleware-GO31SJSv.d.mts +0 -1
- package/dist/middleware-yBAfiVWn-CzNCthJT.mjs.map +0 -1
- package/dist/migration-DWLbMM34.d.mts.map +0 -1
- package/dist/migration-Dy_4Wmiy.mjs.map +0 -1
- package/dist/naming-BcD36g9T-DFyaudUa.d.mts.map +0 -1
- package/dist/naming-bM5qm5PY-DdginUhA.mjs.map +0 -1
- package/dist/opaque-sql-Dset3kln-BzzXoO94.mjs.map +0 -1
- package/dist/pack-BifOs83a.mjs.map +0 -1
- package/dist/pack-CdaZMfI_.d.mts.map +0 -1
- package/dist/plan-Cr4azjnG-lIrzIrmu.d.mts.map +0 -1
- package/dist/plan-Dh0LbYIv-Crx5-ThG.mjs.map +0 -1
- package/dist/plan-OXQ8s6Ee.d.mts +0 -2
- package/dist/psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs.map +0 -1
- package/dist/psl-build-BYXXz2XD.d.mts.map +0 -1
- package/dist/psl-build-fwoI6rBO.mjs.map +0 -1
- package/dist/psl-column-resolution-ChZqioOc-DcjGSXDp.d.mts.map +0 -1
- package/dist/psl-field-resolution-C5KQ7kzP-DH8oSBIL.mjs.map +0 -1
- package/dist/psl-infer-CaEnF_x3.mjs.map +0 -1
- package/dist/psl-infer-CpTRaF5I.d.mts.map +0 -1
- package/dist/psl-names-C3cwe0rg-CsuHOV7E.mjs.map +0 -1
- package/dist/query-lane-context-BCEoKy0_-DQOOliDn.d.mts.map +0 -1
- package/dist/query-lane-context-BssPNZey.d.mts +0 -1
- package/dist/referential-action-sql-Cw1Q0YSd.d.mts.map +0 -1
- package/dist/referential-action-sql-DSqkrySN.mjs.map +0 -1
- package/dist/resolve-storage-table-CxmU_MPu.d.mts.map +0 -1
- package/dist/resolve-storage-table-DZsfnzeW.mjs.map +0 -1
- package/dist/runtime-Bmndf-fm.d.mts.map +0 -1
- package/dist/runtime-Z3nD7ix1.mjs.map +0 -1
- package/dist/schema-differ-DmP74bB8-0ZupRJKb.d.mts.map +0 -1
- package/dist/schema-verify-C3wbdviw-BifQBCpu.mjs.map +0 -1
- package/dist/serialized-index-CrgG8ct1-DDfHKUEK.d.mts.map +0 -1
- package/dist/serialized-index-DjCCnXB1-C_YccpTL.mjs.map +0 -1
- package/dist/sql-contract-serializer-sMY3prTx-BkFoHhST.mjs.map +0 -1
- package/dist/sql-data-type-D7M-YTTY-C9oWGZ3z.mjs.map +0 -1
- package/dist/sql-execution-plan-3uxYjHyu-C0Z4_RSY.d.mts.map +0 -1
- package/dist/sql-expression-BAtH-2UU.d.mts.map +0 -1
- package/dist/sql-expression-BJCuy-WI.mjs.map +0 -1
- package/dist/sql-index-ByAAE7K8-BpbPBWPD.d.mts.map +0 -1
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts.map +0 -1
- package/dist/sql-storage-DeCAh5Hi-nJQUIgfL.d.mts.map +0 -1
- package/dist/storage-table-Bf1ZjnxO-NvkG2pgq.d.mts.map +0 -1
- package/dist/storage-table-DDvN83mw-CbCFr5wm.mjs.map +0 -1
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts.map +0 -1
- package/dist/transaction-state-BfXhs7D7-3k10jZ8I.mjs.map +0 -1
- package/dist/transaction-state-DR3nKTmH-D6VdY7YX.d.mts.map +0 -1
- package/dist/types-BUggiEEH.d.mts +0 -1
- package/dist/types-C7610W2l.mjs.map +0 -1
- package/dist/types-CRbj_WQf.d.mts.map +0 -1
- package/dist/types-Cq6ImLAB-BqOfLAYG.d.mts.map +0 -1
- package/dist/types-CuCxAQat-BBGUHEku.d.mts.map +0 -1
- package/dist/types-DDqbg3WC.d.mts +0 -1
- package/dist/types-DfKvtJwS-tndgHh53.d.mts.map +0 -1
- package/dist/types-DoyiTsjg-DDTmYyNY.mjs.map +0 -1
- package/dist/types-DriMIMNQ-BBacSgaI.d.mts.map +0 -1
- package/dist/types-NTQsD2MS-DAP2yVDn.mjs.map +0 -1
- package/dist/types-TXO7x1BA-DuW4v0rw.d.mts.map +0 -1
- package/dist/unique-constraint-M5TlQnJQ-BiIHJ85k.d.mts.map +0 -1
- package/dist/util-BBgcP3gI-XJBkxo1K.mjs.map +0 -1
- package/dist/validators-BDuMio1F.d.mts.map +0 -1
- package/dist/validators-xXKEHvnw.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-BVk5bjdH-dq5M4iIh.mjs.map +0 -1
- package/dist/verify-zDRnw0Rn.d.mts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports-C3wGYtID-Bg6ThaBe.mjs","names":["runtimeError","#count","#started","#drainWaiters","#ast","#holdFinishedChildren","#runtimeRoute","#openTransactions","#inFlight","#transactionWorkOn","#heldQueryables","#openActivityHandles","#refusing","#openTransactionWork","#preparedStatementHandles","#run","#rows","#done","#inner"],"sources":["../../../../2-sql/5-runtime/dist/exports-C3wGYtID.mjs"],"sourcesContent":["import { a as wasRefusedBeforeBegin, c as preparedStatementExecute, i as transactionStart, l as runPreparedExecute, n as settlementOf, o as preparedStatementQuery, r as transactionSettlement, s as runPreparedQuery, t as createTransactionStart } from \"./transaction-state-BfXhs7D7.mjs\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport { materializeCodec, resolveCodecDescriptorOrThrow } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { AsyncIterableResult, RuntimeCore, applyMutationDefaults, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createContextBeneath, executeStatement, raceAgainstAbort, runtimeError, startClientActivity, startTransactionActivity, streamStatement } from \"@internal/framework-components/runtime\";\nimport { PreparedParamRef, collectOrderedParamRefs, isQueryAst } from \"@internal/sql-relational-core/ast\";\nimport { assertNever, isInternalError } from \"@internal/utils/internal-error\";\nimport { isStructuredError, structuredError } from \"@internal/utils/structured-error\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { checkContractComponentRequirements, mergeCapabilityMatrices } from \"@internal/framework-components/components\";\nimport { createExecutionStack } from \"@internal/framework-components/execution\";\nimport { createSqlOperationRegistry } from \"@internal/sql-operations\";\nimport { buildSqlAggregateDescriptorRegistry } from \"@internal/sql-relational-core/aggregate-descriptor-registry\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\nimport { blindCast, castAs } from \"@internal/utils/casts\";\nimport { createSqlParamRefMutator } from \"@internal/sql-relational-core/middleware\";\nimport { canonicalStringify } from \"@internal/utils/canonical-stringify\";\nimport { hashContent } from \"@internal/utils/hash-content\";\nimport { createHash } from \"node:crypto\";\n//#region src/activity-handle.ts\n/** The symbol-keyed member through which a runtime, connection, transaction, `withTransaction` context or activity handle starts activities; user-facing types do not show it. */\nconst activitySource = Symbol(\"activitySource\");\nfunction hasActivitySourceMember(target) {\n\treturn activitySource in target;\n}\n/** The `activitySource` member of a queryable; `undefined` for a queryable that cannot start activities, such as a test stub. */\nfunction findActivitySource(target) {\n\treturn hasActivitySourceMember(target) ? target[activitySource] : void 0;\n}\nfunction activitySourceOf(target) {\n\tconst source = findActivitySource(target);\n\tinvariant(source !== void 0, \"The queryable cannot start activities\");\n\treturn source;\n}\n/** An activity source that calls `source()` each time it is used, for an object whose source is created later, such as on the first query. */\nfunction lazyActivitySource(source) {\n\treturn {\n\t\tstartActivity: (activity) => source().startActivity(activity),\n\t\tplanContentHash: (plan) => source().planContentHash(plan)\n\t};\n}\n/** An activity source that starts activities on whatever queryable `target()` returns when called, for an object that sends its statements to a queryable it looks up each time. */\nfunction delegatingActivitySource(target) {\n\treturn lazyActivitySource(() => activitySourceOf(target()));\n}\n/** Starts an activity on a queryable through its `activitySource` member. */\nfunction startActivityOn(target, activity) {\n\treturn activitySourceOf(target).startActivity(activity);\n}\nfunction planContentHashOn(target, plan) {\n\treturn activitySourceOf(target).planContentHash(plan);\n}\n//#endregion\n//#region src/codecs/ast-codec-resolver.ts\n/**\n* Build an {@link AstCodecResolver} bound to a descriptor registry and a per-call instance-context factory.\n*\n* The instance-context factory lets callers control `name` / `usedAt` for refs the AST supplies (e.g. AST-embedded migration ops where the materialisation site is the AST node, not a contract column). The contract-walk pre-population path constructs its own contexts and invokes the resolver with those refs to seed the cache.\n*/\nfunction createAstCodecResolver(descriptors, instanceContextFor) {\n\tconst cache = /* @__PURE__ */ new Map();\n\treturn { forCodecRef(ref) {\n\t\tconst key = `${ref.codecId}:${canonicalizeJson(ref.typeParams)}`;\n\t\tconst cached = cache.get(key);\n\t\tif (cached) return cached;\n\t\tconst codec = materializeCodec(resolveCodecDescriptorOrThrow((id) => descriptors.descriptorFor(id), ref, \"RUNTIME.CODEC_DESCRIPTOR_MISSING\"), ref, instanceContextFor(ref));\n\t\tcache.set(key, codec);\n\t\treturn codec;\n\t} };\n}\n//#endregion\n//#region src/codecs/ast-codec-registry.ts\n/**\n* Build a contract-free {@link ContractCodecRegistry} that resolves codecs\n* purely from AST-supplied {@link import('@internal/framework-components/codec').CodecRef}s\n* against a target's descriptor registry.\n*\n* Dispatch is driven entirely by `CodecRef`s embedded in AST nodes; no\n* contract walk is needed. `forColumn` always returns `undefined` — this\n* registry carries no column-to-codec mappings.\n*/\nfunction createAstCodecRegistry(descriptors) {\n\tconst resolver = createAstCodecResolver(descriptors, (ref) => ({\n\t\tname: ref.codecId,\n\t\tusedAt: []\n\t}));\n\treturn {\n\t\tforColumn: () => void 0,\n\t\tforCodecRef: (ref) => resolver.forCodecRef(ref)\n\t};\n}\n//#endregion\n//#region src/codecs/encoding.ts\nconst NO_METADATA = Object.freeze({\n\tcodec: void 0,\n\tname: void 0\n});\nfunction deriveParamMetadata(ast) {\n\treturn collectOrderedParamRefs(ast).map((ref) => {\n\t\treturn {\n\t\t\tcodec: ref.codec,\n\t\t\tname: ref.name\n\t\t};\n\t});\n}\nfunction resolveParamCodec(metadata, contractCodecs) {\n\tif (metadata.codec && contractCodecs) return contractCodecs.forCodecRef(metadata.codec);\n}\nfunction paramLabel(metadata, paramIndex) {\n\treturn metadata.name ?? `param[${paramIndex}]`;\n}\nfunction wrapEncodeFailure(error, metadata, paramIndex, codecId) {\n\tif (isInternalError(error)) throw error;\n\tconst label = paramLabel(metadata, paramIndex);\n\tconst wrapped = runtimeError(\"RUNTIME.ENCODE_FAILED\", `Failed to encode parameter ${label} with codec '${codecId}': ${error instanceof Error ? error.message : String(error)}`, {\n\t\tlabel,\n\t\tcodec: codecId,\n\t\tparamIndex\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\nasync function encodeParamValue(value, metadata, paramIndex, ctx, contractCodecs) {\n\tif (value === null || value === void 0) return null;\n\tconst codec = resolveParamCodec(metadata, contractCodecs);\n\tif (!codec) return value;\n\tif (metadata.codec?.many) {\n\t\tif (!Array.isArray(value)) wrapEncodeFailure(/* @__PURE__ */ new TypeError(`expected an array for many-typed parameter, got ${typeof value}`), metadata, paramIndex, codec.id);\n\t\tconst encoded = [];\n\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\tconst elem = value[i];\n\t\t\tif (elem === null || elem === void 0) {\n\t\t\t\tencoded.push(null);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tencoded.push(await codec.toWire(elem, ctx));\n\t\t\t} catch (error) {\n\t\t\t\tif (isStructuredError(error)) throw error;\n\t\t\t\twrapEncodeFailure(error, metadata, paramIndex, codec.id);\n\t\t\t}\n\t\t}\n\t\treturn encoded;\n\t}\n\ttry {\n\t\treturn await codec.toWire(value, ctx);\n\t} catch (error) {\n\t\tif (isStructuredError(error)) throw error;\n\t\twrapEncodeFailure(error, metadata, paramIndex, codec.id);\n\t}\n}\n/**\n* Encodes all parameters concurrently via `Promise.all`. Per parameter, sync-and async-authored codecs share the same path: `codec.encode → await → return`. Param-level failures are wrapped in `RUNTIME.ENCODE_FAILED`.\n*\n* When `ctx.signal` is provided:\n*\n* - **Already-aborted at entry** short-circuits with `RUNTIME.ABORTED` (`{ phase: 'encode' }`) before any `codec.encode` call is made — codecs can pin this with a per-call counter that stays at zero.\n* - **Mid-flight abort** races the per-param `Promise.all` against `abortable(ctx.signal)`. The runtime returns `RUNTIME.ABORTED` promptly even if codec bodies ignore the signal; the in-flight bodies are abandoned and run to completion in the background (cooperative cancellation, see ADR 204).\n* - Existing structured envelopes (any dotted-code error passing `isStructuredError`, e.g. `RUNTIME.ENCODE_FAILED`) that surface from a codec body before the runtime observes the abort pass through unchanged (no double wrap).\n*/\nasync function encodeParams(plan, ctx, contractCodecs) {\n\treturn encodeParamsWithMetadata(plan.params, deriveParamMetadata(plan.ast), ctx, contractCodecs);\n}\nasync function encodeParamsWithMetadata(values, metadata, ctx, contractCodecs) {\n\tcheckAborted(ctx, \"encode\");\n\tconst signal = ctx.signal;\n\tif (values.length === 0) return values;\n\tconst tasks = values.map((value, i) => encodeParamValue(value, metadata[i] ?? NO_METADATA, i, ctx, contractCodecs));\n\tconst settled = await raceAgainstAbort(Promise.all(tasks), signal, \"encode\");\n\treturn Object.freeze(settled);\n}\n//#endregion\n//#region src/codecs/validation.ts\nfunction extractCodecIds(contract) {\n\tconst codecIds = /* @__PURE__ */ new Set();\n\tfor (const ns of Object.values(contract.storage.namespaces)) for (const table of Object.values(ns.entries.table ?? {})) for (const column of Object.values(table.columns)) {\n\t\tconst codecId = column.codecId;\n\t\tcodecIds.add(codecId);\n\t}\n\treturn codecIds;\n}\nfunction extractColumnCodecRefs(contract) {\n\tconst refs = [];\n\tfor (const [namespaceId, ns] of Object.entries(contract.storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const [columnName, column] of Object.entries(table.columns)) refs.push({\n\t\tnamespaceId,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\tcodecId: column.codecId\n\t});\n\treturn refs;\n}\nfunction validateContractCodecMappings(registry, contract) {\n\tconst invalidCodecs = extractColumnCodecRefs(contract).filter((ref) => registry.descriptorFor(ref.codecId) === void 0);\n\tif (invalidCodecs.length > 0) {\n\t\tconst details = {\n\t\t\tcontractTarget: contract.target,\n\t\t\tinvalidCodecs\n\t\t};\n\t\tthrow runtimeError(\"RUNTIME.CODEC_MISSING\", `Missing codec implementations for column codecIds: ${invalidCodecs.map((c) => `${c.namespaceId}.${c.table}.${c.column} (${c.codecId})`).join(\", \")}`, details);\n\t}\n}\nfunction validateCodecRegistryCompleteness(registry, contract) {\n\tvalidateContractCodecMappings(registry, contract);\n}\n//#endregion\n//#region src/lower-sql-plan.ts\n/**\n* Lowers a SQL query plan to an executable Plan by calling the adapter's lower method.\n*\n* Ad-hoc lowerings produce only `{kind: 'literal'}` slots; this helper\n* unwraps them into the bare-value array `SqlExecutionPlan` exposes.\n* Encountering a `{kind: 'bind'}` slot here means the caller passed an\n* AST containing `PreparedParamRef` to the ad-hoc execute path — that's a\n* caller error, surfaced as `RUNTIME.PREPARE_BIND_ON_ADHOC`.\n*/\nfunction lowerSqlPlan(adapter, contract, queryPlan) {\n\tconst lowered = adapter.lower(queryPlan.ast, {\n\t\tcontract,\n\t\tparams: queryPlan.params\n\t});\n\tconst params = lowered.params.map((slot) => {\n\t\tif (slot.kind === \"literal\") return slot.value;\n\t\tthrow runtimeError(\"RUNTIME.PREPARE_BIND_ON_ADHOC\", `The plan has a bind site for '${slot.name}'. A plan built inside prepare(...) runs only as a prepared statement.`, { name: slot.name });\n\t});\n\treturn Object.freeze({\n\t\tsql: lowered.sql,\n\t\tparams,\n\t\tast: queryPlan.ast,\n\t\tmeta: queryPlan.meta\n\t});\n}\n//#endregion\n//#region src/middleware/budgets.ts\nfunction hasAggregateWithoutGroupBy(ast) {\n\tif (ast.groupBy !== void 0) return false;\n\treturn ast.projection.some((item) => item.expr.kind === \"aggregate\");\n}\nfunction primaryTableFromAst(ast) {\n\tif (ast.from === void 0) return void 0;\n\tswitch (ast.from.kind) {\n\t\tcase \"table-source\": return ast.from.name;\n\t\tcase \"derived-table-source\": return ast.from.alias;\n\t\tcase \"function-source\": return ast.from.fn;\n\t\t// v8 ignore next 4\n\t\tdefault: return assertNever(ast.from, `Unsupported source kind: ${ast.from.kind}`);\n\t}\n}\nfunction estimateRowsFromAst(ast, tableRows, defaultTableRows, hasAggregateWithoutGroup) {\n\tif (hasAggregateWithoutGroup) return 1;\n\tconst primaryTable = primaryTableFromAst(ast);\n\tconst tableEstimate = (primaryTable !== void 0 ? tableRows[primaryTable] : void 0) ?? defaultTableRows;\n\tif (typeof ast.limit === \"number\") return Math.min(ast.limit, tableEstimate);\n\treturn tableEstimate;\n}\nfunction emitBudgetViolation(error, shouldBlock, ctx) {\n\tif (shouldBlock) throw error;\n\tctx.log.warn({\n\t\tcode: error.code,\n\t\tmessage: error.message,\n\t\tdetails: error.details\n\t});\n}\nconst observedRows = Symbol(\"budgets.observedRows\");\nfunction budgets(options) {\n\tconst maxRows = options?.maxRows ?? 1e4;\n\tconst defaultTableRows = options?.defaultTableRows ?? 1e4;\n\tconst tableRows = options?.tableRows ?? {};\n\tconst maxLatencyMs = options?.maxLatencyMs ?? 1e3;\n\tconst rowSeverity = options?.severities?.rowCount ?? \"error\";\n\tconst latencySeverity = options?.severities?.latency ?? \"warn\";\n\treturn Object.freeze({\n\t\tname: \"budgets\",\n\t\tfamilyId: \"sql\",\n\t\tasync beforeEncode(plan, ctx) {\n\t\t\tif (isQueryAst(plan.ast) && plan.ast.kind === \"select\") evaluateSelectAst(plan.ast, ctx);\n\t\t},\n\t\tasync onRow(_row, _plan, ctx) {\n\t\t\tconst observed = ctx.state(observedRows);\n\t\t\tconst count = (typeof observed[\"count\"] === \"number\" ? observed[\"count\"] : 0) + 1;\n\t\t\tobserved[\"count\"] = count;\n\t\t\tif (count <= maxRows || observed[\"warned\"] === true) return;\n\t\t\tconst shouldBlock = rowSeverity === \"error\" || ctx.mode === \"strict\";\n\t\t\tif (!shouldBlock) observed[\"warned\"] = true;\n\t\t\temitBudgetViolation(runtimeError(\"BUDGET.ROWS_EXCEEDED\", \"Observed row count exceeds budget\", {\n\t\t\t\tsource: \"observed\",\n\t\t\t\tobservedRows: count,\n\t\t\t\tmaxRows\n\t\t\t}), shouldBlock, ctx);\n\t\t},\n\t\tasync activityEnded(_activity, result, ctx) {\n\t\t\tif (result.kind === \"statement\") checkLatency(result.latencyMs, ctx);\n\t\t}\n\t});\n\tfunction checkLatency(latencyMs, ctx) {\n\t\tif (latencyMs > maxLatencyMs) {\n\t\t\tconst shouldBlock = latencySeverity === \"error\" || ctx.mode === \"strict\";\n\t\t\temitBudgetViolation(runtimeError(\"BUDGET.TIME_EXCEEDED\", \"Query latency exceeds budget\", {\n\t\t\t\tlatencyMs,\n\t\t\t\tmaxLatencyMs\n\t\t\t}), shouldBlock, ctx);\n\t\t}\n\t}\n\tfunction evaluateSelectAst(ast, ctx) {\n\t\tconst hasAggNoGroup = hasAggregateWithoutGroupBy(ast);\n\t\tconst estimated = estimateRowsFromAst(ast, tableRows, defaultTableRows, hasAggNoGroup);\n\t\tconst isUnbounded = ast.limit === void 0 && !hasAggNoGroup;\n\t\tconst shouldBlock = rowSeverity === \"error\" || ctx.mode === \"strict\";\n\t\tif (isUnbounded) {\n\t\t\temitBudgetViolation(runtimeError(\"BUDGET.ROWS_EXCEEDED\", \"Unbounded SELECT query exceeds budget\", estimated >= maxRows ? {\n\t\t\t\tsource: \"ast\",\n\t\t\t\testimatedRows: estimated,\n\t\t\t\tmaxRows\n\t\t\t} : {\n\t\t\t\tsource: \"ast\",\n\t\t\t\tmaxRows\n\t\t\t}), shouldBlock, ctx);\n\t\t\treturn;\n\t\t}\n\t\tif (estimated > maxRows) emitBudgetViolation(runtimeError(\"BUDGET.ROWS_EXCEEDED\", \"Estimated row count exceeds budget\", {\n\t\t\tsource: \"ast\",\n\t\t\testimatedRows: estimated,\n\t\t\tmaxRows\n\t\t}), shouldBlock, ctx);\n\t}\n}\n//#endregion\n//#region src/guardrails/raw.ts\nconst SELECT_STAR_REGEX = /select\\s+\\*/i;\nconst LIMIT_REGEX = /\\blimit\\b/i;\nconst MUTATION_PREFIX_REGEX = /^(insert|update|delete|create|alter|drop|truncate)\\b/i;\nconst READ_ONLY_INTENTS = /* @__PURE__ */ new Set([\n\t\"read\",\n\t\"report\",\n\t\"readonly\"\n]);\nfunction evaluateRawGuardrails(plan, config) {\n\tconst lints = [];\n\tconst budgets = [];\n\tconst normalized = normalizeWhitespace(plan.sql);\n\tconst statementType = classifyStatement(normalized);\n\tif (statementType === \"select\") {\n\t\tif (SELECT_STAR_REGEX.test(normalized)) lints.push(createLint(\"LINT.SELECT_STAR\", \"error\", \"Raw SQL plan selects all columns via *\", { sql: snippet(plan.sql) }));\n\t\tif (!LIMIT_REGEX.test(normalized)) {\n\t\t\tconst severity = config?.budgets?.unboundedSelectSeverity ?? \"error\";\n\t\t\tlints.push(createLint(\"LINT.NO_LIMIT\", \"warn\", \"Raw SQL plan omits LIMIT clause\", { sql: snippet(plan.sql) }));\n\t\t\tbudgets.push(createBudget(\"BUDGET.ROWS_EXCEEDED\", severity, \"Raw SQL plan is unbounded and may exceed row budget\", {\n\t\t\t\tsql: snippet(plan.sql),\n\t\t\t\t...config?.budgets?.estimatedRows !== void 0 ? { estimatedRows: config.budgets.estimatedRows } : {}\n\t\t\t}));\n\t\t}\n\t}\n\tif (isMutationStatement(statementType) && isReadOnlyIntent(plan.meta)) lints.push(createLint(\"LINT.READ_ONLY_MUTATION\", \"error\", \"Raw SQL plan mutates data despite read-only intent\", {\n\t\tsql: snippet(plan.sql),\n\t\tintent: plan.meta.annotations?.[\"intent\"]\n\t}));\n\treturn {\n\t\tlints,\n\t\tbudgets,\n\t\tstatement: statementType\n\t};\n}\nfunction classifyStatement(sql) {\n\tconst trimmed = sql.trim();\n\tconst lower = trimmed.toLowerCase();\n\tif (lower.startsWith(\"with\")) {\n\t\tif (lower.includes(\"select\")) return \"select\";\n\t}\n\tif (lower.startsWith(\"select\")) return \"select\";\n\tif (MUTATION_PREFIX_REGEX.test(trimmed)) return \"mutation\";\n\treturn \"other\";\n}\nfunction isMutationStatement(statement) {\n\treturn statement === \"mutation\";\n}\nfunction isReadOnlyIntent(meta) {\n\tconst annotations = meta.annotations;\n\tconst intent = typeof annotations?.intent === \"string\" ? annotations.intent.toLowerCase() : void 0;\n\treturn intent !== void 0 && READ_ONLY_INTENTS.has(intent);\n}\nfunction normalizeWhitespace(value) {\n\treturn value.replace(/\\s+/g, \" \").trim();\n}\nfunction snippet(sql) {\n\treturn normalizeWhitespace(sql).slice(0, 200);\n}\nfunction createLint(code, severity, message, details) {\n\treturn {\n\t\tcode,\n\t\tseverity,\n\t\tmessage,\n\t\t...details ? { details } : {}\n\t};\n}\nfunction createBudget(code, severity, message, details) {\n\treturn {\n\t\tcode,\n\t\tseverity,\n\t\tmessage,\n\t\t...details ? { details } : {}\n\t};\n}\n//#endregion\n//#region src/middleware/lints.ts\nfunction getFromSourceTableDetail(source) {\n\tswitch (source.kind) {\n\t\tcase \"table-source\": return source.name;\n\t\tcase \"derived-table-source\": return source.alias;\n\t\tcase \"function-source\": return source.fn;\n\t\t// v8 ignore next 4\n\t\tdefault: return assertNever(source, `Unsupported source kind: ${source.kind}`);\n\t}\n}\nfunction evaluateAstLints(ast) {\n\tconst findings = [];\n\tswitch (ast.kind) {\n\t\tcase \"delete\":\n\t\t\tif (ast.where === void 0) findings.push({\n\t\t\t\tcode: \"LINT.DELETE_WITHOUT_WHERE\",\n\t\t\t\tseverity: \"error\",\n\t\t\t\tmessage: \"DELETE without WHERE clause blocks execution to prevent accidental full-table deletion\",\n\t\t\t\tdetails: { table: ast.table.name }\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"update\":\n\t\t\tif (ast.where === void 0) findings.push({\n\t\t\t\tcode: \"LINT.UPDATE_WITHOUT_WHERE\",\n\t\t\t\tseverity: \"error\",\n\t\t\t\tmessage: \"UPDATE without WHERE clause blocks execution to prevent accidental full-table update\",\n\t\t\t\tdetails: { table: ast.table.name }\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"select\":\n\t\t\tif (ast.limit === void 0) {\n\t\t\t\tconst table = ast.from !== void 0 ? getFromSourceTableDetail(ast.from) : void 0;\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"LINT.NO_LIMIT\",\n\t\t\t\t\tseverity: \"warn\",\n\t\t\t\t\tmessage: \"Unbounded SELECT may return large result sets\",\n\t\t\t\t\t...ifDefined(\"details\", table !== void 0 ? { table } : void 0)\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (ast.selectAllIntent !== void 0) {\n\t\t\t\tconst table = ast.selectAllIntent.table;\n\t\t\t\tfindings.push({\n\t\t\t\t\tcode: \"LINT.SELECT_STAR\",\n\t\t\t\t\tseverity: \"warn\",\n\t\t\t\t\tmessage: \"Query selects all columns via selectAll intent\",\n\t\t\t\t\t...ifDefined(\"details\", table !== void 0 ? { table } : void 0)\n\t\t\t\t});\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"insert\": break;\n\t\tcase \"raw-query\": break;\n\t\t// v8 ignore next 2\n\t\tdefault: assertNever(ast, `Unsupported AST kind: ${ast.kind}`);\n\t}\n\treturn findings;\n}\nfunction getConfiguredSeverity(code, options) {\n\tconst severities = options?.severities;\n\tif (!severities) return void 0;\n\tswitch (code) {\n\t\tcase \"LINT.SELECT_STAR\": return severities.selectStar;\n\t\tcase \"LINT.NO_LIMIT\": return severities.noLimit;\n\t\tcase \"LINT.DELETE_WITHOUT_WHERE\": return severities.deleteWithoutWhere;\n\t\tcase \"LINT.UPDATE_WITHOUT_WHERE\": return severities.updateWithoutWhere;\n\t\tcase \"LINT.READ_ONLY_MUTATION\": return severities.readOnlyMutation;\n\t\tdefault: return;\n\t}\n}\n/**\n* AST-first lint middleware for SQL plans. When `plan.ast` is a SQL QueryAst, inspects\n* the AST structurally. When `plan.ast` is missing, falls back to raw heuristic\n* guardrails or skips linting depending on `fallbackWhenAstMissing`.\n*\n* Rules (AST-based):\n* - DELETE without WHERE: blocks execution (configurable severity, default error)\n* - UPDATE without WHERE: blocks execution (configurable severity, default error)\n* - Unbounded SELECT: warn/error (severity from noLimit)\n* - SELECT * intent: warn/error (severity from selectStar)\n*\n* Fallback: When ast is missing, `fallbackWhenAstMissing: 'raw'` uses heuristic\n* SQL parsing; `'skip'` skips all lints. Default is `'raw'`.\n*/\nfunction lints(options) {\n\tconst fallback = options?.fallbackWhenAstMissing ?? \"raw\";\n\tconst beforeOperation = async (plan, ctx) => {\n\t\tconst findings = [];\n\t\tif (isQueryAst(plan.ast)) {\n\t\t\tfindings.push(...evaluateAstLints(plan.ast));\n\t\t\tif (plan.ast.kind === \"raw-query\") findings.push(...evaluateRawGuardrails(plan).lints);\n\t\t} else if (fallback !== \"skip\") findings.push(...evaluateRawGuardrails(plan).lints);\n\t\tfor (const lint of findings) {\n\t\t\tconst effectiveSeverity = getConfiguredSeverity(lint.code, options) ?? lint.severity;\n\t\t\tif (effectiveSeverity === \"error\") throw runtimeError(lint.code, lint.message, lint.details);\n\t\t\tif (effectiveSeverity === \"warn\") ctx.log.warn({\n\t\t\t\tcode: lint.code,\n\t\t\t\tmessage: lint.message,\n\t\t\t\tdetails: lint.details\n\t\t\t});\n\t\t}\n\t};\n\treturn Object.freeze({\n\t\tname: \"lints\",\n\t\tfamilyId: \"sql\",\n\t\tbeforeEncode: beforeOperation\n\t});\n}\n//#endregion\n//#region src/prepared/prepared-statement.ts\nvar PreparedStatementImpl = class {\n\tsql;\n\tast;\n\tmeta;\n\tslots;\n\tdecodeContext;\n\tparamMetadata;\n\tconstructor(internals) {\n\t\tthis.sql = internals.sql;\n\t\tthis.ast = internals.ast;\n\t\tthis.meta = internals.meta;\n\t\tthis.slots = internals.slots;\n\t\tthis.decodeContext = internals.decodeContext;\n\t\tthis.paramMetadata = internals.paramMetadata;\n\t\tObject.freeze(this);\n\t}\n\tquery(target, params, options) {\n\t\treturn runPreparedQuery(target, this, params, options);\n\t}\n};\n/**\n* The statistics-reporting sibling of {@link PreparedStatementImpl}. A plan\n* declaring an affected-row count prepares into one of these, which carries\n* the same lowered statement and bind slots and is consumed by executing it.\n*\n* The two classes are separate so the consumption a plan did not declare is\n* absent from the value, not merely from its type.\n*/\nvar PreparedExecutionImpl = class {\n\tsql;\n\tast;\n\tmeta;\n\tslots;\n\tdecodeContext;\n\tparamMetadata;\n\tconstructor(internals) {\n\t\tthis.sql = internals.sql;\n\t\tthis.ast = internals.ast;\n\t\tthis.meta = internals.meta;\n\t\tthis.slots = internals.slots;\n\t\tthis.decodeContext = internals.decodeContext;\n\t\tthis.paramMetadata = internals.paramMetadata;\n\t\tObject.freeze(this);\n\t}\n\texecute(target, params, options) {\n\t\treturn runPreparedExecute(target, this, params, options);\n\t}\n};\n//#endregion\n//#region src/sql-context.ts\nfunction createSqlExecutionStack(options) {\n\treturn createExecutionStack({\n\t\ttarget: options.target,\n\t\tadapter: options.adapter,\n\t\tdriver: options.driver,\n\t\textensions: options.extensions\n\t});\n}\nfunction assertExecutionStackContractRequirements(contract, stack) {\n\tconst providedComponentIds = /* @__PURE__ */ new Set([\n\t\tstack.target.id,\n\t\tstack.adapter.id,\n\t\t...stack.extensions.map((pack) => pack.id)\n\t]);\n\tconst result = checkContractComponentRequirements({\n\t\tcontract,\n\t\texpectedTargetFamily: \"sql\",\n\t\texpectedTargetId: stack.target.targetId,\n\t\tprovidedComponentIds\n\t});\n\tif (result.familyMismatch) throw runtimeError(\"RUNTIME.CONTRACT_FAMILY_MISMATCH\", `Contract target family '${result.familyMismatch.actual}' does not match runtime family '${result.familyMismatch.expected}'.`, {\n\t\tactual: result.familyMismatch.actual,\n\t\texpected: result.familyMismatch.expected\n\t});\n\tif (result.targetMismatch) throw runtimeError(\"RUNTIME.CONTRACT_TARGET_MISMATCH\", `Contract target '${result.targetMismatch.actual}' does not match runtime target descriptor '${result.targetMismatch.expected}'.`, {\n\t\tactual: result.targetMismatch.actual,\n\t\texpected: result.targetMismatch.expected\n\t});\n\tif (result.missingExtensionPackIds.length > 0) {\n\t\tconst packIds = result.missingExtensionPackIds;\n\t\tthrow runtimeError(\"RUNTIME.MISSING_EXTENSION_PACK\", `Contract requires extension pack(s) ${packIds.map((id) => `'${id}'`).join(\", \")}, but runtime descriptors do not provide matching component(s).`, { packIds });\n\t}\n}\nfunction validateTypeParams(typeParams, descriptor, context) {\n\tconst result = descriptor.paramsSchema[\"~standard\"].validate(typeParams);\n\tif (result instanceof Promise) throw runtimeError(\"RUNTIME.TYPE_PARAMS_INVALID\", `paramsSchema for codec '${descriptor.codecId}' returned a Promise; runtime validation requires a synchronous Standard Schema validator.`, {\n\t\t...context,\n\t\tcodecId: descriptor.codecId,\n\t\ttypeParams\n\t});\n\tif (result.issues) {\n\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\tthrow runtimeError(\"RUNTIME.TYPE_PARAMS_INVALID\", `Invalid typeParams for column '${context.tableName}.${context.columnName}' (codecId: ${descriptor.codecId}): ${messages}`, {\n\t\t\t...context,\n\t\t\tcodecId: descriptor.codecId,\n\t\t\ttypeParams\n\t\t});\n\t}\n\treturn blindCast(result.value);\n}\n/**\n* Collect every {@link CodecDescriptor} contributed by the SQL stack and partition into \"parameterized\" vs \"non-parameterized\" via the descriptor's own {@link CodecDescriptorImpl.isParameterized} getter: a descriptor is parameterized when it has a `paramsSchema`.\n*\n* The unified descriptor list collapses the legacy split (a separate slot used to register parameterized codecs) — every codec id resolves through the same map (codec-registry-unification spec § Decision).\n*/\nfunction collectCodecDescriptors(contributors) {\n\tconst all = [];\n\tconst parameterized = /* @__PURE__ */ new Map();\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const contributor of contributors) for (const descriptor of contributor.codecs()) {\n\t\tif (seen.has(descriptor.codecId)) throw runtimeError(\"RUNTIME.DUPLICATE_CODEC\", `Duplicate codec descriptor for codecId '${descriptor.codecId}'.`, { codecId: descriptor.codecId });\n\t\tseen.add(descriptor.codecId);\n\t\tall.push(descriptor);\n\t\tif (descriptor.isParameterized) parameterized.set(descriptor.codecId, blindCast(descriptor));\n\t}\n\treturn {\n\t\tall,\n\t\tparameterized\n\t};\n}\n/**\n* Flatten every aggregate descriptor the SQL stack contributes. Shape validation, single-ownership of each `(operation, input)` pair, and trait-overlap resolution all happen inside {@link buildSqlAggregateDescriptorRegistry}, so contributions reach it unchecked and fail there — at composition, never mid-query.\n*/\nfunction collectAggregateDescriptorContributions(contributors) {\n\treturn contributors.flatMap((contributor) => contributor.types?.aggregateDescriptors ?? []);\n}\nfunction validateColumnTypeParams(storage, codecDescriptors) {\n\tfor (const ns of Object.values(storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const [columnName, column] of Object.entries(table.columns)) if (column.typeParams) {\n\t\tconst descriptor = codecDescriptors.get(column.codecId);\n\t\tif (descriptor) validateTypeParams(column.typeParams, descriptor, {\n\t\t\ttableName,\n\t\t\tcolumnName\n\t\t});\n\t}\n}\n/**\n* Build-time contract-integrity check: every `(table, column)` resolves to a {@link CodecRef} whose `codecId` is registered and whose `typeParams` presence matches the descriptor's `isParameterized` flag.\n*\n* Surfaces three classes of malformed contract that AST-bound codec resolution would otherwise mask silently:\n*\n* - column references a codecId no contributor registered → `RUNTIME.CODEC_DESCRIPTOR_MISSING`.\n* - parameterized codec, no `typeParams` (legacy \"tolerate refs without params\" shape) → `RUNTIME.CODEC_PARAMETERIZATION_MISMATCH`.\n* - non-parameterized codec, `typeParams` supplied → `RUNTIME.CODEC_PARAMETERIZATION_MISMATCH`.\n*\n* Runs unconditionally from `createExecutionContext` so contract bugs fail fast at construction time instead of silently skipping affected columns in the codec registry's pre-population walk.\n*/\nfunction assertColumnCodecIntegrity(storage, codecDescriptors) {\n\tfor (const [namespaceId, ns] of Object.entries(storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const columnName of Object.keys(table.columns)) {\n\t\tconst ref = codecDescriptors.codecRefForColumn(namespaceId, tableName, columnName);\n\t\tif (!ref) continue;\n\t\tconst descriptor = codecDescriptors.descriptorFor(ref.codecId);\n\t\tif (!descriptor) throw runtimeError(\"RUNTIME.CODEC_DESCRIPTOR_MISSING\", `Column '${tableName}.${columnName}' references codec '${ref.codecId}' but no contributor registered a codec descriptor for that codecId. Add the extension pack that owns the codec to the runtime stack.`, {\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName,\n\t\t\tcodecId: ref.codecId\n\t\t});\n\t\tconst paramsSchema = descriptor.paramsSchema;\n\t\tif (paramsSchema !== void 0 && ref.typeParams === void 0) {\n\t\t\tconst probe = paramsSchema[\"~standard\"].validate({});\n\t\t\tif (probe instanceof Promise) {\n\t\t\t\tprobe.catch(() => {});\n\t\t\t\tthrow runtimeError(\"RUNTIME.TYPE_PARAMS_INVALID\", `Column '${tableName}.${columnName}' uses parameterized codec '${ref.codecId}' whose paramsSchema returned a Promise; paramsSchema must be a synchronous Standard Schema validator. Return a value/issues result directly instead of a Promise.`, {\n\t\t\t\t\ttable: tableName,\n\t\t\t\t\tcolumn: columnName,\n\t\t\t\t\tcodecId: ref.codecId\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (\"issues\" in probe && !!probe.issues) throw runtimeError(\"RUNTIME.CODEC_PARAMETERIZATION_MISMATCH\", `Column '${tableName}.${columnName}' uses parameterized codec '${ref.codecId}' but no typeParams are supplied. Provide typeParams on the column.`, {\n\t\t\t\ttable: tableName,\n\t\t\t\tcolumn: columnName,\n\t\t\t\tcodecId: ref.codecId,\n\t\t\t\texpected: \"parameterized\",\n\t\t\t\tactual: \"no typeParams\"\n\t\t\t});\n\t\t}\n\t\tconst refTypeParams = ref.typeParams;\n\t\tconst refHasTypeParamKeys = refTypeParams !== void 0 && refTypeParams !== null && typeof refTypeParams === \"object\" && !Array.isArray(refTypeParams) && Object.keys(refTypeParams).length > 0;\n\t\tif (!descriptor.isParameterized && refHasTypeParamKeys) throw runtimeError(\"RUNTIME.CODEC_PARAMETERIZATION_MISMATCH\", `Column '${tableName}.${columnName}' supplies typeParams to non-parameterized codec '${ref.codecId}'. Remove the typeParams or switch to a parameterized codec id.`, {\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName,\n\t\t\tcodecId: ref.codecId,\n\t\t\texpected: \"non-parameterized\",\n\t\t\tactual: \"has typeParams\"\n\t\t});\n\t}\n}\n/**\n* Build a {@link ContractCodecRegistry} that resolves codecs exclusively through the `forCodecRef` content-keyed cache.\n*\n* One pre-population pass walks `storage.tables[].columns[]` to seed the resolver's per-ref instance context with the *aggregated* `usedAt` set for each canonical `(codecId, typeParams)` key. The same codec materialised through `forColumn` or `forCodecRef` is therefore one instance with one `SqlCodecInstanceContext` — stateful codecs reading `usedAt` see the full column set regardless of which surface the caller used.\n*\n* Per-key instance-name policy:\n*\n* - columns with `typeParams` use `<col:Table.column>` (the first column observed at that key; additional columns sharing the key extend `usedAt`).\n* - non-parameterized codec ids use `<codec:codecId>`, aggregating every column on that codec id into one `usedAt` set.\n* - ad-hoc refs the contract walk did not pre-populate (e.g. AST-supplied refs from deserialised migration ops) fall back to the canonical cache key `${codecId}:${canonicalizeJson(typeParams)}` — the only structurally honest identity for an ad-hoc ref, distinct per `(codecId, typeParams)`.\n*\n* Contract integrity is enforced upstream by {@link assertColumnCodecIntegrity}: every column must reference a registered `codecId` whose `descriptor.isParameterized` flag matches the presence of `typeParams` (via `codecRefForColumn`). The pre-population walk and `forColumn` therefore make no defensive checks — malformed columns fail fast at `createExecutionContext` construction with `RUNTIME.CODEC_DESCRIPTOR_MISSING` or `RUNTIME.CODEC_PARAMETERIZATION_MISMATCH` rather than being silently skipped here.\n*\n* `forColumn(ns, t, c)` is a thin delegate over `forCodecRef(codecRefForColumn(ns, t, c))`; encode/decode hot paths read the resolver directly via `forCodecRef`. The only `undefined` `forColumn` returns is the legitimate \"no such column in the contract\" case.\n*/\nfunction buildContractCodecRegistry(contract, codecDescriptors) {\n\tconst refKeyOf = (ref) => `${ref.codecId}:${canonicalizeJson(ref.typeParams)}`;\n\tconst usedAtByKey = /* @__PURE__ */ new Map();\n\tconst nameByKey = /* @__PURE__ */ new Map();\n\tfor (const [namespaceId, ns] of Object.entries(contract.storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const columnName of Object.keys(table.columns)) {\n\t\tconst ref = codecDescriptors.codecRefForColumn(namespaceId, tableName, columnName);\n\t\tif (!ref) continue;\n\t\tconst key = refKeyOf(ref);\n\t\tconst site = {\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName\n\t\t};\n\t\tconst existing = usedAtByKey.get(key);\n\t\tif (existing) existing.push(site);\n\t\telse {\n\t\t\tusedAtByKey.set(key, [site]);\n\t\t\tconst name = ref.typeParams !== void 0 ? `<col:${tableName}.${columnName}>` : `<codec:${ref.codecId}>`;\n\t\t\tnameByKey.set(key, name);\n\t\t}\n\t}\n\tconst resolver = createAstCodecResolver(codecDescriptors, (ref) => {\n\t\tconst key = refKeyOf(ref);\n\t\treturn {\n\t\t\tname: nameByKey.get(key) ?? key,\n\t\t\tusedAt: usedAtByKey.get(key) ?? []\n\t\t};\n\t});\n\tfor (const [namespaceId, ns] of Object.entries(contract.storage.namespaces)) for (const [tableName, table] of Object.entries(ns.entries.table ?? {})) for (const columnName of Object.keys(table.columns)) {\n\t\tconst ref = codecDescriptors.codecRefForColumn(namespaceId, tableName, columnName);\n\t\tif (!ref) continue;\n\t\tresolver.forCodecRef(ref);\n\t}\n\treturn {\n\t\tforColumn(namespaceId, table, column) {\n\t\t\tconst ref = codecDescriptors.codecRefForColumn(namespaceId, table, column);\n\t\t\treturn ref ? resolver.forCodecRef(ref) : void 0;\n\t\t},\n\t\tforCodecRef(ref) {\n\t\t\treturn resolver.forCodecRef(ref);\n\t\t}\n\t};\n}\nfunction createExecutionContext(options) {\n\tconst { stack, driver } = options;\n\tassertExecutionStackContractRequirements(options.contract, stack);\n\tconst capabilityContributors = [\n\t\tstack.target,\n\t\tstack.adapter,\n\t\t...driver ? [driver] : [],\n\t\t...stack.extensions\n\t];\n\tconst mergedCapabilities = mergeCapabilityMatrices(options.contract.capabilities, capabilityContributors);\n\tconst contract = {\n\t\t...options.contract,\n\t\tcapabilities: mergedCapabilities\n\t};\n\tconst contributors = [\n\t\tstack.target,\n\t\tstack.adapter,\n\t\t...stack.extensions\n\t];\n\tconst { all: allCodecDescriptors, parameterized: parameterizedCodecDescriptors } = collectCodecDescriptors(contributors);\n\tconst queryOperationRegistry = createSqlOperationRegistry();\n\tfor (const contributor of contributors) {\n\t\tconst ops = contributor.queryOperations?.() ?? {};\n\t\tfor (const [name, op] of Object.entries(ops)) queryOperationRegistry.register(name, op);\n\t}\n\tconst codecDescriptors = buildCodecDescriptorRegistry(allCodecDescriptors, contract.storage);\n\tassertColumnCodecIntegrity(contract.storage, codecDescriptors);\n\tconst aggregateDescriptors = buildSqlAggregateDescriptorRegistry(collectAggregateDescriptorContributions(contributors), codecDescriptors);\n\tconst mutationDefaultGeneratorRegistry = collectMutationDefaultGenerators(contributors);\n\tassertMutationDefaultGeneratorsAvailable(contract.execution, mutationDefaultGeneratorRegistry);\n\tif (parameterizedCodecDescriptors.size > 0) validateColumnTypeParams(contract.storage, parameterizedCodecDescriptors);\n\treturn {\n\t\tcontract,\n\t\tcontractCodecs: buildContractCodecRegistry(contract, codecDescriptors),\n\t\tcodecDescriptors,\n\t\taggregateDescriptors,\n\t\tqueryOperations: queryOperationRegistry,\n\t\trawCodecInferer: stack.adapter.rawCodecInferer,\n\t\tcollectionMethods: contributors.flatMap((contributor) => contributor.collectionMethods?.() ?? []),\n\t\tapplyMutationDefaults: (options) => applyMutationDefaults(contract.execution, mutationDefaultGeneratorRegistry, options)\n\t};\n}\n//#endregion\n//#region src/codecs/decoding.ts\nconst sqlNativeArrayListDecoder = async (wireValue, decodeElement) => {\n\tif (!Array.isArray(wireValue)) throw new TypeError(`expected an array from the driver for many-typed column, got ${typeof wireValue}`);\n\tconst decoded = [];\n\tfor (const elem of wireValue) decoded.push(await decodeElement(elem));\n\treturn decoded;\n};\nconst WIRE_PREVIEW_LIMIT = 100;\nconst EMPTY_INCLUDE_ALIASES = /* @__PURE__ */ new Set();\nfunction projectionListFromAst(ast) {\n\tif (ast.kind === \"select\") return ast.projection;\n\treturn ast.returning;\n}\nfunction resolveProjectionCodec(item, contractCodecs) {\n\tif (item.codec && contractCodecs) return contractCodecs.forCodecRef(item.codec);\n}\nconst EMPTY_MANY_ALIASES = /* @__PURE__ */ new Set();\nfunction undecodedContext() {\n\treturn {\n\t\taliases: void 0,\n\t\tcodecs: /* @__PURE__ */ new Map(),\n\t\tcolumnRefs: /* @__PURE__ */ new Map(),\n\t\tincludeAliases: EMPTY_INCLUDE_ALIASES,\n\t\tmanyAliases: EMPTY_MANY_ALIASES,\n\t\taliasSource: \"projection\"\n\t};\n}\n/**\n* Decode context for a raw statement: the columns come from the row spec its\n* author declared at the terminator, and each carries the codec that decodes\n* it. A statement that reports an affected-row count declares no columns, so\n* its single stats row passes through undecoded.\n*\n* The spec is the only description of the result — the runtime never parses\n* the SQL — so it is also what a mismatched result set is measured against.\n*/\nfunction rawQueryDecodeContext(ast, contractCodecs) {\n\tif (ast.result.kind === \"affected-count\") return undecodedContext();\n\tconst aliases = [];\n\tconst codecs = /* @__PURE__ */ new Map();\n\tfor (const [name, column] of Object.entries(ast.result.columns)) {\n\t\taliases.push(name);\n\t\tif (contractCodecs) codecs.set(name, contractCodecs.forCodecRef({ codecId: column.codecId }));\n\t}\n\treturn {\n\t\taliases,\n\t\tcodecs,\n\t\tcolumnRefs: /* @__PURE__ */ new Map(),\n\t\tincludeAliases: EMPTY_INCLUDE_ALIASES,\n\t\tmanyAliases: EMPTY_MANY_ALIASES,\n\t\taliasSource: \"row-spec\"\n\t};\n}\nfunction buildDecodeContext(ast, contractCodecs) {\n\tif (ast.kind === \"raw-query\") return rawQueryDecodeContext(ast, contractCodecs);\n\tconst projection = projectionListFromAst(ast);\n\tif (!projection || projection.length === 0) return undecodedContext();\n\tconst aliases = [];\n\tconst codecs = /* @__PURE__ */ new Map();\n\tconst columnRefs = /* @__PURE__ */ new Map();\n\tconst includeAliases = /* @__PURE__ */ new Set();\n\tconst manyAliases = /* @__PURE__ */ new Set();\n\tfor (const item of projection) {\n\t\taliases.push(item.alias);\n\t\tconst codec = resolveProjectionCodec(item, contractCodecs);\n\t\tif (codec) codecs.set(item.alias, codec);\n\t\tif (item.codec?.many) manyAliases.add(item.alias);\n\t\tif (item.expr.kind === \"column-ref\") columnRefs.set(item.alias, {\n\t\t\ttable: item.expr.table,\n\t\t\tcolumn: item.expr.column\n\t\t});\n\t\telse if (item.expr.kind === \"subquery\" || item.expr.kind === \"json-array-agg\") includeAliases.add(item.alias);\n\t}\n\treturn {\n\t\taliases,\n\t\tcodecs,\n\t\tcolumnRefs,\n\t\tincludeAliases,\n\t\tmanyAliases,\n\t\taliasSource: \"projection\"\n\t};\n}\nfunction previewWireValue(wireValue) {\n\tif (typeof wireValue === \"string\") return wireValue.length > WIRE_PREVIEW_LIMIT ? `${wireValue.substring(0, WIRE_PREVIEW_LIMIT)}...` : wireValue;\n\treturn String(wireValue).substring(0, WIRE_PREVIEW_LIMIT);\n}\nfunction wrapDecodeFailure(error, alias, ref, codec, wireValue) {\n\tif (isInternalError(error)) throw error;\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst wrapped = runtimeError(\"RUNTIME.DECODE_FAILED\", `Failed to decode column ${ref ? `${ref.table}.${ref.column}` : alias} with codec '${codec.id}': ${message}`, {\n\t\t...ref ? {\n\t\t\ttable: ref.table,\n\t\t\tcolumn: ref.column\n\t\t} : { alias },\n\t\tcodec: codec.id,\n\t\twirePreview: previewWireValue(wireValue)\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\nfunction wrapIncludeAggregateFailure(error, alias, wireValue) {\n\tconst wrapped = runtimeError(\"RUNTIME.DECODE_FAILED\", `Failed to parse JSON array for include alias '${alias}': ${error instanceof Error ? error.message : String(error)}`, {\n\t\talias,\n\t\twirePreview: previewWireValue(wireValue)\n\t});\n\twrapped.cause = error;\n\tthrow wrapped;\n}\nfunction decodeIncludeAggregate(alias, wireValue) {\n\tif (wireValue === null || wireValue === void 0) return [];\n\ttry {\n\t\tif (typeof wireValue === \"string\") return JSON.parse(wireValue);\n\t\tif (typeof wireValue === \"object\") return blindCast(wireValue);\n\t\treturn JSON.parse(String(wireValue));\n\t} catch (error) {\n\t\twrapIncludeAggregateFailure(error, alias, wireValue);\n\t}\n}\n/**\n* Decodes a single field. Single-armed: every cell takes the same path — `codec.decode → await → return plain value` — so sync- and async-authored codecs are indistinguishable to callers. JSON-Schema validation, when required, lives inside the resolved codec's `decode` body (e.g. `arktype-json` validates against its rehydrated schema and throws `RUNTIME.JSON_SCHEMA_VALIDATION_FAILED` from `decode` directly); there is\n* no separate validator-registry pass.\n*\n* The row-level `rowCtx` is repackaged into a per-cell `SqlCodecCallContext` whose `column = { table, name }` is a structural projection of the per-cell `ColumnRef = { table, column }` resolved from the AST-backed `DecodeContext` (the same resolution `wrapDecodeFailure` uses for envelope construction — one resolution per cell, two consumers). Cells the runtime cannot resolve to a single underlying column (aggregate\n* aliases, computed projections without a simple ref) get `column: undefined`, matching the spec contract that the runtime never silently defaults this field.\n*\n* For `many`-flagged aliases this function delegates frame traversal to the selected `ListDecoder`, passing `null` elements through unchanged and mapping the same element codec over every non-null element. SQL runtimes without a target-owned contribution select `sqlNativeArrayListDecoder` explicitly before row decoding. Element-level failures surface through the existing `RUNTIME.DECODE_FAILED` envelope with the column/codec context from the parent cell.\n*/\nasync function decodeField(alias, wireValue, decodeCtx, rowCtx, listDecoder) {\n\tif (wireValue === null) return null;\n\tconst codec = decodeCtx.codecs.get(alias);\n\tif (!codec) return wireValue;\n\tconst ref = decodeCtx.columnRefs.get(alias);\n\tlet cellCtx;\n\tif (ref) cellCtx = {\n\t\t...rowCtx,\n\t\tcolumn: {\n\t\t\ttable: ref.table,\n\t\t\tname: ref.column\n\t\t}\n\t};\n\telse {\n\t\tconst { column: _drop, ...rowCtxWithoutColumn } = rowCtx;\n\t\tcellCtx = rowCtxWithoutColumn;\n\t}\n\tconst decodeElement = async (elem) => {\n\t\tif (elem === null || elem === void 0) return null;\n\t\ttry {\n\t\t\treturn await codec.fromWire(elem, cellCtx);\n\t\t} catch (error) {\n\t\t\tif (isStructuredError(error)) throw error;\n\t\t\twrapDecodeFailure(error, alias, ref, codec, elem);\n\t\t}\n\t};\n\tif (decodeCtx.manyAliases.has(alias)) try {\n\t\treturn await listDecoder(wireValue, decodeElement);\n\t} catch (error) {\n\t\tif (isStructuredError(error)) throw error;\n\t\twrapDecodeFailure(error, alias, ref, codec, wireValue);\n\t}\n\ttry {\n\t\treturn await codec.fromWire(wireValue, cellCtx);\n\t} catch (error) {\n\t\tif (isStructuredError(error)) throw error;\n\t\twrapDecodeFailure(error, alias, ref, codec, wireValue);\n\t}\n}\n/**\n* Decodes a row by dispatching all per-cell codec calls concurrently via `Promise.all`. Each cell follows the single-armed `decodeField` path. Structured envelopes thrown by codec bodies (anything passing `isStructuredError`) and an `InternalError` pass through unchanged; all other failures are wrapped in `RUNTIME.DECODE_FAILED` with `{ table, column, codec }` (or `{ alias, codec }` when no column ref is resolvable) and the original error attached on `cause`.\n*\n* When `rowCtx.signal` is provided:\n*\n* - **Already-aborted at entry** short-circuits with `RUNTIME.ABORTED` (`{ phase: 'decode' }`) before any `codec.decode` call is made.\n* - **Mid-flight aborts** race the per-cell `Promise.all` against the signal so the runtime returns promptly even when codec bodies ignore it. In-flight bodies that ignore the signal complete in the background (cooperative cancellation).\n* - Existing structured envelopes (any dotted-code error passing `isStructuredError`, e.g. `RUNTIME.DECODE_FAILED`) from codec bodies pass through unchanged (no double wrap).\n*/\nasync function decodeRow(row, decodeCtx, rowCtx, listDecoder) {\n\tcheckAborted(rowCtx, \"decode\");\n\tconst signal = rowCtx.signal;\n\tconst aliases = decodeCtx.aliases ?? Object.keys(row);\n\tif (decodeCtx.aliases !== void 0) {\n\t\tfor (const alias of decodeCtx.aliases) if (!Object.hasOwn(row, alias)) throw decodeCtx.aliasSource === \"row-spec\" ? runtimeError(\"RUNTIME.RAW_ROW_COLUMN_MISSING\", `Raw statement result has no column \"${alias}\", which its row spec declares`, {\n\t\t\tcolumn: alias,\n\t\t\tdeclaredColumns: decodeCtx.aliases,\n\t\t\tresultColumns: Object.keys(row)\n\t\t}) : runtimeError(\"RUNTIME.DECODE_FAILED\", `Row missing projection alias \"${alias}\"`, {\n\t\t\talias,\n\t\t\texpectedAliases: decodeCtx.aliases,\n\t\t\tpresentKeys: Object.keys(row)\n\t\t});\n\t}\n\tconst tasks = [];\n\tconst includeIndices = [];\n\tfor (let i = 0; i < aliases.length; i++) {\n\t\tconst alias = blindCast(aliases[i]);\n\t\tconst wireValue = row[alias];\n\t\tif (decodeCtx.includeAliases.has(alias)) {\n\t\t\tincludeIndices.push({\n\t\t\t\tindex: i,\n\t\t\t\talias,\n\t\t\t\tvalue: wireValue\n\t\t\t});\n\t\t\ttasks.push(Promise.resolve(void 0));\n\t\t\tcontinue;\n\t\t}\n\t\ttasks.push(decodeField(alias, wireValue, decodeCtx, rowCtx, listDecoder));\n\t}\n\tconst settled = await raceAgainstAbort(Promise.all(tasks), signal, \"decode\");\n\tfor (const entry of includeIndices) settled[entry.index] = decodeIncludeAggregate(entry.alias, entry.value);\n\tconst decoded = {};\n\tfor (let i = 0; i < aliases.length; i++) {\n\t\tconst alias = blindCast(aliases[i]);\n\t\tdecoded[alias] = settled[i];\n\t}\n\treturn decoded;\n}\n//#endregion\n//#region src/content-hash.ts\n/**\n* Computes a stable content hash for a lowered SQL execution plan.\n*\n* Internally builds an unambiguous canonical-stringified preimage from\n* three components:\n*\n* 1. `meta.storageHash` — discriminates by schema. A migration changes the\n* storage hash, which invalidates cached entries automatically.\n* 2. `exec.sql` — the raw lowered SQL text. Two queries with different\n* structure produce different keys. Note that we deliberately do **not**\n* use `computeSqlFingerprint` here: that helper strips literals to group\n* executions by statement shape (used by telemetry), which is the\n* opposite of what a content hash needs — we want per-execution\n* discrimination, not per-statement-shape grouping.\n* 3. `exec.params` — the bound parameters. `canonicalStringify` produces a\n* deterministic serialization that is stable across object key\n* insertion order and that distinguishes types JSON would otherwise\n* conflate (e.g. `BigInt(1)` vs `1`).\n*\n* The components are wrapped in an object and canonicalized as a single\n* unit (rather than concatenated with a delimiter) so component\n* boundaries are unambiguous: any character appearing inside `sql` or\n* `storageHash` cannot bleed across components and produce a collision\n* with a different split of the same characters.\n*\n* The canonical string is then piped through `hashContent` to produce a\n* bounded, opaque digest. See `@internal/utils/hash-content` for the\n* rationale.\n*\n* @internal\n*/\nfunction computeSqlContentHash(exec) {\n\treturn hashContent(canonicalStringify({\n\t\tstorageHash: exec.meta.storageHash,\n\t\tsql: exec.sql,\n\t\tparams: exec.params\n\t}));\n}\n//#endregion\n//#region src/fingerprint.ts\nconst STRING_LITERAL_REGEX = /'(?:''|[^'])*'/g;\nconst NUMERIC_LITERAL_REGEX = /\\b\\d+(?:\\.\\d+)?\\b/g;\nconst WHITESPACE_REGEX = /\\s+/g;\n/**\n* Computes a literal-stripped, normalized fingerprint of a SQL statement.\n*\n* The function strips string and numeric literals, collapses whitespace, and\n* lowercases the result before hashing — so two structurally equivalent\n* statements (with different parameter values) produce the same fingerprint.\n* Used by SQL telemetry to group queries.\n*/\nfunction computeSqlFingerprint(sql) {\n\tconst normalized = sql.replace(STRING_LITERAL_REGEX, \"?\").replace(NUMERIC_LITERAL_REGEX, \"?\").replace(WHITESPACE_REGEX, \" \").trim().toLowerCase();\n\treturn createHash(\"sha256\").update(normalized).digest(\"hex\");\n}\n//#endregion\n//#region src/in-flight-operations.ts\nvar InFlightOperations = class {\n\t#count = 0;\n\t#started = 0;\n\t#drainWaiters = [];\n\t/** Records one operation as in flight; the returned callback ends it and ignores later calls. */\n\tbegin() {\n\t\tthis.#count += 1;\n\t\tthis.#started += 1;\n\t\tlet ended = false;\n\t\treturn () => {\n\t\t\tif (ended) return;\n\t\t\tended = true;\n\t\t\tthis.#count -= 1;\n\t\t\tif (this.#count === 0) for (const wake of this.#drainWaiters.splice(0)) wake();\n\t\t};\n\t}\n\t/** How many operations have begun so far; a change between two reads means work started in between. */\n\tget started() {\n\t\treturn this.#started;\n\t}\n\t/** How many operations are in flight. */\n\tget count() {\n\t\treturn this.#count;\n\t}\n\tget active() {\n\t\treturn this.#count > 0;\n\t}\n\tdrained() {\n\t\tif (this.#count === 0) return Promise.resolve();\n\t\treturn new Promise((resolve) => this.#drainWaiters.push(resolve));\n\t}\n\t/** Records `work` as in flight until it settles. */\n\tasync track(work) {\n\t\tconst end = this.begin();\n\t\ttry {\n\t\t\treturn await work();\n\t\t} finally {\n\t\t\tend();\n\t\t}\n\t}\n};\n//#endregion\n//#region src/middleware/before-compile-chain.ts\nasync function runBeforeCompileChain(middleware, initial, ctx) {\n\tlet current = initial;\n\tfor (const mw of middleware) {\n\t\tif (!mw.beforeCompile) continue;\n\t\tconst result = await mw.beforeCompile(current, ctx);\n\t\tif (result === void 0) continue;\n\t\tif (result.ast === current.ast) continue;\n\t\tctx.log.debug?.({\n\t\t\tevent: \"middleware.rewrite\",\n\t\t\tmiddleware: mw.name,\n\t\t\tlane: current.meta.lane\n\t\t});\n\t\tcurrent = result;\n\t}\n\treturn current;\n}\n//#endregion\n//#region src/owned-transaction.ts\n/**\n* Begins a transaction on a connection the transaction owns. The connection is released once the transaction has committed or rolled back, and destroyed after a failed rollback or a failed start other than a refusal before `BEGIN`. After a failed commit it stays held for the rollback that follows. A release that fails after the transaction settled is passed to `log.error`, and `commit()` or `rollback()` keeps its own outcome.\n*/\nasync function beginOwnedTransaction(connection, begin, log) {\n\tlet transaction;\n\ttry {\n\t\ttransaction = await begin();\n\t} catch (error) {\n\t\tif (wasRefusedBeforeBegin(connection)) await connection.release().catch(() => void 0);\n\t\telse await connection.destroy(error).catch(() => void 0);\n\t\tthrow error;\n\t}\n\tlet disposed = false;\n\tconst dispose = async (destroyReason) => {\n\t\tif (disposed) return;\n\t\tdisposed = true;\n\t\tif (destroyReason !== void 0) {\n\t\t\tawait connection.destroy(destroyReason.reason).catch(() => void 0);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tawait connection.release();\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tlog.error({\n\t\t\t\t\tevent: \"runtime.connection.release.error\",\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t} catch {}\n\t\t}\n\t};\n\treturn Object.assign(castAs(Object.create(transaction)), {\n\t\tasync commit() {\n\t\t\ttry {\n\t\t\t\tawait transaction.commit();\n\t\t\t} catch (error) {\n\t\t\t\tif (settlementOf(transaction)?.committed === true) await dispose();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tawait dispose();\n\t\t},\n\t\tasync rollback() {\n\t\t\ttry {\n\t\t\t\tawait transaction.rollback();\n\t\t\t} catch (error) {\n\t\t\t\tconst settlement = settlementOf(transaction);\n\t\t\t\tconst settled = settlement?.rolledBack === true || settlement?.committed === true;\n\t\t\t\tawait dispose(settled ? void 0 : { reason: error });\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tawait dispose();\n\t\t}\n\t});\n}\n//#endregion\n//#region src/prepared/bind-site-params.ts\nfunction normalizeSpec(spec) {\n\tif (typeof spec === \"string\") return {\n\t\tcodec: { codecId: spec },\n\t\tnullable: false\n\t};\n\treturn {\n\t\tcodec: spec.typeParams !== void 0 ? {\n\t\t\tcodecId: spec.codecId,\n\t\t\ttypeParams: spec.typeParams\n\t\t} : { codecId: spec.codecId },\n\t\tnullable: spec.nullable === true\n\t};\n}\nvar BindSiteExpression = class {\n\treturnType;\n\t#ast;\n\tconstructor(ref, returnType) {\n\t\tthis.#ast = ref;\n\t\tthis.returnType = returnType;\n\t}\n\tbuildAst() {\n\t\treturn this.#ast;\n\t}\n};\nfunction buildBindSiteParams(declaration) {\n\tconst params = {};\n\tfor (const [name, spec] of Object.entries(declaration)) {\n\t\tconst { codec, nullable } = normalizeSpec(spec);\n\t\tparams[name] = new BindSiteExpression(PreparedParamRef.of(name, codec, nullable), {\n\t\t\tcodecId: codec.codecId,\n\t\t\tnullable\n\t\t});\n\t}\n\treturn blindCast(Object.freeze(params));\n}\n//#endregion\n//#region src/prepared/encode-prepared.ts\n/**\n* Resolve a PreparedStatement's slot order to the unencoded values it\n* will carry into encode. Literal slots come from the lowered AST;\n* bind slots are looked up by name on `userParams`. Missing user params\n* surface `RUNTIME.PREPARE_MISSING_PARAM` so the caller cannot silently\n* bind `undefined`.\n*/\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction resolvePreparedSlotValues(ps, userParams) {\n\tif (!isRecord(userParams)) throw runtimeError(\"RUNTIME.PREPARE_MISSING_PARAM\", \"Prepared statement parameters must be an object\");\n\treturn ps.slots.map((slot) => {\n\t\tif (slot.kind === \"literal\") return slot.value;\n\t\tif (!Object.hasOwn(userParams, slot.name)) throw runtimeError(\"RUNTIME.PREPARE_MISSING_PARAM\", `Prepared statement query is missing parameter '${slot.name}'`, { name: slot.name });\n\t\treturn userParams[slot.name];\n\t});\n}\nasync function encodePreparedParams(ps, userParams, ctx, contractCodecs) {\n\treturn encodeParamsWithMetadata(resolvePreparedSlotValues(ps, userParams), ps.paramMetadata, ctx, contractCodecs);\n}\n//#endregion\n//#region src/sql-family-adapter.ts\nvar SqlFamilyAdapter = class {\n\tcontract;\n\tmarkerReader;\n\tconstructor(contract, adapterProfile) {\n\t\tthis.contract = contract;\n\t\tthis.markerReader = adapterProfile;\n\t}\n\tvalidatePlan(plan, contract) {\n\t\tvalidateSqlPlan(plan, contract);\n\t}\n};\n/** Rejects a plan built for another target or contract: `PLAN.TARGET_MISMATCH` or `PLAN.HASH_MISMATCH`. */\nfunction validateSqlPlan(plan, contract) {\n\tif (plan.meta.target !== contract.target) throw runtimeError(\"PLAN.TARGET_MISMATCH\", \"The plan was built for another target than the contract\", {\n\t\tplanTarget: plan.meta.target,\n\t\tcontractTarget: contract.target\n\t});\n\tif (plan.meta.storageHash !== contract.storage.storageHash) throw runtimeError(\"PLAN.HASH_MISMATCH\", \"The plan was built for another contract\", {\n\t\tplanStorageHash: plan.meta.storageHash,\n\t\tcontractStorageHash: contract.storage.storageHash\n\t});\n}\n//#endregion\n//#region src/sql-runtime.ts\nfunction isExecutionPlan(plan) {\n\treturn \"sql\" in plan;\n}\nfunction isBoundPreparedStatement(subject) {\n\treturn \"statement\" in subject;\n}\nfunction isPreparedStatementInternals(statement) {\n\treturn statement instanceof PreparedStatementImpl || statement instanceof PreparedExecutionImpl;\n}\n// v8 ignore next 2\nconst noopLogSink = () => {};\nconst noopLog = {\n\tinfo: noopLogSink,\n\twarn: noopLogSink,\n\terror: noopLogSink\n};\nconst scheduleTimer = globalThis.setTimeout;\nfunction runtimeClosedError() {\n\treturn structuredError(\"DRIVER.NOT_CONNECTED\", \"Runtime is closed\", {\n\t\twhy: \"close() was called on this runtime, or on the client or connection that owns it. An await using scope calls close() when it ends.\",\n\t\tfix: \"Await every query, transaction and prepared statement before close(). The usual cause is a query returned without await from an await using scope.\"\n\t});\n}\n/**\n* Abstract family-layer base for SQL runtimes. Subclass to build a target runtime\n* (e.g. `PostgresRuntimeImpl`); app code should consume the `Runtime` interface returned\n* by the target factories, never this class directly.\n*/\nvar SqlRuntimeBase = class extends RuntimeCore {\n\tcontract;\n\tadapter;\n\tdriver;\n\tfamilyAdapter;\n\tcontractCodecs;\n\tcodecDescriptors;\n\tsqlCtx;\n\tverifyMarkerOption;\n\tverifyMarkerPromise;\n\tclosePromise;\n\townsDriver;\n\tcloseRefusal;\n\t#inFlight = new InFlightOperations();\n\t#openTransactionWork = new InFlightOperations();\n\t#transactionWorkOn = /* @__PURE__ */ new WeakMap();\n\t#openActivityHandles = 0;\n\t#refusing = false;\n\t#heldQueryables = /* @__PURE__ */ new WeakSet();\n\t#preparedStatementHandles = /* @__PURE__ */ new WeakMap();\n\t#holdFinishedChildren;\n\t#openTransactions = /* @__PURE__ */ new WeakMap();\n\tcodecRegistryValidated;\n\t_telemetry;\n\tconstructor(options) {\n\t\tconst { context, adapter, driver, verifyMarker, middleware, mode, log, closeRefusal, ownsDriver } = options;\n\t\tif (middleware) for (const mw of middleware) checkMiddlewareCompatibility(mw, \"sql\", context.contract.target);\n\t\tconst sqlCtx = {\n\t\t\tcontract: context.contract,\n\t\t\tmode: mode ?? \"strict\",\n\t\t\tnow: () => Date.now(),\n\t\t\tlog: log ?? noopLog,\n\t\t\tcontentHash: (exec) => computeSqlContentHash(blindCast(exec)),\n\t\t\tscope: \"runtime\"\n\t\t};\n\t\tsuper({\n\t\t\tmiddleware: middleware ?? [],\n\t\t\tctx: sqlCtx\n\t\t});\n\t\tthis.#holdFinishedChildren = this.middleware.some((mw) => mw.activityFinalized !== void 0);\n\t\tthis.contract = context.contract;\n\t\tthis.adapter = adapter;\n\t\tthis.driver = driver;\n\t\tthis.familyAdapter = new SqlFamilyAdapter(context.contract, adapter.profile);\n\t\tthis.contractCodecs = context.contractCodecs;\n\t\tthis.codecDescriptors = context.codecDescriptors;\n\t\tthis.sqlCtx = sqlCtx;\n\t\tthis.verifyMarkerOption = verifyMarker ?? \"onFirstUse\";\n\t\tthis.closeRefusal = closeRefusal ?? \"when-idle\";\n\t\tthis.codecRegistryValidated = false;\n\t\tthis.verifyMarkerPromise = this.verifyMarkerOption === false ? Promise.resolve() : null;\n\t\tthis.closePromise = null;\n\t\tthis.ownsDriver = ownsDriver ?? true;\n\t\tthis._telemetry = null;\n\t}\n\t/**\n\t* Lower a `SqlQueryPlan` (AST + meta) into a `SqlExecutionPlan`\n\t* with encoded parameters ready for the driver.\n\t*\n\t* Implementation note: SQL splits lower-then-encode across\n\t* {@link lowerToDraft} + {@link encodeDraftParams} so the selected\n\t* operation's middleware chain can run between them:\n\t* {@link prepareOperation} runs the statement's `beforeEncode` chain\n\t* between them (cipherstash bulk-encrypt, for example, mutates pre-encode\n\t* `ParamRef.value` slots). This protected hook composes the two back into\n\t* the cross-family `lower()` shape `RuntimeCore` expects. The production\n\t* operation methods use the matching split form before driver execution.\n\t*\n\t* `ctx: SqlCodecCallContext` is forwarded to `encodeParams` so\n\t* per-query cancellation reaches every codec body during parameter\n\t* encoding. SQL params do not populate `ctx.column` — encode-side\n\t* column metadata is the middleware's domain.\n\t*/\n\tasync lower(plan, ctx) {\n\t\tconst draft = this.lowerToDraft(plan);\n\t\treturn await this.encodeDraftParams(draft, ctx);\n\t}\n\t/**\n\t* AST → pre-encode draft for the selected `query()` or `execute()` operation.\n\t* The returned plan has `sql` rendered and `params` populated with the\n\t* user-domain values the lowering site collected from `ParamRef` nodes. No\n\t* codec encode has happened yet; consumers can mutate `params` via the\n\t* `SqlParamRefMutator` before {@link encodeDraftParams} runs.\n\t*/\n\tlowerToDraft(plan) {\n\t\treturn lowerSqlPlan(this.adapter, this.contract, plan);\n\t}\n\t/**\n\t* Encode a draft plan's params for the selected `query()` or `execute()`\n\t* operation through the per-column codecs and freeze the result into the\n\t* final `SqlExecutionPlan` the driver sees. Errors surface as\n\t* `RUNTIME.ENCODE_FAILED` envelopes from {@link encodeParams}.\n\t*/\n\tasync encodeDraftParams(draft, ctx) {\n\t\treturn Object.freeze({\n\t\t\t...draft,\n\t\t\tparams: await encodeParams(draft, ctx, this.contractCodecs)\n\t\t});\n\t}\n\t/** Default query invocation required by the abstract `RuntimeCore` contract. */\n\t// v8 ignore next 6\n\trunDriver(exec) {\n\t\treturn this.driver.query({\n\t\t\tsql: exec.sql,\n\t\t\tparams: exec.params\n\t\t});\n\t}\n\trunExecute(exec) {\n\t\treturn this.driver.execute({\n\t\t\tsql: exec.sql,\n\t\t\tparams: exec.params\n\t\t});\n\t}\n\t/**\n\t* Runs the registered middleware `beforeCompile` chain over the plan's draft (AST + meta). Returns the original plan unchanged when no middleware rewrote the AST; otherwise returns a new plan carrying the rewritten AST and meta. The lowering adapter and the encoder both walk the rewritten AST directly.\n\t*/\n\tasync compilePlan(plan, middlewareCtx) {\n\t\tconst rewrittenDraft = await runBeforeCompileChain(this.middleware, {\n\t\t\tast: plan.ast,\n\t\t\tmeta: plan.meta\n\t\t}, middlewareCtx);\n\t\treturn rewrittenDraft.ast === plan.ast ? plan : {\n\t\t\t...plan,\n\t\t\tast: rewrittenDraft.ast,\n\t\t\tmeta: rewrittenDraft.meta\n\t\t};\n\t}\n\tquery(plan, options) {\n\t\treturn this.queryAgainstQueryable(plan, this.driver, options);\n\t}\n\texecute(plan, options) {\n\t\treturn this.executeStatisticsAgainstQueryable(plan, this.driver, options);\n\t}\n\t[preparedStatementQuery](ps, params, options) {\n\t\treturn this.runPreparedQueryAgainstQueryable(blindCast(ps), params, this.driver, options);\n\t}\n\t[preparedStatementExecute](ps, params, options) {\n\t\treturn this.runPreparedExecuteAgainstQueryable(blindCast(ps), params, this.driver, options);\n\t}\n\t#runtimeRoute;\n\t[activitySource] = {\n\t\tstartActivity: (activity) => {\n\t\t\tthis.#runtimeRoute ??= this.queryableRoute(this.driver, \"runtime\", () => void 0, {\n\t\t\t\ttransaction: (parent) => this.beginOwnedTransactionBeneath(parent),\n\t\t\t\truntimeWork: true\n\t\t\t});\n\t\t\treturn this.startActivityOnRoute(this.#runtimeRoute, activity, void 0);\n\t\t},\n\t\tplanContentHash: (plan) => this.planContentHashFor(plan, \"runtime\", void 0)\n\t};\n\t/**\n\t* Starts a client activity whose statements and transaction run on `route`, beneath `parent` or, without one, beneath `route.parent()`.\n\t*/\n\tstartActivityOnRoute(route, activity, parent) {\n\t\tlet endWork = noWork;\n\t\tlet started;\n\t\ttry {\n\t\t\tendWork = route.runtimeWork ? this.beginActivityWork(parent) : noWork;\n\t\t\tstarted = startClientActivity(activity, {\n\t\t\t\tmiddleware: this.middleware,\n\t\t\t\tcontext: route.scope === \"runtime\" ? this.sqlCtx : {\n\t\t\t\t\t...this.sqlCtx,\n\t\t\t\t\tscope: route.scope\n\t\t\t\t},\n\t\t\t\tparent: parent ?? route.parent(),\n\t\t\t\tholdFinishedChildren: this.#holdFinishedChildren\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tendWork();\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t\treturn started.then((run) => this.activityHandle(run, route, endWork), (error) => {\n\t\t\tendWork();\n\t\t\tthrow error;\n\t\t});\n\t}\n\t/** The content hash of the statement `plan` would send on a queryable of `scope` beneath `parent`. */\n\tasync planContentHashFor(plan, scope, parent) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tif (isBoundPreparedStatement(plan)) {\n\t\t\tconst { statement, params } = plan;\n\t\t\tinvariant(isPreparedStatementInternals(statement), \"The prepared statement was not prepared by a SQL runtime\");\n\t\t\treturn computeSqlContentHash({\n\t\t\t\tsql: statement.sql,\n\t\t\t\tast: statement.ast,\n\t\t\t\tmeta: statement.meta,\n\t\t\t\tparams: await encodePreparedParams(statement, params, {}, this.contractCodecs)\n\t\t\t});\n\t\t}\n\t\tif (isExecutionPlan(plan)) return computeSqlContentHash(Object.freeze({\n\t\t\t...plan,\n\t\t\tparams: await encodeParams(plan, {}, this.contractCodecs)\n\t\t}));\n\t\tconst compiled = await this.compilePlan(plan, createContextBeneath({\n\t\t\t...this.sqlCtx,\n\t\t\tscope\n\t\t}, parent));\n\t\treturn computeSqlContentHash(await this.encodeDraftParams(this.lowerToDraft(compiled), {}));\n\t}\n\t/** An activity route whose statements run on `queryable`. */\n\tqueryableRoute(queryable, scope, parent, options) {\n\t\treturn {\n\t\t\tscope,\n\t\t\tparent,\n\t\t\t...options,\n\t\t\tquery: (plan, executeOptions) => this.queryAgainstQueryable(plan, queryable, {\n\t\t\t\t...executeOptions,\n\t\t\t\tscope\n\t\t\t}),\n\t\t\texecute: (plan, executeOptions) => this.executeStatisticsAgainstQueryable(plan, queryable, {\n\t\t\t\t...executeOptions,\n\t\t\t\tscope\n\t\t\t}),\n\t\t\tpreparedQuery: (statement, params, executeOptions) => this.runPreparedQueryAgainstQueryable(statement, params, queryable, {\n\t\t\t\t...executeOptions,\n\t\t\t\tscope\n\t\t\t}),\n\t\t\tpreparedExecute: (statement, params, executeOptions) => this.runPreparedExecuteAgainstQueryable(statement, params, queryable, {\n\t\t\t\t...executeOptions,\n\t\t\t\tscope\n\t\t\t})\n\t\t};\n\t}\n\t/** The activity route of a held connection that `owner` wraps: its statements run on `connection`, and its transactions begin there. */\n\tconnectionRoute(connection, owner) {\n\t\tconst openTransaction = this.#openTransactions.get(connection);\n\t\treturn this.queryableRoute(connection, \"connection\", () => openTransaction, {\n\t\t\ttransaction: openTransaction === void 0 ? (parent) => this.beginTransactionBeneathOn(connection, owner, parent) : void 0,\n\t\t\truntimeWork: false\n\t\t});\n\t}\n\tbeginTransactionBeneathOn(connection, owner, parent) {\n\t\tconst openTransaction = this.#openTransactions.get(connection);\n\t\tif (openTransaction !== void 0) return Promise.reject(transactionAlreadyOpenError(parent, openTransaction));\n\t\treturn this.beginTransactionOn(connection, owner, parent);\n\t}\n\t/** The `activitySource` member of a held connection that `owner()` wraps. */\n\tconnectionActivitySource(connection, owner) {\n\t\treturn {\n\t\t\tstartActivity: (activity) => this.startActivityOnRoute(this.connectionRoute(connection, owner()), activity, void 0),\n\t\t\tplanContentHash: (plan) => this.planContentHashFor(plan, \"connection\", this.#openTransactions.get(connection))\n\t\t};\n\t}\n\tactivityHandle(run, route, endWork) {\n\t\tconst beneath = (options) => ({\n\t\t\t...options,\n\t\t\tactivityParent: run\n\t\t});\n\t\tconst source = {\n\t\t\tstartActivity: (activity) => {\n\t\t\t\ttry {\n\t\t\t\t\trun.assertAcceptsChildren();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn Promise.reject(error);\n\t\t\t\t}\n\t\t\t\treturn this.startActivityOnRoute(route, activity, run);\n\t\t\t},\n\t\t\tplanContentHash: (plan) => this.planContentHashFor(plan, route.scope, run)\n\t\t};\n\t\tconst handle = {\n\t\t\t[activitySource]: source,\n\t\t\tstartActivity: source.startActivity,\n\t\t\tplanContentHash: source.planContentHash,\n\t\t\tactivity: run.activity,\n\t\t\tget intercepted() {\n\t\t\t\treturn run.intercepted;\n\t\t\t},\n\t\t\tquery(plan, options) {\n\t\t\t\treturn rowsBeneath(run, () => route.query(plan, beneath(options)));\n\t\t\t},\n\t\t\tasync execute(plan, options) {\n\t\t\t\trun.assertAcceptsChildren();\n\t\t\t\treturn route.execute(plan, beneath(options));\n\t\t\t},\n\t\t\t[preparedStatementQuery](ps, params, options) {\n\t\t\t\treturn rowsBeneath(run, () => route.preparedQuery(blindCast(ps), params, beneath(options)));\n\t\t\t},\n\t\t\tasync [preparedStatementExecute](ps, params, options) {\n\t\t\t\trun.assertAcceptsChildren();\n\t\t\t\treturn route.preparedExecute(blindCast(ps), params, beneath(options));\n\t\t\t},\n\t\t\tend(end) {\n\t\t\t\tlet ending;\n\t\t\t\ttry {\n\t\t\t\t\tending = run.end(end);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tendWork();\n\t\t\t\t\treturn Promise.reject(error);\n\t\t\t\t}\n\t\t\t\treturn ending.then(endWork, (error) => {\n\t\t\t\t\tendWork();\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\tconst beginTransaction = route.transaction;\n\t\tif (beginTransaction === void 0) return handle;\n\t\treturn Object.assign(handle, { transaction: async () => {\n\t\t\trun.assertAcceptsChildren();\n\t\t\treturn beginTransaction(run);\n\t\t} });\n\t}\n\tasync beginOwnedTransactionBeneath(parent) {\n\t\tconst { driverConnection, connection } = await this.openConnection({ activityParent: parent });\n\t\treturn this.ownTransaction(connection, () => this.beginTransactionOn(driverConnection, connection, parent));\n\t}\n\t/** Begins a transaction with `begin` on a connection the transaction owns; see `beginOwnedTransaction`. */\n\townTransaction(connection, begin) {\n\t\treturn beginOwnedTransaction(connection, begin, this.sqlCtx.log);\n\t}\n\t/**\n\t* Returns a raw driver connection. SQL issued on it runs below the middleware/codec/telemetry pipeline. It carries its own lifecycle (`release`/`destroy`/`beginTransaction`); the caller owns disposal. It follows the runtime's close rule for connections: see {@link Runtime.close}. Pass the `activityParent` of the activity it is acquired for, so it is admitted after `close()` while that activity is open.\n\t*/\n\tasync acquireRawConnection(options) {\n\t\tconst endOperation = this.beginOperation(this.driver, options);\n\t\tlet connection;\n\t\ttry {\n\t\t\tconnection = await this.driver.acquireConnection();\n\t\t} finally {\n\t\t\tendOperation();\n\t\t}\n\t\tconst dispose = async (teardown) => {\n\t\t\ttry {\n\t\t\t\tawait this.#inFlight.track(teardown);\n\t\t\t} finally {\n\t\t\t\tthis.#transactionWorkOn.get(held)?.();\n\t\t\t}\n\t\t};\n\t\tconst held = {\n\t\t\tquery: (request) => this.trackRows(connection.query(request)),\n\t\t\texecute: (request) => this.#inFlight.track(() => connection.execute(request)),\n\t\t\tbeginTransaction: () => connection.beginTransaction(),\n\t\t\t...ifDefined(\"explain\", connection.explain?.bind(connection)),\n\t\t\trelease: () => dispose(() => connection.release()),\n\t\t\tdestroy: (reason) => dispose(() => connection.destroy(reason))\n\t\t};\n\t\treturn held;\n\t}\n\tasync *trackRows(rows) {\n\t\tconst iterator = rows[Symbol.asyncIterator]();\n\t\ttry {\n\t\t\tlet next = await this.#inFlight.track(() => iterator.next());\n\t\t\twhile (!next.done) {\n\t\t\t\tyield next.value;\n\t\t\t\tnext = await iterator.next();\n\t\t\t}\n\t\t} finally {\n\t\t\tawait iterator.return?.();\n\t\t}\n\t}\n\tasync setupDriverExecution(exec, queryable) {\n\t\tthis.familyAdapter.validatePlan(exec, this.contract);\n\t\tthis._telemetry = null;\n\t\tif (this.verifyMarkerPromise === null) {\n\t\t\tconst markerQueryable = this.#heldQueryables.has(queryable) ? queryable : this.driver;\n\t\t\tthis.verifyMarkerPromise = this.verifyMarker(markerQueryable).catch((error) => {\n\t\t\t\tthis.verifyMarkerPromise = null;\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t\tawait this.verifyMarkerPromise;\n\t}\n\tbeginActivityWork(parent) {\n\t\tconst endOperation = this.beginOperation(this.driver, { activityParent: parent });\n\t\tthis.#openActivityHandles++;\n\t\tlet ended = false;\n\t\treturn () => {\n\t\t\tif (ended) return;\n\t\t\tended = true;\n\t\t\tthis.#openActivityHandles--;\n\t\t\tendOperation();\n\t\t};\n\t}\n\twarnWhenWaitingOnlyForUnendedWork(warned) {\n\t\tconst openTransactions = this.#refusing ? this.#openTransactionWork.count : 0;\n\t\tif (warned.done || this.#openActivityHandles === 0 && openTransactions === 0) return;\n\t\tif (this.#inFlight.count !== this.#openActivityHandles) return;\n\t\twarned.done = true;\n\t\tthis.sqlCtx.log.warn({\n\t\t\tevent: \"runtime.close.waiting-for-activities\",\n\t\t\topenActivities: this.#openActivityHandles,\n\t\t\topenTransactions\n\t\t});\n\t}\n\tbeginOperation(queryable, options) {\n\t\tconst admittedParent = options?.activityParent?.acceptsChildren() === true;\n\t\tif (queryable === this.driver && this.#refusing && !admittedParent) throw runtimeClosedError();\n\t\treturn this.#inFlight.begin();\n\t}\n\tparentOf(queryable, options) {\n\t\tconst openTransaction = this.#openTransactions.get(queryable);\n\t\tconst activityParent = options?.activityParent;\n\t\tif (activityParent === void 0) return openTransaction;\n\t\tif (openTransaction !== void 0 && !activityParent.ctx.inTransaction()) throw activityOutsideTransactionError(activityParent, openTransaction);\n\t\treturn activityParent;\n\t}\n\tgetListDecoder() {\n\t\treturn sqlNativeArrayListDecoder;\n\t}\n\tasync *streamDecodedRows(run, exec, createDecodeContext, driverCall, codecCtx, queryable, onDriverAnswered) {\n\t\tconst rowDecodeContext = createDecodeContext();\n\t\tawait this.setupDriverExecution(exec, queryable);\n\t\tconst startedAt = Date.now();\n\t\tlet telemetryOutcome = null;\n\t\ttry {\n\t\t\tconst iterator = run.runQuery(exec, driverCall)[Symbol.asyncIterator]();\n\t\t\tlet answered = false;\n\t\t\ttry {\n\t\t\t\twhile (true) {\n\t\t\t\t\tcheckAborted(codecCtx, \"stream\");\n\t\t\t\t\tconst next = answered ? await iterator.next() : await iterator.next().finally(onDriverAnswered);\n\t\t\t\t\tanswered = true;\n\t\t\t\t\tif (next.done) break;\n\t\t\t\t\tyield blindCast(await decodeRow(next.value, rowDecodeContext, codecCtx, this.getListDecoder()));\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tawait iterator.return?.();\n\t\t\t}\n\t\t\ttelemetryOutcome = \"success\";\n\t\t} catch (error) {\n\t\t\ttelemetryOutcome = \"runtime-error\";\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (telemetryOutcome !== null) this.recordTelemetry(exec, telemetryOutcome, Date.now() - startedAt);\n\t\t}\n\t}\n\tcreateQueryContexts(options) {\n\t\tconst signal = options?.signal;\n\t\tconst scope = options?.scope ?? \"runtime\";\n\t\treturn {\n\t\t\tcodecCtx: signal === void 0 ? {} : { signal },\n\t\t\tcontextFields: {\n\t\t\t\t...this.sqlCtx,\n\t\t\t\t...ifDefined(\"signal\", signal),\n\t\t\t\t...scope !== \"runtime\" ? { scope } : {}\n\t\t\t}\n\t\t};\n\t}\n\tasync prepareOperation(plan, codecCtx, run) {\n\t\tcheckAborted(codecCtx, \"stream\");\n\t\tif (isExecutionPlan(plan)) {\n\t\t\tconst mutator = createSqlParamRefMutator(plan);\n\t\t\tawait run.beforeEncode(plan, mutator);\n\t\t\treturn Object.freeze({\n\t\t\t\t...plan,\n\t\t\t\tparams: await encodeParams({\n\t\t\t\t\t...plan,\n\t\t\t\t\tparams: mutator.currentParams()\n\t\t\t\t}, codecCtx, this.contractCodecs)\n\t\t\t});\n\t\t}\n\t\tconst compiled = await this.compilePlan(plan, run.ctx);\n\t\tconst draft = this.lowerToDraft(compiled);\n\t\tconst mutator = createSqlParamRefMutator(draft);\n\t\tawait run.beforeEncode(draft, mutator);\n\t\tconst draftWithMutations = Object.freeze({\n\t\t\t...draft,\n\t\t\tparams: mutator.currentParams()\n\t\t});\n\t\treturn this.encodeDraftParams(draftWithMutations, codecCtx);\n\t}\n\t/** Query rows against a caller-supplied queryable through the shared preparation pipeline. */\n\tqueryAgainstQueryable(plan, queryable, options) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tconst self = this;\n\t\tconst { codecCtx, contextFields } = this.createQueryContexts(options);\n\t\tconst generator = async function* () {\n\t\t\tconst endOperation = self.beginOperation(queryable, options);\n\t\t\ttry {\n\t\t\t\tyield* streamStatement({\n\t\t\t\t\tmiddleware: self.middleware,\n\t\t\t\t\tplan,\n\t\t\t\t\tcontext: contextFields,\n\t\t\t\t\tparent: self.parentOf(queryable, options)\n\t\t\t\t}, async function* (run) {\n\t\t\t\t\tconst exec = await self.prepareOperation(plan, codecCtx, run);\n\t\t\t\t\tyield* self.streamDecodedRows(run, exec, () => buildDecodeContext(exec.ast, self.contractCodecs), () => queryable.query({\n\t\t\t\t\t\tsql: exec.sql,\n\t\t\t\t\t\tparams: exec.params\n\t\t\t\t\t}), codecCtx, queryable, endOperation);\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\tendOperation();\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\t/** Execute statistics against a caller-supplied queryable through the shared preparation pipeline. */\n\tasync executeStatisticsAgainstQueryable(plan, queryable, options) {\n\t\tconst endOperation = this.beginOperation(queryable, options);\n\t\ttry {\n\t\t\treturn await this.executeStatisticsInFlight(plan, queryable, options);\n\t\t} finally {\n\t\t\tendOperation();\n\t\t}\n\t}\n\tasync executeStatisticsInFlight(plan, queryable, options) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tconst { codecCtx, contextFields } = this.createQueryContexts(options);\n\t\treturn this.executeOn(queryable, options, plan, contextFields, async (run) => {\n\t\t\tconst exec = await this.prepareOperation(plan, codecCtx, run);\n\t\t\treturn this.executeEncodedPlan(run, exec, queryable, codecCtx, () => queryable.execute({\n\t\t\t\tsql: exec.sql,\n\t\t\t\tparams: exec.params\n\t\t\t}));\n\t\t});\n\t}\n\texecuteOn(queryable, options, plan, context, body) {\n\t\treturn executeStatement({\n\t\t\tmiddleware: this.middleware,\n\t\t\tplan,\n\t\t\tcontext,\n\t\t\tparent: this.parentOf(queryable, options)\n\t\t}, body);\n\t}\n\tasync executeEncodedPlan(run, exec, queryable, codecCtx, driverCall) {\n\t\tawait this.setupDriverExecution(exec, queryable);\n\t\tcheckAborted(codecCtx, \"stream\");\n\t\tconst startedAt = Date.now();\n\t\tlet telemetryOutcome = \"success\";\n\t\ttry {\n\t\t\treturn await run.runExecute(exec, driverCall);\n\t\t} catch (error) {\n\t\t\ttelemetryOutcome = \"runtime-error\";\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tthis.recordTelemetry(exec, telemetryOutcome, Date.now() - startedAt);\n\t\t}\n\t}\n\tasync prepare(declaration, callback) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tconst userPlan = callback(buildBindSiteParams(declaration));\n\t\tconst finalPlan = await this.compilePlan(userPlan, createContextBeneath(this.sqlCtx, void 0));\n\t\tconst orderedRefs = collectOrderedParamRefs(finalPlan.ast);\n\t\tconst referencedNames = /* @__PURE__ */ new Set();\n\t\tfor (const ref of orderedRefs) if (ref.kind === \"prepared-param-ref\") referencedNames.add(ref.name);\n\t\tconst missing = Object.keys(declaration).filter((name) => !referencedNames.has(name));\n\t\tif (missing.length > 0) throw runtimeError(\"RUNTIME.PREPARE_UNUSED_PARAM\", `Prepared statement declaration includes parameter${missing.length === 1 ? \"\" : \"s\"} not referenced by the callback's plan: ${missing.join(\", \")}`, { unused: missing });\n\t\tconst lowered = this.adapter.lower(finalPlan.ast, {\n\t\t\tcontract: this.contract,\n\t\t\tparams: orderedRefs.map((r) => r.kind === \"param-ref\" ? r.value : void 0)\n\t\t});\n\t\tconst decodeContext = buildDecodeContext(finalPlan.ast, this.contractCodecs);\n\t\tconst paramMetadata = deriveParamMetadata(finalPlan.ast);\n\t\tconst internals = Object.freeze({\n\t\t\tsql: lowered.sql,\n\t\t\tast: finalPlan.ast,\n\t\t\tmeta: finalPlan.meta,\n\t\t\tslots: lowered.params,\n\t\t\tdecodeContext,\n\t\t\tparamMetadata\n\t\t});\n\t\treturn blindCast(finalPlan.ast.kind === \"raw-query\" && finalPlan.ast.result.kind === \"affected-count\" ? new PreparedExecutionImpl(internals) : new PreparedStatementImpl(internals));\n\t}\n\t/** Query prepared rows against a caller-supplied queryable through the full pipeline. */\n\trunPreparedQueryAgainstQueryable(ps, userParams, queryable, options) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tconst self = this;\n\t\tconst { codecCtx, contextFields } = this.createQueryContexts(options);\n\t\tconst generator = async function* () {\n\t\t\tconst endOperation = self.beginOperation(queryable, options);\n\t\t\ttry {\n\t\t\t\tyield* streamStatement({\n\t\t\t\t\tmiddleware: self.middleware,\n\t\t\t\t\tplan: ps,\n\t\t\t\t\tcontext: contextFields,\n\t\t\t\t\tparent: self.parentOf(queryable, options)\n\t\t\t\t}, (run) => self.streamPreparedRows(run, ps, userParams, queryable, codecCtx, endOperation));\n\t\t\t} finally {\n\t\t\t\tendOperation();\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\tasync *streamPreparedRows(run, ps, userParams, queryable, codecCtx, onDriverAnswered) {\n\t\tcheckAborted(codecCtx, \"stream\");\n\t\tconst preEncodeValues = resolvePreparedSlotValues(ps, userParams);\n\t\tconst preEncodeExec = {\n\t\t\tsql: ps.sql,\n\t\t\tparams: preEncodeValues,\n\t\t\tast: ps.ast,\n\t\t\tmeta: ps.meta\n\t\t};\n\t\tconst mutator = createSqlParamRefMutator(preEncodeExec);\n\t\tawait run.beforeEncode(preEncodeExec, mutator);\n\t\tconst encodedParams = await encodeParamsWithMetadata(mutator.currentParams(), ps.paramMetadata, codecCtx, this.contractCodecs);\n\t\tconst exec = {\n\t\t\tsql: ps.sql,\n\t\t\tparams: encodedParams,\n\t\t\tast: ps.ast,\n\t\t\tmeta: ps.meta\n\t\t};\n\t\tconst handles = this.#preparedStatementHandles;\n\t\tconst request = {\n\t\t\tsql: exec.sql,\n\t\t\tparams: exec.params,\n\t\t\tpreparedStatementHandle: {\n\t\t\t\tget: () => handles.get(ps),\n\t\t\t\tset: (value) => {\n\t\t\t\t\thandles.set(ps, value);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tyield* this.streamDecodedRows(run, exec, () => ps.decodeContext, () => queryable.query(request), codecCtx, queryable, onDriverAnswered);\n\t}\n\t/** Execute a prepared statement's statistics against a caller-supplied queryable through the full pipeline. */\n\tasync runPreparedExecuteAgainstQueryable(ps, userParams, queryable, options) {\n\t\tconst endOperation = this.beginOperation(queryable, options);\n\t\ttry {\n\t\t\treturn await this.runPreparedExecuteInFlight(ps, userParams, queryable, options);\n\t\t} finally {\n\t\t\tendOperation();\n\t\t}\n\t}\n\tasync runPreparedExecuteInFlight(ps, userParams, queryable, options) {\n\t\tthis.ensureCodecRegistryValidated();\n\t\tconst { codecCtx, contextFields } = this.createQueryContexts(options);\n\t\treturn this.executeOn(queryable, options, ps, contextFields, (run) => this.executePrepared(run, ps, userParams, queryable, codecCtx));\n\t}\n\tasync executePrepared(run, ps, userParams, queryable, codecCtx) {\n\t\tcheckAborted(codecCtx, \"stream\");\n\t\tconst preEncodeValues = resolvePreparedSlotValues(ps, userParams);\n\t\tconst preEncodeExec = {\n\t\t\tsql: ps.sql,\n\t\t\tparams: preEncodeValues,\n\t\t\tast: ps.ast,\n\t\t\tmeta: ps.meta\n\t\t};\n\t\tconst mutator = createSqlParamRefMutator(preEncodeExec);\n\t\tawait run.beforeEncode(preEncodeExec, mutator);\n\t\tconst exec = {\n\t\t\tsql: ps.sql,\n\t\t\tparams: await encodeParamsWithMetadata(mutator.currentParams(), ps.paramMetadata, codecCtx, this.contractCodecs),\n\t\t\tast: ps.ast,\n\t\t\tmeta: ps.meta\n\t\t};\n\t\tconst handles = this.#preparedStatementHandles;\n\t\tconst request = {\n\t\t\tsql: exec.sql,\n\t\t\tparams: exec.params,\n\t\t\tpreparedStatementHandle: {\n\t\t\t\tget: () => handles.get(ps),\n\t\t\t\tset: (value) => {\n\t\t\t\t\thandles.set(ps, value);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn this.executeEncodedPlan(run, exec, queryable, codecCtx, () => queryable.execute(request));\n\t}\n\tasync connection() {\n\t\treturn (await this.openConnection()).connection;\n\t}\n\tasync openConnection(options) {\n\t\tconst driverConn = await this.acquireRawConnection(options);\n\t\tthis.#heldQueryables.add(driverConn);\n\t\tconst self = this;\n\t\tconst wrappedConnection = {\n\t\t\t[transactionStart]: createTransactionStart(),\n\t\t\ttransaction() {\n\t\t\t\treturn self.beginTransactionOn(driverConn, wrappedConnection, void 0);\n\t\t\t},\n\t\t\t[activitySource]: self.connectionActivitySource(driverConn, () => wrappedConnection),\n\t\t\trelease: () => driverConn.release(),\n\t\t\tdestroy: (reason) => driverConn.destroy(reason),\n\t\t\tquery(plan, options) {\n\t\t\t\treturn self.queryAgainstQueryable(plan, driverConn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\texecute(plan, options) {\n\t\t\t\treturn self.executeStatisticsAgainstQueryable(plan, driverConn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementQuery](ps, params, options) {\n\t\t\t\treturn self.runPreparedQueryAgainstQueryable(blindCast(ps), params, driverConn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementExecute](ps, params, options) {\n\t\t\t\treturn self.runPreparedExecuteAgainstQueryable(blindCast(ps), params, driverConn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\tdriverConnection: driverConn,\n\t\t\tconnection: wrappedConnection\n\t\t};\n\t}\n\t/**\n\t* Begins a transaction on `connection`, which `owner` wraps, as a transaction activity. When the transaction's `activityStarted` hooks refuse the start, no `BEGIN` is sent, `owner` is recorded as clean, and `withTransaction` releases it; after any other start failure it destroys it. The transaction's `activityStarted` hooks run before `BEGIN`. Every statement sent on the transaction, or on `connection`, from the end of `BEGIN` until `commit()` or `rollback()` is called is the transaction's child, and is finalized when the transaction ends, with its outcome. `commit()` and `rollback()` resolve after every finalization hook has run. A subclass that holds its own connection begins its transactions here.\n\t*/\n\tasync beginTransactionOn(connection, owner, parent) {\n\t\towner[transactionStart].refusedBeforeBegin = false;\n\t\tconst endTransactionWork = this.#openTransactionWork.begin();\n\t\tthis.#transactionWorkOn.set(connection, endTransactionWork);\n\t\tlet activity;\n\t\ttry {\n\t\t\tactivity = await startTransactionActivity({\n\t\t\t\tmiddleware: this.middleware,\n\t\t\t\tcontext: {\n\t\t\t\t\t...this.sqlCtx,\n\t\t\t\t\tscope: \"transaction\"\n\t\t\t\t},\n\t\t\t\tparent,\n\t\t\t\tholdFinishedChildren: this.#holdFinishedChildren\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tendTransactionWork();\n\t\t\towner[transactionStart].refusedBeforeBegin = true;\n\t\t\tthrow error;\n\t\t}\n\t\tlet driverTx;\n\t\ttry {\n\t\t\tdriverTx = await connection.beginTransaction();\n\t\t} catch (error) {\n\t\t\tendTransactionWork();\n\t\t\tawait activity.end({\n\t\t\t\tby: \"rollback\",\n\t\t\t\toutcome: \"failed\",\n\t\t\t\tcommitAttempted: false\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\tif (this.#heldQueryables.has(connection)) this.#heldQueryables.add(driverTx);\n\t\treturn this.wrapTransaction(driverTx, connection, activity, endTransactionWork);\n\t}\n\twrapTransaction(driverTx, connection, activity, endTransactionWork) {\n\t\tthis.#openTransactions.set(driverTx, activity);\n\t\tthis.#openTransactions.set(connection, activity);\n\t\tconst stopAcceptingChildren = () => {\n\t\t\tactivity.stopAcceptingChildren();\n\t\t\tfor (const queryable of [driverTx, connection]) if (this.#openTransactions.get(queryable) === activity) this.#openTransactions.delete(queryable);\n\t\t};\n\t\tlet commitAttempted = false;\n\t\tconst settlement = {\n\t\t\tcommitted: false,\n\t\t\trolledBack: false,\n\t\t\tlogDroppedError(error) {\n\t\t\t\ttry {\n\t\t\t\t\tactivity.ctx.log.error({\n\t\t\t\t\t\tevent: \"middleware.activityEnded.error\",\n\t\t\t\t\t\terror\n\t\t\t\t\t});\n\t\t\t\t} catch {}\n\t\t\t}\n\t\t};\n\t\tlet commitEnding;\n\t\tconst self = this;\n\t\treturn {\n\t\t\t[transactionSettlement]: settlement,\n\t\t\tasync commit() {\n\t\t\t\tcommitAttempted = true;\n\t\t\t\tstopAcceptingChildren();\n\t\t\t\ttry {\n\t\t\t\t\tawait self.#inFlight.track(() => driverTx.commit());\n\t\t\t\t} catch (error) {\n\t\t\t\t\tendTransactionWork();\n\t\t\t\t\tawait activity.end({\n\t\t\t\t\t\tby: \"commit\",\n\t\t\t\t\t\toutcome: \"failed\"\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tsettlement.committed = true;\n\t\t\t\tcommitEnding = activity.end({\n\t\t\t\t\tby: \"commit\",\n\t\t\t\t\toutcome: \"succeeded\"\n\t\t\t\t});\n\t\t\t\ttry {\n\t\t\t\t\tawait commitEnding;\n\t\t\t\t} finally {\n\t\t\t\t\tendTransactionWork();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync rollback() {\n\t\t\t\tstopAcceptingChildren();\n\t\t\t\tif (settlement.committed) {\n\t\t\t\t\tawait commitEnding?.catch(() => void 0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (settlement.rolledBack) return;\n\t\t\t\ttry {\n\t\t\t\t\tawait self.#inFlight.track(() => driverTx.rollback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\tendTransactionWork();\n\t\t\t\t\tawait activity.end({\n\t\t\t\t\t\tby: \"rollback\",\n\t\t\t\t\t\toutcome: \"failed\",\n\t\t\t\t\t\tcommitAttempted\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tsettlement.rolledBack = true;\n\t\t\t\ttry {\n\t\t\t\t\tawait activity.end({\n\t\t\t\t\t\tby: \"rollback\",\n\t\t\t\t\t\toutcome: \"succeeded\",\n\t\t\t\t\t\tcommitAttempted\n\t\t\t\t\t});\n\t\t\t\t} finally {\n\t\t\t\t\tendTransactionWork();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[activitySource]: {\n\t\t\t\tstartActivity: (clientActivity) => self.startActivityOnRoute(self.queryableRoute(driverTx, \"transaction\", () => activity, {\n\t\t\t\t\ttransaction: void 0,\n\t\t\t\t\truntimeWork: false\n\t\t\t\t}), clientActivity, void 0),\n\t\t\t\tplanContentHash: (plan) => self.planContentHashFor(plan, \"transaction\", activity)\n\t\t\t},\n\t\t\tquery(plan, options) {\n\t\t\t\treturn self.queryAgainstQueryable(plan, driverTx, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"transaction\"\n\t\t\t\t});\n\t\t\t},\n\t\t\texecute(plan, options) {\n\t\t\t\treturn self.executeStatisticsAgainstQueryable(plan, driverTx, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"transaction\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementQuery](ps, params, options) {\n\t\t\t\treturn self.runPreparedQueryAgainstQueryable(blindCast(ps), params, driverTx, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"transaction\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementExecute](ps, params, options) {\n\t\t\t\treturn self.runPreparedExecuteAgainstQueryable(blindCast(ps), params, driverTx, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"transaction\"\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\ttelemetry() {\n\t\treturn this._telemetry;\n\t}\n\tclose() {\n\t\tthis.closePromise ??= this.closeDriverAfterWork();\n\t\treturn this.closePromise;\n\t}\n\tasync closeDriverAfterWork() {\n\t\tawait this.refuseAfterWork();\n\t\tif (this.ownsDriver) await this.driver.close();\n\t}\n\tasync refuseAfterWork() {\n\t\tconst warned = { done: false };\n\t\tif (this.closeRefusal === \"when-idle\") await this.waitForIdleTurn(warned);\n\t\tthis.#refusing = true;\n\t\tthis.warnWhenWaitingOnlyForUnendedWork(warned);\n\t\twhile (this.#inFlight.active || this.#openTransactionWork.active) {\n\t\t\tawait this.#inFlight.drained();\n\t\t\tthis.warnWhenWaitingOnlyForUnendedWork(warned);\n\t\t\tawait this.#openTransactionWork.drained();\n\t\t}\n\t}\n\tasync waitForIdleTurn(warned) {\n\t\tfor (;;) {\n\t\t\tconst startedBefore = this.#inFlight.started;\n\t\t\tawait new Promise((resolve) => scheduleTimer(resolve, 0));\n\t\t\tif (!this.#inFlight.active && this.#inFlight.started === startedBefore) return;\n\t\t\tthis.warnWhenWaitingOnlyForUnendedWork(warned);\n\t\t\tawait this.#inFlight.drained();\n\t\t}\n\t}\n\tensureCodecRegistryValidated() {\n\t\tif (!this.codecRegistryValidated) {\n\t\t\tvalidateCodecRegistryCompleteness(this.codecDescriptors, this.contract);\n\t\t\tthis.codecRegistryValidated = true;\n\t\t}\n\t}\n\tasync verifyMarker(queryable) {\n\t\tconst readResult = await this.familyAdapter.markerReader.readMarker(queryable);\n\t\tconst expectedStorageHash = this.contract.storage.storageHash;\n\t\tconst expectedProfileHash = this.contract.profileHash ?? null;\n\t\tconst expected = {\n\t\t\tstorageHash: expectedStorageHash,\n\t\t\tprofileHash: expectedProfileHash\n\t\t};\n\t\tif (readResult.kind !== \"present\") {\n\t\t\tthis.sqlCtx.log.warn({\n\t\t\t\tcode: \"CONTRACT.MARKER_MISSING\",\n\t\t\t\tscope: \"marker-verification\",\n\t\t\t\texpected,\n\t\t\t\tactual: null,\n\t\t\t\tmessage: \"Contract marker not found in database\"\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst marker = readResult.record;\n\t\tconst storageHashMatch = marker.storageHash === expectedStorageHash;\n\t\tconst profileHashMatch = expectedProfileHash === null || marker.profileHash === expectedProfileHash;\n\t\tif (!storageHashMatch || !profileHashMatch) this.sqlCtx.log.warn({\n\t\t\tcode: \"CONTRACT.MARKER_MISMATCH\",\n\t\t\tscope: \"marker-verification\",\n\t\t\texpected,\n\t\t\tactual: {\n\t\t\t\tstorageHash: marker.storageHash,\n\t\t\t\tprofileHash: marker.profileHash ?? null\n\t\t\t},\n\t\t\tmessage: \"Contract marker hash does not match runtime contract\"\n\t\t});\n\t}\n\trecordTelemetry(plan, outcome, durationMs) {\n\t\tconst contract = this.contract;\n\t\tthis._telemetry = Object.freeze({\n\t\t\tlane: plan.meta.lane,\n\t\t\ttarget: contract.target,\n\t\t\tfingerprint: computeSqlFingerprint(plan.sql),\n\t\t\toutcome,\n\t\t\t...durationMs !== void 0 ? { durationMs } : {}\n\t\t});\n\t}\n};\nfunction activityOutsideTransactionError(parent, openTransaction) {\n\treturn runtimeError(\"RUNTIME.ACTIVITY_OUTSIDE_TRANSACTION\", `Work was sent through a '${parent.activity.kind}' activity onto a connection whose open transaction the activity is not part of. Start the activity on the transaction instead.`, {\n\t\tkind: parent.activity.kind,\n\t\tid: parent.activity.id,\n\t\ttransactionId: openTransaction.activity.id\n\t});\n}\nfunction transactionAlreadyOpenError(parent, openTransaction) {\n\treturn runtimeError(\"RUNTIME.TRANSACTION_ALREADY_OPEN\", `A transaction is already open on this connection; a '${parent.activity.kind}' activity cannot begin another until it commits or rolls back.`, {\n\t\tkind: parent.activity.kind,\n\t\tid: parent.activity.id,\n\t\ttransactionId: openTransaction.activity.id\n\t});\n}\nfunction noWork() {}\nfunction rowsBeneath(run, rows) {\n\treturn new AsyncIterableResult(new RowsBeneath(run, rows));\n}\n/** The rows of a statement started beneath `run`, checked against `run` on the first `next()`. It forwards to the statement's own iterator rather than adding an async generator, so each row costs no extra turn. */\nvar RowsBeneath = class {\n\t#run;\n\t#rows;\n\t#inner;\n\t#done = false;\n\tconstructor(run, rows) {\n\t\tthis.#run = run;\n\t\tthis.#rows = rows;\n\t}\n\tnext() {\n\t\tif (this.#done) return Promise.resolve({\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t});\n\t\tif (this.#inner === void 0) try {\n\t\t\tthis.#run.assertAcceptsChildren();\n\t\t\tthis.#inner = this.#rows()[Symbol.asyncIterator]();\n\t\t} catch (error) {\n\t\t\tthis.#done = true;\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t\treturn this.#inner.next();\n\t}\n\treturn() {\n\t\tconst inner = this.#inner;\n\t\tthis.#done = true;\n\t\treturn inner?.return === void 0 ? Promise.resolve({\n\t\t\tdone: true,\n\t\t\tvalue: void 0\n\t\t}) : inner.return();\n\t}\n\tthrow(error) {\n\t\tconst inner = this.#inner;\n\t\tif (inner?.throw === void 0) {\n\t\t\tthis.#done = true;\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t\treturn inner.throw(error);\n\t}\n\t[Symbol.asyncIterator]() {\n\t\treturn this;\n\t}\n\tasync [Symbol.asyncDispose]() {\n\t\tawait this.return();\n\t}\n};\nfunction transactionClosedError() {\n\treturn runtimeError(\"RUNTIME.TRANSACTION_CLOSED\", \"Cannot use a transaction operation after the transaction has ended. Consume query results and await execute calls inside the transaction callback.\", {});\n}\n/**\n* Adds a client's members to the context `withTransaction` passes. The context is the prototype, not spread, so live accessors such as `invalidated` keep reading the transaction's state; spreading would copy their value once.\n*/\nfunction withTransactionMembers(txCtx, members) {\n\treturn Object.assign(castAs(Object.create(txCtx)), members);\n}\nasync function withTransaction(runtime, fn) {\n\tconst connection = await runtime.connection();\n\tlet transaction;\n\ttry {\n\t\ttransaction = await connection.transaction();\n\t} catch (error) {\n\t\tif (wasRefusedBeforeBegin(connection)) await connection.release().catch(() => void 0);\n\t\telse await connection.destroy(error).catch(() => void 0);\n\t\tthrow error;\n\t}\n\tlet invalidated = false;\n\tasync function* guardedStream(inner) {\n\t\tif (invalidated) throw transactionClosedError();\n\t\tfor await (const row of inner) {\n\t\t\tyield row;\n\t\t\tif (invalidated) throw transactionClosedError();\n\t\t}\n\t}\n\tfunction guardedQueryable(target) {\n\t\treturn {\n\t\t\tquery(plan, options) {\n\t\t\t\tif (invalidated) throw transactionClosedError();\n\t\t\t\treturn new AsyncIterableResult(guardedStream(target.query(plan, options)));\n\t\t\t},\n\t\t\tasync execute(plan, options) {\n\t\t\t\tif (invalidated) throw transactionClosedError();\n\t\t\t\treturn target.execute(plan, options);\n\t\t\t},\n\t\t\t[preparedStatementQuery](ps, params, options) {\n\t\t\t\tif (invalidated) throw transactionClosedError();\n\t\t\t\treturn new AsyncIterableResult(guardedStream(runPreparedQuery(target, ps, params, options)));\n\t\t\t},\n\t\t\t[preparedStatementExecute](ps, params, options) {\n\t\t\t\tif (invalidated) throw transactionClosedError();\n\t\t\t\treturn runPreparedExecute(target, ps, params, options);\n\t\t\t}\n\t\t};\n\t}\n\tfunction guardedSource(target) {\n\t\treturn {\n\t\t\tasync startActivity(activity) {\n\t\t\t\tif (invalidated) throw transactionClosedError();\n\t\t\t\treturn guardedHandle(await startActivityOn(target, activity));\n\t\t\t},\n\t\t\tplanContentHash(plan) {\n\t\t\t\treturn planContentHashOn(target, plan);\n\t\t\t}\n\t\t};\n\t}\n\tfunction guardedHandle(handle) {\n\t\tconst source = guardedSource(handle);\n\t\treturn {\n\t\t\t...source,\n\t\t\t...guardedQueryable(handle),\n\t\t\t[activitySource]: source,\n\t\t\tactivity: handle.activity,\n\t\t\tget intercepted() {\n\t\t\t\treturn handle.intercepted;\n\t\t\t},\n\t\t\tend: (end) => handle.end(end)\n\t\t};\n\t}\n\tconst txContext = {\n\t\t...guardedQueryable(transaction),\n\t\tget invalidated() {\n\t\t\treturn invalidated;\n\t\t},\n\t\t[activitySource]: guardedSource(transaction)\n\t};\n\tlet connectionDisposed = false;\n\tconst destroyConnection = async (reason) => {\n\t\tif (connectionDisposed) return;\n\t\tconnectionDisposed = true;\n\t\tawait connection.destroy(reason).catch(() => void 0);\n\t};\n\ttry {\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await fn(txContext);\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait transaction.rollback();\n\t\t\t} catch (rollbackError) {\n\t\t\t\tconst settlement = settlementOf(transaction);\n\t\t\t\tif (settlement?.rolledBack === true) {\n\t\t\t\t\tsettlement.logDroppedError(rollbackError);\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tawait destroyConnection(rollbackError);\n\t\t\t\tconst wrapped = runtimeError(\"RUNTIME.TRANSACTION_ROLLBACK_FAILED\", \"Transaction rollback failed after callback error\", { rollbackError });\n\t\t\t\twrapped.cause = error;\n\t\t\t\tthrow wrapped;\n\t\t\t}\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tinvalidated = true;\n\t\t}\n\t\ttry {\n\t\t\tawait transaction.commit();\n\t\t} catch (commitError) {\n\t\t\tif (settlementOf(transaction)?.committed === true) throw commitError;\n\t\t\ttry {\n\t\t\t\tawait transaction.rollback();\n\t\t\t} catch (rollbackError) {\n\t\t\t\tconst settlement = settlementOf(transaction);\n\t\t\t\tif (settlement?.rolledBack === true) settlement.logDroppedError(rollbackError);\n\t\t\t\telse await destroyConnection(commitError);\n\t\t\t}\n\t\t\tconst wrapped = runtimeError(\"RUNTIME.TRANSACTION_COMMIT_FAILED\", \"Transaction commit failed\", { commitError });\n\t\t\twrapped.cause = commitError;\n\t\t\tthrow wrapped;\n\t\t}\n\t\treturn result;\n\t} finally {\n\t\tif (!connectionDisposed) await connection.release();\n\t}\n}\n//#endregion\n//#region src/to-sql.ts\nfunction createToSql(stack, contract) {\n\tlet adapter;\n\treturn (plan) => {\n\t\tvalidateSqlPlan(plan, contract);\n\t\tadapter ??= stack.adapter.create(stack);\n\t\tconst { sql, params } = lowerSqlPlan(adapter, contract, plan);\n\t\treturn {\n\t\t\tsql,\n\t\t\tparams\n\t\t};\n\t};\n}\n//#endregion\nexport { findActivitySource as C, startActivityOn as E, delegatingActivitySource as S, planContentHashOn as T, validateContractCodecMappings as _, buildDecodeContext as a, createAstCodecRegistry as b, createExecutionContext as c, PreparedStatementImpl as d, lints as f, validateCodecRegistryCompleteness as g, extractCodecIds as h, withTransactionMembers as i, createSqlExecutionStack as l, lowerSqlPlan as m, SqlRuntimeBase as n, decodeRow as o, budgets as p, withTransaction as r, sqlNativeArrayListDecoder as s, createToSql as t, PreparedExecutionImpl as u, deriveParamMetadata as v, lazyActivitySource as w, activitySource as x, encodeParamsWithMetadata as y };\n\n//# sourceMappingURL=exports-C3wGYtID.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,iBAAiB,OAAO,gBAAgB;AAC9C,SAAS,wBAAwB,QAAQ;CACxC,OAAO,kBAAkB;AAC1B;;AAEA,SAAS,mBAAmB,QAAQ;CACnC,OAAO,wBAAwB,MAAM,IAAI,OAAO,kBAAkB,KAAK;AACxE;AACA,SAAS,iBAAiB,QAAQ;CACjC,MAAM,SAAS,mBAAmB,MAAM;CACxC,UAAU,WAAW,KAAK,GAAG,uCAAuC;CACpE,OAAO;AACR;;AAEA,SAAS,mBAAmB,QAAQ;CACnC,OAAO;EACN,gBAAgB,aAAa,OAAO,CAAC,CAAC,cAAc,QAAQ;EAC5D,kBAAkB,SAAS,OAAO,CAAC,CAAC,gBA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C1B,SAAS,aAAa;GACrB,IAAI,aAAa,WAAW,CAAC,EAAE,cAAc,MAAM,MAAM;GACzD,IAAI;IACH,MAAM,YAAY,SAAS;GAC5B,SAAS,eAAe;IACvB,MAAM,aAAa,aAAa,WAAW;IAC3C,IAAI,YAAY,eAAe,MAAM,WAAW,gBAAgB,aAAa;SACxE,MAAM,kBAAkB,WAAW;GACzC;GACA,MAAM,UAAUA,eAAa,qCAAqC,6BAA6B,EAAE,YAAY,CAAC;GAC9G,QAAQ,QAAQ;GAChB,MAAM;EACP;EACA,OAAO;CACR,UAAU;EACT,IAAI,CAAC,oBAAoB,MAAM,WAAW,QAAQ;CACnD;AACD;AAGA,SAAS,YAAY,OAAO,UAAU;CACrC,IAAI;CACJ,QAAQ,SAAS;EAChB,gBAAgB,MAAM,QAAQ;EAC9B,YAAY,MAAM,QAAQ,OAAO,KAAK;EACtC,MAAM,EAAE,KAAK,WAAW,aAAa,SAAS,UAAU,IAAI;EAC5D,OAAO;GACN;GACA;EACD;CACD;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expression-6ld_ZQL6-CQghHqQ4.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-6ld_ZQL6.d.mts"],"mappings":";;;;;;;;;;;KAQK;EACH;EACA;;;;;;;;EAQA;;;;EAIA,QAAQ;;;KAGL,wBAAwB;WAClB;WACA;;EAET,SAAS;EACT,UAAU;KACP;EACH;;EAEA;IACE;KACC,iBAAiB;WACX;WACA;;;;;KAKN,WAAW,UAAU,cAAc;WAC7B,YAAY;EACrB,YAAY;;KAET,kBAAkB,WAAW;WACvB;IACP,+CAA+C,WAAW,cAAc,GAAG;WACpE,cAAc;KACpB,iCAAiC,KAAK,2BAA2B;KACjE,WAAW,KAAK;;;;;KAKhB,WAAW,wBAAwB,0BAA0B,WAAW;WAClE;OACJ,sBAAsB,KAAK,GAAG,6BAA6B,WAAW;;;;;;;;;;;;;;;KAexE,gBAAgB,wBA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AA0B;;KAE1F,uBAAuB,WAAW,cAAc,WAAW;;KAE3D,sBAAsB,uBAAuB;;;;;;;;iBAQjC,aAAa,SAAS,iBAAiB,aAAa,iBAAiB;iBACrE,aAAa,SAAS,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expression-CieaNuRM-BpwVyjJL.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-CieaNuRM.d.mts"],"mappings":";;;;;;;;;;;cAUc,eAAe,UAAU,aAAa,uBAAuB,WAAW;mBACnE;mBACA;WACR,YAAY;EACrB,YAAY,KAAK,eAAe,YAAY,GAAG,gBAAgB;EAC/D,YAAY;EACZ,sBAAsB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expression-impl-B-XNINxr-vYwKVFeP.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/expression-impl-B-XNINxr.mjs"],"sourcesContent":["import { A as ParamRef, D as OperationExpr, N as RawExpr, P as RawQueryAst } from \"./types-NTQsD2MS.mjs\";\nimport { t as planFromAst } from \"./plan-Dh0LbYIv.mjs\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\nimport { invariant } from \"@internal/utils/assertions\";\n//#region src/expression.ts\n/**\n* Resolve a raw value or an Expression into an AST expression node.\n*\n* When `value` is an object with a callable `buildAst`, the AST it wraps is returned. Otherwise the value is embedded as a ParamRef tagged with the caller-supplied {@link CodecRef} (when known). The runtime resolves the ref via `contractCodecs.forCodecRef(codec)`; content-keyed memoisation collapses repeated lookups for the same logical column onto one shared codec.\n*\n* Operation implementations that compare a column-bound expression to a user value derive the column's {@link CodecRef} from the column-bound side (via {@link codecOf}) and forward it here so encode-side dispatch resolves to the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction toExpr(value, codec) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_CODEC_REQUIRED\", `Cannot construct a ParamRef for a ${value === null ? \"null\" : typeof value} value without an explicit codec. Provide a CodecRef at the call site or use a column-bound builder path.`);\n\treturn ParamRef.of(value, { codec });\n}\n/**\n* Construct a `ParamRef` for a value whose codec identity is known at call time. Use this when interpolating a value into a raw SQL expression and the codec cannot be inferred from context — e.g. `param(myDate, { codecId: 'pg/timestamptz-temporal@1' })`.\n*/\nfunction param(value, opts) {\n\treturn ParamRef.of(value, { codec: { codecId: opts.codecId } });\n}\n/**\n* Derive the {@link CodecRef} carried by an expression-like value.\n*\n* Resolution order:\n* 1. `wrapper.returnType.codec` — scope-level codec when the scope was built from contract storage.\n* 2. `{ codecId: wrapper.returnType.codecId }` — minimal ref derived from the expression's declared codec id (covers synthetic expressions like `count()` whose returnType has a known codec id but no explicit column binding).\n*\n* Returns `undefined` for raw scalar values (non-expression-like).\n*/\nfunction codecOf(value) {\n\tif (!isExpression(value)) return void 0;\n\treturn value.returnType?.codec ?? (value.returnType?.codecId ? { codecId: value.returnType.codecId } : void 0);\n}\nfunction isExpression(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\";\n}\n/**\n* Construct an OperationExpr AST node and wrap it as a typed Expression. Operation implementations use this to turn their user-facing arguments into the AST node the compilation pipeline eventually lowers to SQL.\n*/\nfunction buildOperation(spec) {\n\tconst [self, ...rest] = spec.args;\n\tconst op = new OperationExpr({\n\t\tmethod: spec.method,\n\t\tself,\n\t\targs: rest.length > 0 ? rest : void 0,\n\t\treturns: spec.returns,\n\t\tlowering: spec.lowering\n\t});\n\treturn {\n\t\treturnType: spec.returns,\n\t\tbuildAst: () => op\n\t};\n}\nfunction resolveInterpolation(adapter, value) {\n\tif (isExpression(value)) return value.buildAst();\n\tif (value instanceof ParamRef) return value;\n\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"string\" || typeof value === \"boolean\" || value instanceof Uint8Array) return ParamRef.of(value, { codec: { codecId: adapter.inferCodec(value) } });\n\tthrow runtimeError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\");\n}\nfunction isRawRowQuery(value) {\n\treturn typeof value === \"object\" && value !== null && \"buildAst\" in value && typeof value.buildAst === \"function\" && \"build\" in value && typeof value.build === \"function\";\n}\nfunction templateParts(adapter, strings, values) {\n\tconst parts = [strings[0] ?? \"\"];\n\tvalues.forEach((value, i) => {\n\t\tif (isRawRowQuery(value)) parts.push(...value.buildAst().parts);\n\t\telse parts.push(resolveInterpolation(adapter, value));\n\t\tparts.push(strings[i + 1] ?? \"\");\n\t});\n\treturn parts;\n}\n/**\n* Normalizes each authored entry to a {@link RawQueryColumn}. The record is\n* assembled with `Object.fromEntries`, which defines each key as an own\n* property: a spec built at runtime with a `__proto__` key reaches the AST,\n* which refuses it by name, rather than silently setting the record's\n* prototype and leaving the column to vanish.\n*/\nfunction resolveRowSpec(spec) {\n\treturn Object.fromEntries(Object.entries(spec).map(([name, entry]) => [name, typeof entry === \"string\" ? {\n\t\tcodecId: entry,\n\t\tnullable: false\n\t} : {\n\t\tcodecId: entry.codecId,\n\t\tnullable: entry.nullable ?? false\n\t}]));\n}\nfunction createRawSql(adapter, planContext) {\n\tif (planContext === void 0) return (strings, ...values) => new RawSqlBuilderImpl(templateParts(adapter, strings, values));\n\tconst context = planContext;\n\treturn (strings, ...values) => new RawSqlStatementBuilderImpl(templateParts(adapter, strings, values), context);\n}\nvar RawSqlBuilderImpl = class {\n\tparts;\n\tconstructor(parts) {\n\t\tthis.parts = parts;\n\t}\n\treturns(spec) {\n\t\tconst codecId = typeof spec === \"string\" ? spec : spec.codecId;\n\t\tconst nullable = typeof spec === \"string\" ? false : spec.nullable ?? false;\n\t\tconst paramSpec = {\n\t\t\tcodecId,\n\t\t\tnullable\n\t\t};\n\t\tconst node = new RawExpr({\n\t\t\tparts: this.parts,\n\t\t\treturns: paramSpec\n\t\t});\n\t\treturn {\n\t\t\treturnType: {\n\t\t\t\tcodecId,\n\t\t\t\tnullable\n\t\t\t},\n\t\t\tbuildAst: () => node\n\t\t};\n\t}\n};\nvar RawSqlStatementBuilderImpl = class extends RawSqlBuilderImpl {\n\tplanContext;\n\tconstructor(parts, planContext) {\n\t\tsuper(parts);\n\t\tthis.planContext = planContext;\n\t}\n\treturnsRow(spec) {\n\t\tconst node = RawQueryAst.rows(this.parts, resolveRowSpec(spec));\n\t\tconst result = node.result;\n\t\tinvariant(result.kind === \"rows\", \"RawQueryAst.rows built a non-rows result\");\n\t\treturn {\n\t\t\treturns: result.columns,\n\t\t\tbuildAst: () => node,\n\t\t\tbuild: () => this.planFor(node)\n\t\t};\n\t}\n\taffectedCount() {\n\t\tconst node = RawQueryAst.affectedCount(this.parts);\n\t\treturn { build: () => this.planFor(node) };\n\t}\n\tplanFor(node) {\n\t\treturn planFromAst(node, this.planContext.contract, this.planContext.laneId);\n\t}\n};\n//#endregion\n//#region src/expression-impl.ts\n/**\n* Runtime wrapper around a relational-core AST expression node. Carries ScopeField metadata (codecId, nullable) so aggregate-like combinators can propagate the input codec onto their result.\n*\n* `returnType.codec` records the column-bound codec ref when the field-proxy knows the binding — both the namespaced form (`f.user.email` → `ColumnRef`) and the top-level shortcut (`f.email` → `IdentifierRef`) stamp the ref derived from contract storage. `codecOf(expression)` exposes it for operation implementations forwarding the ref to `toExpr`.\n*\n* `projectionAst` carries the descriptor-lowered rendering of the expression, where a target declares one (e.g. SQLite's `CAST(count(*) AS TEXT)`). Lowering exists to carry the value across the driver boundary, so only the projection site consumes it — predicate and ordering positions (`buildAst()`) keep the plain form, where the rendering would change SQL semantics.\n*/\nvar ExpressionImpl = class {\n\tast;\n\tprojectionAst;\n\treturnType;\n\tconstructor(ast, returnType, projectionAst) {\n\t\tthis.ast = ast;\n\t\tthis.returnType = returnType;\n\t\tthis.projectionAst = projectionAst;\n\t}\n\tbuildAst() {\n\t\treturn this.ast;\n\t}\n\tbuildProjectionAst() {\n\t\treturn this.projectionAst ?? this.ast;\n\t}\n};\n//#endregion\nexport { isExpression as a, createRawSql as i, buildOperation as n, param as o, codecOf as r, toExpr as s, ExpressionImpl as t };\n\n//# sourceMappingURL=expression-impl-B-XNINxr.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,OAAO,OAAO,OAAO;CAC7B,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,IAAI,UAAU,KAAK,GAAG,MAAM,aAAa,oCAAoC,qCAAqC,UAAU,OAAO,SAAS,OAAO,MAAM,0GAA0G;CACnQ,OAAO,SAAS,GAAG,OAAO,EAAE,MAAM,CAAC;AACpC;;;;AAIA,SAAS,MAAM,OAAO,MAAM;CAC3B,OAAO,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,KAAK,QAAQ,EAAE,CAAC;AAC/D;;;;;;;;;;AAUA,SAAS,QAAQ,OAAO;CACvB,IAAI,CAAC,aAAa,KAAK,GAAG,OAAO,KAAK;CACtC,OAAO,MAAM,YAAY,UAAU,MAAM,YAAY,UAAU,EAAE,SAAS,MAAM,WAAW,QAAQ,IAAI,KAAK;AAC7G;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,cAAc,SAAS,OAAO,MAAM,aAAa;AACxG;;;;AAIA,SAAS,eAAe,MAAM;CAC7B,MAAM,CAAC,MAAM,GAAG,QAAQ,KAAK;CAC7B,MAAM,KAAK,IAAI,cAAc;EAC5B,QAAQ,KAAK;EACb;EACA,MAAM,KAAK,SAAS,IAAI,OAAO,KAAK;EACpC,SAAS,KAAK;EACd,UAAU,KAAK;CAChB,CAAC;CACD,OAAO;EACN,YAAY,KAAK;EACjB,gBAAgB;CACjB;AACD;AACA,SAAS,qBAAqB,SAAS,OAAO;CAC7C,IAAI,aAAa,KAAK,GAAG,OAAO,MAAM,SAAS;CAC/C,IAAI,iBAAiB,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,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WAAW,OAAO,KAAK;EACvD,MAAM,WAAW,OAAO,SAAS,WAAW,QAAQ,KAAK,YAAY;EACrE,MAAM,YAAY;GACjB;GACA;EACD;EACA,MAAM,OAAO,IAAI,QAAQ;GACxB,OAAO,KAAK;GACZ,SAAS;EACV,CAAC;EACD,OAAO;GACN,YAAY;IACX;IACA;GACD;GACA,gBAAgB;EACjB;CACD;AACD;AACA,IAAI,6BAA6B,cAAc,kBAAkB;CAChE;CACA,YAAY,OAAO,aAAa;EAC/B,MAAM,KAAK;EACX,KAAK,cAAc;CACpB;CACA,WAAW,MAAM;EAChB,MAAM,OAAO,YAAY,KAAK,KAAK,OAAO,eAAe,IAAI,CAAC;EAC9D,MAAM,SAAS,KAAK;EACpB,UAAU,OAAO,SAAS,QAAQ,0CAA0C;EAC5E,OAAO;GACN,SAAS,OAAO;GAChB,gBAAgB;GAChB,aAAa,KAAK,QAAQ,IAAI;EAC/B;CACD;CACA,gBAAgB;EACf,MAAM,OAAO,YAAY,cAAc,KAAK,KAAK;EACjD,OAAO,EAAE,aAAa,KAAK,QAAQ,IAAI,EAAE;CAC1C;CACA,QAAQ,MAAM;EACb,OAAO,YAAY,MAAM,KAAK,YAAY,UAAU,KAAK,YAAY,MAAM;CAC5E;AACD;;;;;;;;AAUA,IAAI,iBAAiB,MAAM;CAC1B;CACA;CACA;CACA,YAAY,KAAK,YAAY,eAAe;EAC3C,KAAK,MAAM;EACX,KAAK,aAAa;EAClB,KAAK,gBAAgB;CACtB;CACA,WAAW;EACV,OAAO,KAAK;CACb;CACA,qBAAqB;EACpB,OAAO,KAAK,iBAAiB,KAAK;CACnC;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factories-C4JbtO84.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/factories.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { a as ForeignKey, i as PrimaryKey, n as UniqueConstraint, r as StorageColumn, s as Index, t as StorageTable } from \"./storage-table-DDvN83mw.mjs\";\nimport { parseNaming } from \"@internal/sql-schema-ir/naming\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/factories.ts\nfunction col(dataType, codecId, nullable = false, opts) {\n\tif (opts?.elementNullable !== void 0 && opts.many !== true) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", \"StorageColumn elementNullable must be nested under many.\", { meta: { reason: \"elementNullable-without-many\" } });\n\treturn new StorageColumn({\n\t\tdataType,\n\t\tcodecId,\n\t\tnullable,\n\t\tmany: opts?.many === true ? { elementNullable: opts.elementNullable ?? false } : false\n\t});\n}\nfunction pk(...columns) {\n\treturn new PrimaryKey({ columns });\n}\nfunction unique(...columns) {\n\treturn new UniqueConstraint({ columns });\n}\nfunction index(name, columns, opts) {\n\treturn new Index({\n\t\tnaming: parseNaming(name, opts?.prefix),\n\t\tcolumns,\n\t\twhere: void 0,\n\t\tunique: opts?.unique ?? false,\n\t\ttype: opts?.type,\n\t\toptions: opts?.options\n\t});\n}\nfunction fk(srcTableName, srcColumns, targetTableName, targetColumns, opts) {\n\tconst namespaceId = asNamespaceId(opts?.namespaceId ?? UNBOUND_NAMESPACE_ID);\n\treturn new ForeignKey({\n\t\tsource: {\n\t\t\tnamespaceId,\n\t\t\ttableName: srcTableName,\n\t\t\tcolumns: srcColumns\n\t\t},\n\t\ttarget: {\n\t\t\tnamespaceId,\n\t\t\ttableName: targetTableName,\n\t\t\tcolumns: targetColumns\n\t\t},\n\t\t...opts?.name !== void 0 && { name: opts.name },\n\t\t...opts?.onDelete !== void 0 && { onDelete: opts.onDelete },\n\t\t...opts?.onUpdate !== void 0 && { onUpdate: opts.onUpdate },\n\t\t...opts?.index !== void 0 && { index: opts.index }\n\t});\n}\nfunction table(columns, opts) {\n\treturn new StorageTable({\n\t\tcolumns,\n\t\t...opts?.pk !== void 0 && { primaryKey: opts.pk },\n\t\tuniques: opts?.uniques ?? [],\n\t\tindexes: opts?.indexes ?? [],\n\t\tforeignKeys: opts?.fks ?? []\n\t});\n}\nfunction model(tableName, fields, relations = {}, namespaceId = UNBOUND_NAMESPACE_ID) {\n\tconst storage = {\n\t\ttable: tableName,\n\t\tnamespaceId,\n\t\tfields\n\t};\n\tconst domainFields = {};\n\tfor (const [name, field] of Object.entries(fields)) domainFields[name] = {\n\t\tnullable: field.nullable ?? false,\n\t\ttype: {\n\t\t\tkind: \"scalar\",\n\t\t\tcodecId: field.codecId ?? \"core/unknown@1\"\n\t\t},\n\t\tmany: false\n\t};\n\treturn {\n\t\tstorage,\n\t\tfields: domainFields,\n\t\trelations\n\t};\n}\n//#endregion\nexport { col, fk, index, model, pk, table, unique };\n\n//# sourceMappingURL=factories.mjs.map"],"mappings":";;;;;;AAMA,SAAS,IAAI,UAAU,SAAS,WAAW,OAAO,MAAM;CACvD,IAAI,MAAM,oBAAoB,KAAK,KAAK,KAAK,SAAS,MAAM,MAAM,cAAc,6BAA6B,4DAA4D,EAAE,MAAM,EAAE,QAAQ,+BAA+B,EAAE,CAAC;CAC7N,OAAO,IAAI,cAAc;EACxB;EACA;EACA;EACA,MAAM,MAAM,SAAS,OAAO,EAAE,iBAAiB,KAAK,mBAAmB,MAAM,IAAI;CAClF,CAAC;AACF;AACA,SAAS,GAAG,GAAG,SAAS;CACvB,OAAO,IAAI,WAAW,EAAE,QAAQ,CAAC;AAClC;AACA,SAAS,OAAO,GAAG,SAAS;CAC3B,OAAO,IAAI,iBAAiB,EAAE,QAAQ,CAAC;AACxC;AACA,SAAS,MAAM,MAAM,SAAS,MAAM;CACnC,OAAO,IAAI,MAAM;EAChB,QAAQ,YAAY,MAAM,MAAM,MAAM;EACtC;EACA,OAAO,KAAK;EACZ,QAAQ,MAAM,UAAU;EACxB,MAAM,MAAM;EACZ,SAAS,MAAM;CAChB,CAAC;AACF;AACA,SAAS,GAAG,cAAc,YAAY,iBAAiB,eAAe,MAAM;CAC3E,MAAM,cAAc,cAAc,MAAM,eAAe,oBAAoB;CAC3E,OAAO,IAAI,WAAW;EACrB,QAAQ;GACP;GACA,WAAW;GACX,SAAS;EACV;EACA,QAAQ;GACP;GACA,WAAW;GACX,SAAS;EACV;EACA,GAAG,MAAM,SAAS,KAAK,KAAK,EAAE,MAAM,KAAK,KAAK;EAC9C,GAAG,MAAM,aAAa,KAAK,KAAK,EAAE,UAAU,KAAK,SAAS;EAC1D,GAAG,MAAM,aAAa,KAAK,KAAK,EAAE,UAAU,KAAK,SAAS;EAC1D,GAAG,MAAM,UAAU,KAAK,KAAK,EAAE,OAAO,KAAK,MAAM;CAClD,CAAC;AACF;AACA,SAAS,MAAM,SAAS,MAAM;CAC7B,OAAO,IAAI,aAAa;EACvB;EACA,GAAG,MAAM,OAAO,KAAK,KAAK,EAAE,YAAY,KAAK,GAAG;EAChD,SAAS,MAAM,WAAW,CAAC;EAC3B,SAAS,MAAM,WAAW,CAAC;EAC3B,aAAa,MAAM,OAAO,CAAC;CAC5B,CAAC;AACF;AACA,SAAS,MAAM,WAAW,QAAQ,YAAY,CAAC,GAAG,cAAc,sBAAsB;CACrF,MAAM,UAAU;EACf,OAAO;EACP;EACA;CACD;CACA,MAAM,eAAe,CAAC;CACtB,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,GAAG,aAAa,QAAQ;EACxE,UAAU,MAAM,YAAY;EAC5B,MAAM;GACL,MAAM;GACN,SAAS,MAAM,WAAW;EAC3B;EACA,MAAM;CACP;CACA,OAAO;EACN;EACA,QAAQ;EACR;CACD;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factories-CfHDga-q.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/factories.d.mts"],"mappings":";;;;;;;;KAOK;WACM;WACA;;WAEA;WACA;;iBAEM,IAAI,kBAAkB,iBAAiB,oBAAoB,OAAO,4BAA4B;iBAC9F,MAAM,6BAA6B;iBACnC,UAAU,6BAA6B;iBACvC,MAAM,cAAc,4BAA4B;WACtD;WACA;WACA;WACA,UAAU;IACjB;iBACa,GAAG,sBAAsB,+BAA+B,yBAAyB,kCAAkC,OAAO;EACzI;IACE;iBACa,MAAM,SAAS,eAAe,gBAAgB,qBAAqB;EAClF,KAAK;EACL,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;IACb;iBACa,MAAM,mBAAmB,QAAQ,eAAe,uBAAuB,YAAY,yBAAyB;EAC3H,SAAS;EACT,QAAQ;aACG;aACA,MAAM;aACN;;EAEX,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"foreign-key-materialization-BPQqd0qF.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-materialization.mjs"],"sourcesContent":["import { t as contractError } from \"./contract-errors-BCN6RVI5.mjs\";\nimport { a as rendersIndexBody, t as accessMethodOf } from \"./index-types-pC_5vADQ.mjs\";\nimport { r as lowerAuthoredIndex } from \"./index-naming-BOcJT1B3.mjs\";\nimport { i as leadingBackingObjectName, n as identicalIndexes, o as servingKey, r as indexNodeOf, s as startsWithColumns, t as derivedBackingIndexIsRedundant } from \"./index-equivalence-DswCiq5l.mjs\";\nimport { defaultIndexName, nameOf, truncateToWireNamePrefixBytes } from \"@internal/sql-schema-ir/naming\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { asNamespaceId } from \"@internal/contract/types\";\n//#region src/index-deduplication.ts\nconst IDENTICAL_DESCRIPTION = \"the planner sees them as the same index. The contract keeps both because each is named.\";\nconst REDUNDANT_DESCRIPTION = \"which already serves the same lookups.\";\n/**\n* Removes the indexes of one table that duplicate another. Two indexes are identical when the planner sees them as the same index apart from their names (see {@link identicalIndexes}); of an identical group the pass keeps the indexes named by the user, or the first one when none is. A plain non-unique index whose columns are those of the primary key, a unique constraint or a unique index without a predicate is redundant (see {@link servingKey}), and the pass removes it unless it is named by the user. Every index named by the user survives; the pass warns about each one that duplicates another, and refuses two identical indexes both named with `name:`, whose wire names the planner could not tell apart.\n*/\nfunction deduplicateIndexes(input) {\n\tconst { tableName, warnings } = input;\n\tconst replacements = /* @__PURE__ */ new Map();\n\tconst nodes = new Map(input.indexes.map((candidate) => [candidate, indexNodeOf(candidate.index)]));\n\tconst nodeOf = (candidate) => {\n\t\tconst node = nodes.get(candidate);\n\t\tif (node === void 0) throw new InternalError(\"every candidate has a node\");\n\t\treturn node;\n\t};\n\tconst groups = [];\n\tfor (const candidate of input.indexes) {\n\t\tconst position = groups.findIndex(([first]) => identicalIndexes(nodeOf(first), nodeOf(candidate)));\n\t\tconst group = groups[position];\n\t\tif (group === void 0) groups.push([candidate]);\n\t\telse groups[position] = [...group, candidate];\n\t}\n\tfor (const group of groups) {\n\t\tconst named = group.filter((candidate) => candidate.namedByUser);\n\t\tconst wireNamed = named.filter((candidate) => candidate.index.naming.kind === \"wire\");\n\t\tif (wireNamed.length > 1) throw identicalWireNamedIndexesError(tableName, wireNamed);\n\t\tconst kept = named[0] ?? group[0];\n\t\tfor (const candidate of group) if (candidate !== kept && !candidate.namedByUser) replacements.set(candidate, {\n\t\t\tkind: \"index\",\n\t\t\tindex: kept\n\t\t});\n\t\tif (named.length > 1) warnings.push(identicalIndexesWarning(tableName, named));\n\t}\n\tconst survivors = input.indexes.filter((candidate) => !replacements.has(candidate));\n\tfor (const candidate of survivors) {\n\t\tconst servedBy = servingKey(nodeOf(candidate), {\n\t\t\tindexes: survivors,\n\t\t\tnodeOf,\n\t\t\tuniques: input.uniques,\n\t\t\tprimaryKey: input.primaryKey\n\t\t});\n\t\tif (servedBy === void 0) continue;\n\t\tif (candidate.namedByUser) warnings.push(redundantIndexWarning(tableName, candidate, servedBy));\n\t\telse replacements.set(candidate, servedBy);\n\t}\n\treturn {\n\t\tindexes: input.indexes.filter((candidate) => !replacements.has(candidate)),\n\t\treplacements\n\t};\n}\nfunction identicalWireNamedIndexesError(tableName, wireNamed) {\n\treturn contractError(\"CONTRACT.ARGUMENT_INVALID\", `Indexes ${quotedList(wireNamed.map((candidate) => writtenName(candidate.index)))} on table \"${tableName}\" are identical and both named with name:; the planner pairs wire-named indexes by their content, so it could not tell them apart.`, {\n\t\tfix: \"Remove one of them, or name one with map: to keep both under exact names.\",\n\t\tmeta: {\n\t\t\ttableName,\n\t\t\tindexes: wireNamed.map((candidate) => writtenName(candidate.index))\n\t\t}\n\t});\n}\n/** The name the source wrote: the prefix of a wire-named index, the whole name of an exact one. */\nfunction writtenName(index) {\n\treturn index.naming.kind === \"wire\" ? index.naming.prefix : index.naming.name;\n}\nfunction quotedList(names) {\n\tconst quoted = names.map((name) => `\"${name}\"`);\n\treturn quoted.length <= 2 ? quoted.join(\" and \") : `${quoted.slice(0, -1).join(\", \")} and ${quoted.at(-1)}`;\n}\nfunction identicalIndexesWarning(tableName, named) {\n\tconst names = quotedList(named.map((candidate) => writtenName(candidate.index)));\n\treturn {\n\t\tcode: \"PN_INDEX_DUPLICATE\",\n\t\tmessage: `Indexes ${names} on table \"${tableName}\" are identical: ${IDENTICAL_DESCRIPTION} Remove one of them.`,\n\t\titem: `table \"${tableName}\": indexes ${names}`,\n\t\tsummary: `tables have named indexes that are identical: ${IDENTICAL_DESCRIPTION} Remove one of each.`\n\t};\n}\nfunction describeReplacement(replacement) {\n\tswitch (replacement.kind) {\n\t\tcase \"primaryKey\": return \"the primary key\";\n\t\tcase \"uniqueConstraint\": return replacement.unique.name === void 0 ? `the unique constraint on (${replacement.unique.columns.join(\", \")})` : `the unique constraint \"${replacement.unique.name}\"`;\n\t\tcase \"index\": return `the unique index \"${writtenName(replacement.index.index)}\"`;\n\t}\n}\nfunction redundantIndexWarning(tableName, candidate, servedBy) {\n\tconst name = writtenName(candidate.index);\n\treturn {\n\t\tcode: \"PN_INDEX_REDUNDANT\",\n\t\tmessage: `Index \"${name}\" on table \"${tableName}\" has the same columns as ${describeReplacement(servedBy)}, ${REDUNDANT_DESCRIPTION} The contract keeps the index because it is named. Remove it.`,\n\t\titem: `table \"${tableName}\": index \"${name}\"`,\n\t\tsummary: `tables have a named index with the same columns as a unique constraint, unique index or primary key, ${REDUNDANT_DESCRIPTION} The contract keeps each index because it is named. Remove them.`\n\t};\n}\n//#endregion\n//#region src/foreign-key-materialization.ts\n/** The `meta.reason` of the refusal of a relation's `index: \"<name>\"`, which a source can report at the relation. */\nconst FOREIGN_KEY_INDEX_UNRESOLVED = \"foreign-key-index-unresolved\";\n/**\n* Lowers a table's authored foreign keys and indexes into the entities `contract.json` persists. A `constraint: false` foreign key contributes no `foreignKeys[]` entry. A foreign key with `index: true` gets a derived backing index; one with `index: \"<name>\"` uses what the table declares under that name. The table's indexes then pass through {@link deduplicateIndexes}, and each foreign key states what backs it in the result: an index by name, or the primary key or a unique constraint by kind.\n*/\nfunction materializeForeignKeysAndIndexes(input) {\n\tconst { tableName, declaredIndexes, uniques, primaryKey, indexTypes } = input;\n\tconst derivedIndexes = [];\n\tconst intents = input.foreignKeys.map((foreignKey) => {\n\t\tconst { constraint, index, ...reference } = foreignKey;\n\t\tif (index !== true) return {\n\t\t\tconstraint,\n\t\t\treference,\n\t\t\tindex\n\t\t};\n\t\tconst derived = derivedBackingIndex(tableName, reference.source.columns);\n\t\tderivedIndexes.push(derived);\n\t\treturn {\n\t\t\tconstraint,\n\t\t\treference,\n\t\t\tindex: derived\n\t\t};\n\t});\n\tconst deduplicated = deduplicateIndexes({\n\t\ttableName,\n\t\tindexes: [...declaredIndexes, ...derivedIndexes],\n\t\tuniques,\n\t\tprimaryKey,\n\t\twarnings: input.warnings\n\t});\n\tconst resolve = (backing) => foreignKeyIndexOf(resolveReplacement(backing, deduplicated.replacements));\n\treturn {\n\t\tforeignKeys: intents.flatMap(({ constraint, reference, index }) => {\n\t\t\tconst backing = index === false ? void 0 : typeof index === \"string\" ? namedBackingObject(reference.source, index, {\n\t\t\t\tdeclaredIndexes,\n\t\t\t\tuniques,\n\t\t\t\tprimaryKey,\n\t\t\t\tindexTypes,\n\t\t\t\tresolve\n\t\t\t}) : resolve({\n\t\t\t\tkind: \"index\",\n\t\t\t\tindex\n\t\t\t});\n\t\t\tif (!constraint) return [];\n\t\t\treturn [backing === void 0 ? reference : {\n\t\t\t\t...reference,\n\t\t\t\tindex: backing\n\t\t\t}];\n\t\t}),\n\t\tindexes: deduplicated.indexes.map((candidate) => candidate.index)\n\t};\n}\n/**\n* Whether a table's declared indexes, unique constraints or primary key already serve a foreign key on `columns`, so the build would drop a derived backing index again. A source that writes no backing index of its own, such as a Prisma 7 schema, leaves the foreign key's `index` to the build where this holds, so the stored foreign key states what backs it.\n*/\nfunction declaredIndexesServeForeignKey(columns, table) {\n\treturn derivedBackingIndexIsRedundant(columns, {\n\t\tindexes: table.indexes,\n\t\tnodeOf: indexNodeOf,\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey\n\t});\n}\n/**\n* The name to give a relation's `index` argument when the table's declared indexes and keys serve a foreign key on `columns` although the build would keep a derived backing index beside them (see {@link leadingBackingObjectName}).\n*/\nfunction declaredBackingObjectName(columns, table) {\n\treturn leadingBackingObjectName(columns, {\n\t\tindexes: table.indexes,\n\t\tnodeOf: indexNodeOf,\n\t\tnameOf: (index) => nameOf(index.naming),\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey\n\t});\n}\n/**\n* What a foreign key on `columns` states it is backed by when its relation says nothing, beside a table whose indexes all carry the `name` or `map` the source gave them, as a printed contract's do. A printer writes a relation's `index` argument only where the stored foreign key differs from this.\n*/\nfunction defaultForeignKeyIndex(tableName, columns, table) {\n\tconst reference = {\n\t\tnamespaceId: asNamespaceId(UNBOUND_NAMESPACE_ID),\n\t\ttableName,\n\t\tcolumns\n\t};\n\tconst [foreignKey] = materializeForeignKeysAndIndexes({\n\t\ttableName,\n\t\tforeignKeys: [{\n\t\t\tsource: reference,\n\t\t\ttarget: reference,\n\t\t\tconstraint: true,\n\t\t\tindex: true\n\t\t}],\n\t\tdeclaredIndexes: table.indexes.map((index) => ({\n\t\t\tindex,\n\t\t\tnamedByUser: true\n\t\t})),\n\t\tuniques: table.uniques,\n\t\tprimaryKey: table.primaryKey,\n\t\twarnings: [],\n\t\tindexTypes: void 0\n\t}).foreignKeys;\n\treturn typeof foreignKey?.index === \"object\" ? foreignKey.index : void 0;\n}\nfunction derivedBackingIndex(tableName, columns) {\n\treturn {\n\t\tindex: lowerAuthoredIndex(tableName, {\n\t\t\tcolumns,\n\t\t\twhere: void 0,\n\t\t\tunique: void 0,\n\t\t\tmap: void 0,\n\t\t\tname: truncateToWireNamePrefixBytes(defaultIndexName(tableName, columns)),\n\t\t\ttype: void 0,\n\t\t\toptions: void 0\n\t\t}),\n\t\tnamedByUser: false\n\t};\n}\n/**\n* What a relation's `index: \"<name>\"` points at. The name is the `name` or `map` the source gave an index, unique constraint or primary key, or an index's stored name; an unnamed index's default name does not count. Identical indexes count as one, so the name is resolved after they merge. The object must start with the foreign key's columns, in order, or it would not serve the foreign key's lookups. An index of a type whose body is rendered from its options (see {@link rendersIndexBody}) is refused too: its columns are not its key.\n*/\nfunction namedBackingObject(source, name, table) {\n\tconst { namespaceId, tableName, columns } = source;\n\tconst subject = `The foreign key on table \"${tableName}\" columns (${columns.join(\", \")}) names \"${name}\" as its index`;\n\tconst meta = {\n\t\treason: FOREIGN_KEY_INDEX_UNRESOLVED,\n\t\tnamespaceId,\n\t\ttableName,\n\t\tcolumns,\n\t\tindex: name\n\t};\n\tconst indexes = table.declaredIndexes.filter((candidate) => candidate.namedByUser && writtenName(candidate.index) === name || nameOf(candidate.index.naming) === name);\n\tconst keys = [...table.uniques.filter((unique) => unique.name === name), ...table.primaryKey?.name === name ? [table.primaryKey] : []];\n\tconst resolvedIndexes = [...new Map(indexes.map((index) => {\n\t\tconst resolved = table.resolve({\n\t\t\tkind: \"index\",\n\t\t\tindex\n\t\t});\n\t\treturn [JSON.stringify(resolved), {\n\t\t\tindex,\n\t\t\tresolved\n\t\t}];\n\t})).values()];\n\tconst matches = resolvedIndexes.length + keys.length;\n\tif (matches === 0) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but table \"${tableName}\" has no index, unique constraint or primary key with that name.`, {\n\t\tfix: `Declare an index, unique constraint or primary key named \"${name}\" on table \"${tableName}\", or drop the index argument so the foreign key gets its own backing index.`,\n\t\tmeta\n\t});\n\tif (matches > 1) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but table \"${tableName}\" has more than one index, unique constraint or primary key with that name.`, {\n\t\tfix: `Give the object the foreign key should use a name no other index, unique constraint or primary key of table \"${tableName}\" has, and name that on the relation.`,\n\t\tmeta\n\t});\n\tconst [match] = resolvedIndexes;\n\tconst key = keys[0];\n\tconst matchType = match?.index.index.type;\n\tconst typeEntry = matchType === void 0 ? void 0 : table.indexTypes?.get(matchType);\n\tif (typeEntry !== void 0 && rendersIndexBody(typeEntry)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but it is a \"${typeEntry.type}\" index, a \"${accessMethodOf(typeEntry)}\" index whose key is rendered from its options rather than its columns, so it does not serve the foreign key's lookups.`, {\n\t\tfix: `Name an index, unique constraint or primary key whose first columns are (${columns.join(\", \")}), or drop the index argument so the foreign key gets its own backing index beside the \"${typeEntry.type}\" index.`,\n\t\tmeta\n\t});\n\tconst objectColumns = match !== void 0 ? match.index.index.columns : key?.columns;\n\tif (objectColumns === void 0 || !startsWithColumns(objectColumns, columns)) throw contractError(\"CONTRACT.ARGUMENT_INVALID\", `${subject}, but ${objectColumns === void 0 ? \"it indexes an expression, not the foreign key's columns\" : `its columns (${objectColumns.join(\", \")}) do not start with the foreign key's columns`}, so it does not serve the foreign key's lookups.`, {\n\t\tfix: `Name an index, unique constraint or primary key whose first columns are (${columns.join(\", \")}), or drop the index argument so the foreign key gets its own backing index.`,\n\t\tmeta\n\t});\n\tif (match !== void 0) return match.resolved;\n\treturn key === table.primaryKey ? { primaryKey: true } : { unique: objectColumns };\n}\nfunction resolveReplacement(backing, replacements) {\n\tlet current = backing;\n\twhile (current.kind === \"index\") {\n\t\tconst replacement = replacements.get(current.index);\n\t\tif (replacement === void 0) break;\n\t\tcurrent = replacement;\n\t}\n\treturn current;\n}\nfunction foreignKeyIndexOf(backing) {\n\tswitch (backing.kind) {\n\t\tcase \"index\": return { name: nameOf(backing.index.index.naming) };\n\t\tcase \"uniqueConstraint\": return { unique: backing.unique.columns };\n\t\tcase \"primaryKey\": return { primaryKey: true };\n\t}\n}\n//#endregion\nexport { FOREIGN_KEY_INDEX_UNRESOLVED, declaredBackingObjectName, declaredIndexesServeForeignKey, defaultForeignKeyIndex, derivedBackingIndexIsRedundant, leadingBackingObjectName, materializeForeignKeysAndIndexes };\n\n//# sourceMappingURL=foreign-key-materialization.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;;;;AAI9B,SAAS,mBAAmB,OAAO;CAClC,MAAM,EAAE,WAAW,aAAa;CAChC,MAAM,+BAA+B,IAAI,IAAI;CAC7C,MAAM,QAAQ,IAAI,IAAI,MAAM,QAAQ,KAAK,cAAc,CAAC,WAAW,YAAY,UAAU,KAAK,CAAC,CAAC,CAAC;CACjG,MAAM,UAAU,cAAc;EAC7B,MAAM,OAAO,MAAM,IAAI,SAAS;EAChC,IAAI,SAAS,KAAK,GAAG,MAAM,IAAI,cAAc,4BAA4B;EACzE,OAAO;CACR;CACA,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,aAAa,MAAM,SAAS;EACtC,MAAM,WAAW,OAAO,WAAW,CAAC,WAAW,iBAAiB,OAAO,KAAK,GAAG,OAAO,SAAS,CAAC,CAAC;EACjG,MAAM,QAAQ,OAAO;EACrB,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK,CAAC,SAAS,CAAC;OACxC,OAAO,YAAY,CAAC,GAAG,OAAO,SAAS;CAC7C;CACA,KAAK,MAAM,SAAS,QAAQ;EAC3B,MAAM,QAAQ,MAAM,QAAQ,cAAc,UAAU,WAAW;EAC/D,MAAM,YAAY,MAAM,QA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Q,QAAQ,MAAhB;EACC,KAAK,SAAS,OAAO,EAAE,MAAM,OAAO,QAAQ,MAAM,MAAM,MAAM,EAAE;EAChE,KAAK,oBAAoB,OAAO,EAAE,QAAQ,QAAQ,OAAO,QAAQ;EACjE,KAAK,cAAc,OAAO,EAAE,YAAY,KAAK;CAC9C;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"foreign-key-materialization-CgW18KP-.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-materialization.d.mts"],"mappings":";;;;;;;;;KAOK;WACM;;UAED,WAAW,QAAQ,gBAAgB,OAAO,oBAAoB;WAC7D,kBAAkB;WAClB,SAAS,OAAO,WAAW;WAC3B,kBAAkB;WAClB,YAAY;;;;;iBAKN,+BAA+B,QAAQ,gBAAgB,OAAO,oBAAoB,OAAO,4BAA4B,OAAO,WAAW,QAAQ,SAAS;KACpK,WAAW;WACL;;;;;iBAKM,yBAAyB,QAAQ,gBAAgB,UAAU,oBAAoB,UAAU,4BAA4B,OAAO,WAAW,QAAQ,SAAS;WAC9J,SAAS,OAAO;;;;;UAKjB;WACC,OAAO;;WAEP;;;;;cAKG;;;;UAIJ;WACC,QAAQ;WACR,QAAQ;WACR;WACA,WAAW;WACX,WAAW;WACX;WACA;;UAED;WACC,sBAAsB;WACtB,kBAAkB;;;;;iBAKZ,iCAAiC;WACvC;WACA,sBAAsB;WACtB,0BAA0B;WAC1B,kBAAkB;WAClB,YAAY;WACZ,UAAU;WACV,YAAY,KAAK;IACxB;;;;iBAIa,+BAA+B,4BAA4B;WACjE,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;;;;;iBAKN,0BAA0B,4BAA4B;WAC5D,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;;;;;iBAKN,uBAAuB,mBAAmB,4BAA4B;WAC5E,kBAAkB;WAClB,kBAAkB;WAClB,YAAY;IACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"foreign-key-qkDFfG8t-Fyrzd0VI.d.mts","names":[],"sources":["../../../../2-sql/1-core/contract/dist/foreign-key-qkDFfG8t.d.mts"],"mappings":";;;;;;;;;;;;;;;UAcU;WACC;WACA;WACA;WACA;;;;;;;;;;;;;;;;;;cAkBG,4BAA4B;WAC/B,aAAa;WACb;WACA;WACA;EACT,YAAY,OAAO;SACZ,KAAK,OAAO,sBAAsB,2BAA2B;;;;KAIjE;;;;KAIA;WACM;;WAEA;;WAEA;;UAED;WACC,QAAQ,sBAAsB;WAC9B,QAAQ,sBAAsB;WAC9B;WACA,WAAW;WACX,WAAW;;;;WAIX,QAAQ;;;;;;;;;;;;;;;;;;;;;;;cAuBL,mBAAmB;WACtB,QAAQ;WACR,QAAQ;WACR;WACA,WAAW;WACX,WAAW;WACX,QAAQ;EACjB,YAAY,OAAO;SACZ,KAAK,OAAO,aAAa,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions-0YWByawj.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/functions.mjs"],"sourcesContent":["import { C as LiteralExpr, E as NullCheckExpr, I as SubqueryExpr, O as OrExpr, S as ListExpression, n as AndExpr, p as ExistsExpr, r as BinaryExpr } from \"../types-NTQsD2MS.mjs\";\nimport { a as isExpression, i as createRawSql, r as codecOf, s as toExpr, t as ExpressionImpl } from \"../expression-impl-B-XNINxr.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/functions.ts\nconst BOOL_FIELD = {\n\tcodecId: \"pg/bool@1\",\n\tnullable: false\n};\n/**\n* Resolve a binary-comparison operand into an AST expression, threading the column-bound side's {@link CodecRef} to the raw-value side.\n*\n* For `fns.eq(f.email, 'alice@example.com')`, `f.email` is the column-bound expression carrying a `ColumnRef` AST and a `CodecRef` derived from contract storage; the raw string operand has no codec context. By deriving the codec context from the column-bound side and forwarding it via `toExpr(value, codec)`, the resulting `ParamRef` carries the `CodecRef` that encode-side dispatch needs to materialise the per-instance codec for parameterized codec ids (`vector(1024)` vs. `vector(1536)`).\n*/\nfunction resolveOperand(operand, otherCodec) {\n\tif (isExpression(operand)) return operand.buildAst();\n\treturn toExpr(operand, otherCodec);\n}\n/**\n* Resolves an Expression via `buildAst()`, or wraps a raw value as a `LiteralExpr` — an SQL literal inlined into the query text, not a bound parameter.\n*\n* Used for `and` / `or` operands. The usual operand is an `Expression<bool>` (e.g. the result of `fns.eq`), which this function passes through by calling `buildAst()`. The only time the raw-value branch fires is when the caller writes `fns.and(true, x)` or similar — inlining `TRUE`/`FALSE` literals lets the SQL planner statically simplify `TRUE AND x` to `x`, which it cannot do for an opaque `ParamRef`.\n*/\nfunction toLiteralExpr(value) {\n\tif (isExpression(value)) return value.buildAst();\n\treturn new LiteralExpr(value);\n}\nfunction boolExpr(astNode) {\n\treturn new ExpressionImpl(astNode, BOOL_FIELD);\n}\nfunction binaryWithSharedCodec(a, b, build) {\n\tconst aCodec = codecOf(a);\n\treturn build(resolveOperand(a, codecOf(b)), resolveOperand(b, aCodec));\n}\nfunction eq(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"eq\", l, r)));\n}\nfunction ne(a, b) {\n\tif (b === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(a)));\n\tif (a === null) return boolExpr(NullCheckExpr.isNotNull(toExpr(b)));\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(\"neq\", l, r)));\n}\nfunction comparison(a, b, op) {\n\treturn boolExpr(binaryWithSharedCodec(a, b, (l, r) => new BinaryExpr(op, l, r)));\n}\nfunction inOrNotIn(expr, valuesOrSubquery, op) {\n\tconst left = expr.buildAst();\n\tconst leftCodec = codecOf(expr);\n\tconst binaryFn = op === \"in\" ? BinaryExpr.in : BinaryExpr.notIn;\n\tif (Array.isArray(valuesOrSubquery)) {\n\t\tconst refs = valuesOrSubquery.map((v) => resolveOperand(v, leftCodec));\n\t\treturn boolExpr(binaryFn(left, ListExpression.of(refs)));\n\t}\n\treturn boolExpr(binaryFn(left, SubqueryExpr.of(valuesOrSubquery.buildAst())));\n}\nfunction createBuiltinFunctions(rawCodecInferer) {\n\treturn {\n\t\teq: (a, b) => eq(a, b),\n\t\tne: (a, b) => ne(a, b),\n\t\tgt: (a, b) => comparison(a, b, \"gt\"),\n\t\tgte: (a, b) => comparison(a, b, \"gte\"),\n\t\tlt: (a, b) => comparison(a, b, \"lt\"),\n\t\tlte: (a, b) => comparison(a, b, \"lte\"),\n\t\tand: (...exprs) => boolExpr(AndExpr.of(exprs.map(toLiteralExpr))),\n\t\tor: (...exprs) => boolExpr(OrExpr.of(exprs.map(toLiteralExpr))),\n\t\texists: (subquery) => boolExpr(ExistsExpr.exists(subquery.buildAst())),\n\t\tnotExists: (subquery) => boolExpr(ExistsExpr.notExists(subquery.buildAst())),\n\t\tin: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"in\"),\n\t\tnotIn: (expr, valuesOrSubquery) => inOrNotIn(expr, valuesOrSubquery, \"notIn\"),\n\t\traw: createRawSql(rawCodecInferer)\n\t};\n}\n/**\n* The function surface for a contract: the built-in functions, and each registered query operation's implementation under its name.\n*/\nfunction createFunctions(operations, rawCodecInferer) {\n\tconst builtins = createBuiltinFunctions(rawCodecInferer);\n\treturn new Proxy(blindCast({}), { get(_target, prop) {\n\t\tif (Object.hasOwn(builtins, prop)) return blindCast(builtins)[prop];\n\t\tconst op = operations[prop];\n\t\tif (op) return op.impl;\n\t} });\n}\n//#endregion\nexport { createFunctions };\n\n//# sourceMappingURL=functions.mjs.map"],"mappings":";;;;AAIA,MAAM,aAAa;CAClB,SAAS;CACT,UAAU;AACX;;;;;;AAMA,SAAS,eAAe,SAAS,YAAY;CAC5C,IAAI,aAAa,OAAO,GAAG,OAAO,QAAQ,SAAS;CACnD,OAAO,O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ACT;QACE,QAAQ,MAAM,gBAAgB,kBAAkB,OAAO,WAAW;;EAExE;KACG,wBAAwB,MAAM;MAC7B,SAAS;MACT;QACE,UAAU,SAAS;MACrB,SAAS;MACT;UACI,WAAW;KAChB,wBAAwB,MAAM;MAC7B,SAAS;MACT;QACE,QAAQ,MAAM,gBAAgB,kBAAkB,OAAO,WAAW;;WAE/D,KAAK;;;KAGX,UAAU,WAAW,oBAAoB,iBAAiB,oBAAoB,mBAAmB;;;;iBAIrF,gBAAgB,WAAW,kBAAkB,YAAY,SAAS,eAAe,qBAAqB,iBAAiB,kBAAkB,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator-functions-D_qdqBV--BoeJwWsz.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/generator-functions-D_qdqBV-.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { SQL_CHAR_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: enumMemberValue(),\n\t\t\tdocumentation: \"The member's value, written as a value of the enum's data type; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypes.lookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: NANOID_SIZE.min,\n\t\tmaximum: NANOID_SIZE.max\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { Raw: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(sql`tsvector`). Its values are typed unknown, and its default is a sql expression.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: \"sql/expression\",\n\t\tname: \"sql\"\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/raw@1\",\n\t\ttypeParams: { sql: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} };\n/**\n* The type constructors every SQL target contributes itself, because their arguments are sizes, such as a length, and only the target names the data type a size is a value of: `sizeType`, such as `pg/int4`.\n*/\nfunction sqlTargetTypeConstructors(input) {\n\treturn { sql: { String: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t} } };\n}\n//#endregion\n//#region src/core/generator-functions.ts\nconst NANOID_DEFAULT_SIZE = 21;\nconst nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst ksuidSignature = { documentation: \"Generates a KSUID when a value is not supplied.\" };\nfunction refused(message) {\n\treturn {\n\t\tok: false,\n\t\tmessage\n\t};\n}\nfunction generated(id, params) {\n\treturn {\n\t\tok: true,\n\t\tgenerator: params === void 0 ? {\n\t\t\tkind: \"generator\",\n\t\t\tid\n\t\t} : {\n\t\t\tkind: \"generator\",\n\t\t\tid,\n\t\t\tparams\n\t\t}\n\t};\n}\nfunction uuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"uuidv4\", \"uuidv7\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\tif (version === void 0 || version === UUID_VERSIONS.v4) return generated(\"uuidv4\");\n\t\t\tif (version === UUID_VERSIONS.v7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id === \"uuidv4\") return {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tif (generator.id === \"uuidv7\") return {\n\t\t\t\targs: { version: UUID_VERSIONS.v7 },\n\t\t\t\ttext: String(UUID_VERSIONS.v7)\n\t\t\t};\n\t\t}\n\t};\n}\nfunction cuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"cuid2\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\treturn version === CUID_VERSION ? generated(\"cuid2\") : refused(`cuid: version must be ${CUID_VERSION}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: CUID_VERSION },\n\t\t\ttext: String(CUID_VERSION)\n\t\t} : void 0\n\t};\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_SIZE.min && size <= NANOID_SIZE.max;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.\n*/\nfunction nanoidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"nanoid\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${String(explicit)}`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size: explicit });\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id !== \"nanoid\") return void 0;\n\t\t\tconst size = generator.params?.[\"size\"];\n\t\t\treturn typeof size === \"number\" ? {\n\t\t\t\targs: { size },\n\t\t\t\ttext: String(size)\n\t\t\t} : {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* `binding`, refusing a column whose length, in its data type's normal form, is shorter than the identifier the generator writes. The database would refuse every insert of a longer value.\n*/\nfunction fittingColumn(name, binding) {\n\treturn {\n\t\t...binding,\n\t\tresolve: (input) => {\n\t\t\tconst resolution = binding.resolve(input);\n\t\t\tconst length = input.field.length;\n\t\t\tif (!resolution.ok || length === void 0) return resolution;\n\t\t\tconst { generator } = resolution;\n\t\t\tconst written = generatedLength(blindCast(generator.id), generator.params);\n\t\t\tif (written <= length) return resolution;\n\t\t\treturn refused(`${`${name}(${binding.printArguments(generator, input.field)?.text ?? \"\"})`} writes ${written} characters, which does not fit a column of ${length} ${length === 1 ? \"character\" : \"characters\"}.`);\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. Each refuses a column too short for what it writes. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [fittingColumn(\"uuid\", uuidBinding([...text, ...codecs.uuid ?? []]))]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [fittingColumn(\"cuid\", cuidBinding(text))]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [fittingColumn(\"ulid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ulid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"ksuid\",\n\t\t\tbindings: [fittingColumn(\"ksuid\", singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ksuid\"\n\t\t\t}))]\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tbindings: [fittingColumn(\"nanoid\", nanoidBinding(text))]\n\t\t}\n\t];\n}\nconst familyIdBindings = idGeneratorFunctionBindings({ text: [\n\tSQL_CHAR_CODEC_ID,\n\tSQL_VARCHAR_CODEC_ID,\n\tSQL_TEXT_CODEC_ID\n] });\nfunction familyBindingsOf(name) {\n\treturn familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];\n}\n/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */\nconst sqlFamilyGeneratorFunctions = [\n\t{\n\t\tname: \"now\",\n\t\tsignature: nowSignature,\n\t\tbindings: []\n\t},\n\t{\n\t\tname: \"uuid\",\n\t\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\n\t\tbindings: familyBindingsOf(\"cuid\")\n\t},\n\t{\n\t\tname: \"ulid\",\n\t\tsignature: ulidSignature,\n\t\tbindings: familyBindingsOf(\"ulid\")\n\t},\n\t{\n\t\tname: \"nanoid\",\n\t\tbindings: familyBindingsOf(\"nanoid\")\n\t},\n\t{\n\t\tname: \"ksuid\",\n\t\tsignature: ksuidSignature,\n\t\tbindings: familyBindingsOf(\"ksuid\")\n\t}\n];\n/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */\nconst sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));\n/**\n* The generator functions whose arguments are integers, declared with their signatures: `uuid(version?)`, `cuid(version)` and `nanoid(size?)`. Each argument is a value of `integer`, the target's integer data type, read and cast like a default, then checked by its function. A target declares them, because only it knows its integer type; the family and the target bind them.\n*/\nfunction sqlIntegerArgumentGeneratorFunctions({ integer }) {\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tsignature: (dataTypes) => uuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tsignature: (dataTypes) => cuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tsignature: (dataTypes) => nanoidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t}\n\t];\n}\nfunction uuidSignature(integer, dataTypes) {\n\tconst versions = [UUID_VERSIONS.v4, UUID_VERSIONS.v7];\n\treturn {\n\t\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, listed(versions), (version, written) => versions.some((allowed) => allowed === version) ? void 0 : `uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${written}`)),\n\t\t\tdocumentation: `The UUID version: \\`${UUID_VERSIONS.v4}\\` or \\`${UUID_VERSIONS.v7}\\`. Defaults to \\`${UUID_VERSIONS.v4}\\`.`\n\t\t}]\n\t};\n}\nfunction cuidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: checkedInteger(integer, dataTypes, listed([CUID_VERSION]), (version, written) => version === CUID_VERSION ? void 0 : `cuid: version must be ${CUID_VERSION}, got ${written}`),\n\t\t\tdocumentation: `The CUID version. Only \\`${CUID_VERSION}\\` is supported.`\n\t\t}]\n\t};\n}\nfunction nanoidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"size\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, {\n\t\t\t\tlabel: `integer from ${NANOID_SIZE.min} to ${NANOID_SIZE.max}`,\n\t\t\t\tsuggestions: []\n\t\t\t}, (size, written) => isNanoidSize(size) ? void 0 : `nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${written}`)),\n\t\t\tdocumentation: `The identifier length, from \\`${NANOID_SIZE.min}\\` through \\`${NANOID_SIZE.max}\\`. Defaults to ${NANOID_DEFAULT_SIZE}.`\n\t\t}]\n\t};\n}\n/** The label and completion suggestions of an argument that takes one of `values`. */\nfunction listed(values) {\n\tconst suggestions = values.map(String);\n\treturn {\n\t\tlabel: suggestions.join(\" | \"),\n\t\tsuggestions\n\t};\n}\n/**\n* One value of the integer data type, as a number, refused at the argument with the function's message when `refusal` returns one.\n*/\nfunction checkedInteger(integer, dataTypes, allowed, refusal) {\n\treturn refineArg(dataTypeValue(integer, dataTypes, allowed), ({ value }, arg, ctx) => {\n\t\tconst stored = value.value;\n\t\tif (typeof stored !== \"number\" && typeof stored !== \"string\") throw new InternalError(`Data type \"${integer}\" stores an integer as ${typeof stored}, not a number or digit text.`);\n\t\tconst message = refusal(Number(stored), String(stored));\n\t\treturn message === void 0 ? ok(blindCast(Number(stored))) : notOk([leafDiagnostic(ctx, arg, message, \"PSL_INVALID_GENERATOR_ARGUMENT\")]);\n\t});\n}\n//#endregion\nexport { sqlFamilyAuthoringTypes as a, sqlFamilyEntityTypes as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyPslBlockDescriptors as l, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyAuthoringFieldPresets as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-D_qdqBV-.mjs.map"],"mappings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