@prisma/orm-family-sql 0.16.0-dev.36
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/LICENSE +201 -0
- package/README.md +28 -0
- package/dist/ast-BstHjAoG.mjs +325 -0
- package/dist/ast-BstHjAoG.mjs.map +1 -0
- package/dist/ast-DSuzmsWn.d.mts +287 -0
- package/dist/ast-DSuzmsWn.d.mts.map +1 -0
- package/dist/authoring-type-constructors-Blqoa2Ua-DyCmD6mp.mjs +316 -0
- package/dist/authoring-type-constructors-Blqoa2Ua-DyCmD6mp.mjs.map +1 -0
- package/dist/build-contract-DBCz_YSs-DO0wMHai.mjs +778 -0
- package/dist/build-contract-DBCz_YSs-DO0wMHai.mjs.map +1 -0
- package/dist/builder.d.mts +3 -0
- package/dist/builder.mjs +1 -0
- package/dist/builder__runtime.d.mts +42 -0
- package/dist/builder__runtime.d.mts.map +1 -0
- package/dist/builder__runtime.mjs +955 -0
- package/dist/builder__runtime.mjs.map +1 -0
- package/dist/builder__types.d.mts +3 -0
- package/dist/builder__types.mjs +1 -0
- package/dist/canonicalization-hooks-CYnW_sGn.d.mts +10 -0
- package/dist/canonicalization-hooks-CYnW_sGn.d.mts.map +1 -0
- package/dist/canonicalization-hooks-DfIc_lOO.mjs +87 -0
- package/dist/canonicalization-hooks-DfIc_lOO.mjs.map +1 -0
- package/dist/codec-descriptor-registry-BJVJRftS.mjs +96 -0
- package/dist/codec-descriptor-registry-BJVJRftS.mjs.map +1 -0
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts +116 -0
- package/dist/codec-types-MOaceoPi-C5eL2sao.d.mts.map +1 -0
- package/dist/config-types-47qB33rW.d.mts +21 -0
- package/dist/config-types-47qB33rW.d.mts.map +1 -0
- package/dist/config-types-N7PJc6VN.mjs +65 -0
- package/dist/config-types-N7PJc6VN.mjs.map +1 -0
- package/dist/contract-builder-MvJJrQ-5.d.mts +1306 -0
- package/dist/contract-builder-MvJJrQ-5.d.mts.map +1 -0
- package/dist/contract-builder-YjMQcvZ1.mjs +1615 -0
- package/dist/contract-builder-YjMQcvZ1.mjs.map +1 -0
- package/dist/contract-emitter.d.mts +25 -0
- package/dist/contract-emitter.d.mts.map +1 -0
- package/dist/contract-emitter.mjs +2 -0
- package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs +9 -0
- package/dist/contract-errors-BCN6RVI5-5IHBF_lg.mjs.map +1 -0
- package/dist/contract-psl.d.mts +65 -0
- package/dist/contract-psl.d.mts.map +1 -0
- package/dist/contract-psl.mjs +2 -0
- package/dist/contract-psl__provider.d.mts +23 -0
- package/dist/contract-psl__provider.d.mts.map +1 -0
- package/dist/contract-psl__provider.mjs +105 -0
- package/dist/contract-psl__provider.mjs.map +1 -0
- package/dist/contract-ts.d.mts +3 -0
- package/dist/contract-ts.mjs +4 -0
- package/dist/contract-ts__config-types.d.mts +2 -0
- package/dist/contract-ts__config-types.mjs +2 -0
- package/dist/contract-ts__contract-builder.d.mts +2 -0
- package/dist/contract-ts__contract-builder.mjs +3 -0
- package/dist/contract-view-BMR5IWk4.mjs +39 -0
- package/dist/contract-view-BMR5IWk4.mjs.map +1 -0
- package/dist/contract-view-BbWQp6r4.d.mts +61 -0
- package/dist/contract-view-BbWQp6r4.d.mts.map +1 -0
- package/dist/contract.d.mts +26 -0
- package/dist/contract.mjs +17 -0
- package/dist/contract__canonicalization-hooks.d.mts +2 -0
- package/dist/contract__canonicalization-hooks.mjs +2 -0
- package/dist/contract__contract-view.d.mts +2 -0
- package/dist/contract__contract-view.mjs +2 -0
- package/dist/contract__entity-handle-lowering-hook.d.mts +2 -0
- package/dist/contract__entity-handle-lowering-hook.mjs +2 -0
- package/dist/contract__entity-kinds.d.mts +2 -0
- package/dist/contract__entity-kinds.mjs +2 -0
- package/dist/contract__factories.d.mts +2 -0
- package/dist/contract__factories.mjs +2 -0
- package/dist/contract__foreign-key-materialization.d.mts +2 -0
- package/dist/contract__foreign-key-materialization.mjs +2 -0
- package/dist/contract__index-naming.d.mts +2 -0
- package/dist/contract__index-naming.mjs +2 -0
- package/dist/contract__index-type-validation.d.mts +2 -0
- package/dist/contract__index-type-validation.mjs +2 -0
- package/dist/contract__index-types.d.mts +3 -0
- package/dist/contract__index-types.mjs +2 -0
- package/dist/contract__pack-types.d.mts +2 -0
- package/dist/contract__pack-types.mjs +1 -0
- package/dist/contract__referential-action-sql.d.mts +2 -0
- package/dist/contract__referential-action-sql.mjs +2 -0
- package/dist/contract__resolve-storage-table.d.mts +2 -0
- package/dist/contract__resolve-storage-table.mjs +2 -0
- package/dist/contract__types.d.mts +11 -0
- package/dist/contract__types.mjs +4 -0
- package/dist/contract__validators.d.mts +2 -0
- package/dist/contract__validators.mjs +3 -0
- package/dist/contract__value-set-derivation-hook.d.mts +2 -0
- package/dist/contract__value-set-derivation-hook.mjs +2 -0
- package/dist/control-B7iS4jv4.mjs +1326 -0
- package/dist/control-B7iS4jv4.mjs.map +1 -0
- package/dist/control-BHmsZudH.d.mts +948 -0
- package/dist/control-BHmsZudH.d.mts.map +1 -0
- package/dist/control-adapter-4y1O8Ps3.d.mts +1 -0
- package/dist/control-adapter-C99J7aEF-C-17lFY8.d.mts +191 -0
- package/dist/control-adapter-C99J7aEF-C-17lFY8.d.mts.map +1 -0
- package/dist/db-DhMsmBS--DKENDi3l.d.mts +365 -0
- package/dist/db-DhMsmBS--DKENDi3l.d.mts.map +1 -0
- package/dist/ddl-types-BMp2bWVS-D1waZJ4n.mjs +153 -0
- package/dist/ddl-types-BMp2bWVS-D1waZJ4n.mjs.map +1 -0
- package/dist/ddl-types-rrMsf77U-DGctYf-T.d.mts +149 -0
- package/dist/ddl-types-rrMsf77U-DGctYf-T.d.mts.map +1 -0
- package/dist/diff-B16bL_IR.mjs +13 -0
- package/dist/diff-B16bL_IR.mjs.map +1 -0
- package/dist/diff-DhlzHOMD.d.mts +104 -0
- package/dist/diff-DhlzHOMD.d.mts.map +1 -0
- package/dist/dist-C_q1_QR9.mjs +9 -0
- package/dist/dist-C_q1_QR9.mjs.map +1 -0
- package/dist/dist-DrScXbhq.mjs +414 -0
- package/dist/dist-DrScXbhq.mjs.map +1 -0
- package/dist/dist-x6jvtkKM.mjs +68 -0
- package/dist/dist-x6jvtkKM.mjs.map +1 -0
- package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts +92 -0
- package/dist/entity-handle-lowering-hook-CIvRKBfa.d.mts.map +1 -0
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs +11 -0
- package/dist/entity-handle-lowering-hook-DwLIKNiS.mjs.map +1 -0
- package/dist/entity-kinds-DKxwKolf-CcsY-iYV.mjs +136 -0
- package/dist/entity-kinds-DKxwKolf-CcsY-iYV.mjs.map +1 -0
- package/dist/entity-kinds-Dh6VH4uK.d.mts +29 -0
- package/dist/entity-kinds-Dh6VH4uK.d.mts.map +1 -0
- package/dist/errors-B5g0xWro-mWH2C07F.mjs +9 -0
- package/dist/errors-B5g0xWro-mWH2C07F.mjs.map +1 -0
- package/dist/errors.d.mts +63 -0
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +2 -0
- package/dist/expression-DIf8F4Mc.d.mts +167 -0
- package/dist/expression-DIf8F4Mc.d.mts.map +1 -0
- package/dist/expression-RUO52bJB.mjs +109 -0
- package/dist/expression-RUO52bJB.mjs.map +1 -0
- package/dist/factories-B7tA4y9D.d.mts +39 -0
- package/dist/factories-B7tA4y9D.d.mts.map +1 -0
- package/dist/factories-CDG9zBxC.mjs +77 -0
- package/dist/factories-CDG9zBxC.mjs.map +1 -0
- package/dist/family.d.mts +13 -0
- package/dist/family.mjs +12 -0
- package/dist/family__control-adapter.d.mts +3 -0
- package/dist/family__control-adapter.mjs +1 -0
- package/dist/family__control.d.mts +4 -0
- package/dist/family__control.mjs +4 -0
- package/dist/family__diff.d.mts +3 -0
- package/dist/family__diff.mjs +3 -0
- package/dist/family__ir.d.mts +2 -0
- package/dist/family__ir.mjs +3 -0
- package/dist/family__migration.d.mts +2 -0
- package/dist/family__migration.mjs +2 -0
- package/dist/family__pack.d.mts +249 -0
- package/dist/family__pack.d.mts.map +1 -0
- package/dist/family__pack.mjs +18 -0
- package/dist/family__pack.mjs.map +1 -0
- package/dist/family__psl-infer.d.mts +2 -0
- package/dist/family__psl-infer.mjs +2 -0
- package/dist/family__runtime.d.mts +3 -0
- package/dist/family__runtime.mjs +3 -0
- package/dist/family__verify.d.mts +2 -0
- package/dist/family__verify.mjs +2 -0
- package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts +85 -0
- package/dist/foreign-key-BSy9u4O4-BnsOe5Nf.d.mts.map +1 -0
- package/dist/foreign-key-materialization-Ca-wRbmj.d.mts +65 -0
- package/dist/foreign-key-materialization-Ca-wRbmj.d.mts.map +1 -0
- package/dist/foreign-key-materialization-HI7BIQrG.mjs +72 -0
- package/dist/foreign-key-materialization-HI7BIQrG.mjs.map +1 -0
- package/dist/index-Bb9U36N4.d.mts +511 -0
- package/dist/index-Bb9U36N4.d.mts.map +1 -0
- package/dist/index-BgaTJRxj.d.mts +25 -0
- package/dist/index-BgaTJRxj.d.mts.map +1 -0
- package/dist/index-naming-BZWoh45T.d.mts +62 -0
- package/dist/index-naming-BZWoh45T.d.mts.map +1 -0
- package/dist/index-naming-BoGBcMmI-DiJAr66H.mjs +108 -0
- package/dist/index-naming-BoGBcMmI-DiJAr66H.mjs.map +1 -0
- package/dist/index-type-validation-COH4d78M.mjs +17 -0
- package/dist/index-type-validation-COH4d78M.mjs.map +1 -0
- package/dist/index-type-validation-DN0L2mqm.d.mts +10 -0
- package/dist/index-type-validation-DN0L2mqm.d.mts.map +1 -0
- package/dist/index-types-CNhHgKHi.d.mts +1 -0
- package/dist/index-types-DJQ_xwaE.mjs +40 -0
- package/dist/index-types-DJQ_xwaE.mjs.map +1 -0
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts +31 -0
- package/dist/index-types-DPVhsW0v-D-BikM4h.d.mts.map +1 -0
- package/dist/interpreter-5WgpL-ax-_nqHLUTr.mjs +3526 -0
- package/dist/interpreter-5WgpL-ax-_nqHLUTr.mjs.map +1 -0
- package/dist/ir-B3bKMnGQ.d.mts +123 -0
- package/dist/ir-B3bKMnGQ.d.mts.map +1 -0
- package/dist/ir-I-xciGUH.mjs +36 -0
- package/dist/ir-I-xciGUH.mjs.map +1 -0
- package/dist/lane-query-builder.d.mts +236 -0
- package/dist/lane-query-builder.d.mts.map +1 -0
- package/dist/lane-query-builder.mjs +67 -0
- package/dist/lane-query-builder.mjs.map +1 -0
- package/dist/middleware-B4XbF4d4-tfwBl6mX.d.mts +119 -0
- package/dist/middleware-B4XbF4d4-tfwBl6mX.d.mts.map +1 -0
- package/dist/middleware-ByRsXxxq.d.mts +1 -0
- package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs +80 -0
- package/dist/middleware-CMr4CHNz-DHIUdxlm.mjs.map +1 -0
- package/dist/migration-CK4oePIo.mjs +44 -0
- package/dist/migration-CK4oePIo.mjs.map +1 -0
- package/dist/migration-CW0ZJLxP.d.mts +44 -0
- package/dist/migration-CW0ZJLxP.d.mts.map +1 -0
- package/dist/naming-BwqqVcZy-BgTObIQw.mjs +177 -0
- package/dist/naming-BwqqVcZy-BgTObIQw.mjs.map +1 -0
- package/dist/naming-jLgdauLi-C84G_UHi.d.mts +133 -0
- package/dist/naming-jLgdauLi-C84G_UHi.d.mts.map +1 -0
- package/dist/operations.d.mts +2 -0
- package/dist/operations.mjs +2 -0
- package/dist/orm-client.d.mts +1316 -0
- package/dist/orm-client.d.mts.map +1 -0
- package/dist/orm-client.mjs +4544 -0
- package/dist/orm-client.mjs.map +1 -0
- package/dist/pack-types-BcLTpwbv.d.mts +14 -0
- package/dist/pack-types-BcLTpwbv.d.mts.map +1 -0
- package/dist/plan-BTD8xFfa-Dd_K-A1R.d.mts +45 -0
- package/dist/plan-BTD8xFfa-Dd_K-A1R.d.mts.map +1 -0
- package/dist/plan-CkpcgUaM.mjs +34 -0
- package/dist/plan-CkpcgUaM.mjs.map +1 -0
- package/dist/plan-Cm4jaoNM.d.mts +2 -0
- package/dist/psl-infer-6je61Z6J.d.mts +119 -0
- package/dist/psl-infer-6je61Z6J.d.mts.map +1 -0
- package/dist/psl-infer-DGftl-HW.mjs +362 -0
- package/dist/psl-infer-DGftl-HW.mjs.map +1 -0
- package/dist/query-lane-context-Bz8XJZ45.d.mts +1 -0
- package/dist/query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts +94 -0
- package/dist/query-lane-context-DtdVMqoz-C2Tj5QHA.d.mts.map +1 -0
- package/dist/referential-action-sql-Csd6dA8G.d.mts +12 -0
- package/dist/referential-action-sql-Csd6dA8G.d.mts.map +1 -0
- package/dist/referential-action-sql-DSqkrySN.mjs +17 -0
- package/dist/referential-action-sql-DSqkrySN.mjs.map +1 -0
- package/dist/relational-core.d.mts +13 -0
- package/dist/relational-core.mjs +8 -0
- package/dist/relational-core__ast.d.mts +5 -0
- package/dist/relational-core__ast.mjs +5 -0
- package/dist/relational-core__codec-descriptor-registry.d.mts +39 -0
- package/dist/relational-core__codec-descriptor-registry.d.mts.map +1 -0
- package/dist/relational-core__codec-descriptor-registry.mjs +2 -0
- package/dist/relational-core__contract-free.d.mts +220 -0
- package/dist/relational-core__contract-free.d.mts.map +1 -0
- package/dist/relational-core__contract-free.mjs +393 -0
- package/dist/relational-core__contract-free.mjs.map +1 -0
- package/dist/relational-core__expression.d.mts +2 -0
- package/dist/relational-core__expression.mjs +2 -0
- package/dist/relational-core__middleware.d.mts +3 -0
- package/dist/relational-core__middleware.mjs +2 -0
- package/dist/relational-core__plan.d.mts +4 -0
- package/dist/relational-core__plan.mjs +2 -0
- package/dist/relational-core__query-lane-context.d.mts +3 -0
- package/dist/relational-core__query-lane-context.mjs +1 -0
- package/dist/relational-core__types.d.mts +3 -0
- package/dist/relational-core__types.mjs +1 -0
- package/dist/resolve-storage-table-DUwyRJmP.d.mts +21 -0
- package/dist/resolve-storage-table-DUwyRJmP.d.mts.map +1 -0
- package/dist/resolve-storage-table-DZsfnzeW.mjs +46 -0
- package/dist/resolve-storage-table-DZsfnzeW.mjs.map +1 -0
- package/dist/runtime-DNewRuec.d.mts +46 -0
- package/dist/runtime-DNewRuec.d.mts.map +1 -0
- package/dist/runtime-tIHpGCcG.mjs +55 -0
- package/dist/runtime-tIHpGCcG.mjs.map +1 -0
- package/dist/runtime.d.mts +4 -0
- package/dist/runtime.mjs +1606 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/schema-differ-DpG_gnur-g5_iks8G.d.mts +47 -0
- package/dist/schema-differ-DpG_gnur-g5_iks8G.d.mts.map +1 -0
- package/dist/schema-ir.d.mts +2 -0
- package/dist/schema-ir.mjs +2 -0
- package/dist/schema-ir__naming.d.mts +2 -0
- package/dist/schema-ir__naming.mjs +2 -0
- package/dist/schema-ir__types.d.mts +3 -0
- package/dist/schema-ir__types.mjs +2 -0
- package/dist/schema-verify-vtFZbmGq-BNfTr6fU.mjs +222 -0
- package/dist/schema-verify-vtFZbmGq-BNfTr6fU.mjs.map +1 -0
- package/dist/serialized-index-B96AwqtU-DcqcB4q_.d.mts +26 -0
- package/dist/serialized-index-B96AwqtU-DcqcB4q_.d.mts.map +1 -0
- package/dist/serialized-index-Dp5_EjXD-DMsw8jf3.mjs +64 -0
- package/dist/serialized-index-Dp5_EjXD-DMsw8jf3.mjs.map +1 -0
- package/dist/sql-contract-serializer-2oBWuxTe-B9hzBBv1.mjs +171 -0
- package/dist/sql-contract-serializer-2oBWuxTe-B9hzBBv1.mjs.map +1 -0
- package/dist/sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts +32 -0
- package/dist/sql-execution-plan-CJmsCP7n-DoEpNn7r.d.mts.map +1 -0
- package/dist/sql-index-DsI8HAeK-BJsn-jvD.d.mts +72 -0
- package/dist/sql-index-DsI8HAeK-BJsn-jvD.d.mts.map +1 -0
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts +42 -0
- package/dist/sql-node-kEz6YFZo-v2F7delx.d.mts.map +1 -0
- package/dist/sql-storage-B0QwiTg6-B8DVctJm.d.mts +171 -0
- package/dist/sql-storage-B0QwiTg6-B8DVctJm.d.mts.map +1 -0
- package/dist/storage-table-BBaAmanc-BwR37LMA.d.mts +130 -0
- package/dist/storage-table-BBaAmanc-BwR37LMA.d.mts.map +1 -0
- package/dist/storage-table-_LWDmPfv-DFhU2dML.mjs +277 -0
- package/dist/storage-table-_LWDmPfv-DFhU2dML.mjs.map +1 -0
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts +41 -0
- package/dist/storage-value-set-BGlj5Uus-CvZD--GG.d.mts.map +1 -0
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs +173 -0
- package/dist/timestamp-now-generator-DRXygu32-DN9Qb1uI.mjs.map +1 -0
- package/dist/types-BchwQpmO.d.mts +16 -0
- package/dist/types-BchwQpmO.d.mts.map +1 -0
- package/dist/types-BgkZru_1-H7yfikSQ.mjs +1444 -0
- package/dist/types-BgkZru_1-H7yfikSQ.mjs.map +1 -0
- package/dist/types-CMMQS6aG.mjs +111 -0
- package/dist/types-CMMQS6aG.mjs.map +1 -0
- package/dist/types-CuDrWc5v-ISVXBmBs.d.mts +134 -0
- package/dist/types-CuDrWc5v-ISVXBmBs.d.mts.map +1 -0
- package/dist/types-CvbBw1Jo-3KQdErJY.d.mts +688 -0
- package/dist/types-CvbBw1Jo-3KQdErJY.d.mts.map +1 -0
- package/dist/types-DIBA80mc-wf5wLmON.d.mts +723 -0
- package/dist/types-DIBA80mc-wf5wLmON.d.mts.map +1 -0
- package/dist/types-DMxc5KZa.d.mts +1 -0
- package/dist/types-Dl20lxky-DC_jdA0T.d.mts +247 -0
- package/dist/types-Dl20lxky-DC_jdA0T.d.mts.map +1 -0
- package/dist/types-DmhUVq4u-BpqqjPJx.mjs +719 -0
- package/dist/types-DmhUVq4u-BpqqjPJx.mjs.map +1 -0
- package/dist/types-IqZMLrFC-DtdJNICr.d.mts +426 -0
- package/dist/types-IqZMLrFC-DtdJNICr.d.mts.map +1 -0
- package/dist/types-TvBZ2Ne9.d.mts +1 -0
- package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts +32 -0
- package/dist/unique-constraint-jQWfH7dg-zLWtFp99.d.mts.map +1 -0
- package/dist/util-DQQgv2j1-D6INZaRG.mjs +34 -0
- package/dist/util-DQQgv2j1-D6INZaRG.mjs.map +1 -0
- package/dist/validators-C4PItWnf.mjs +0 -0
- package/dist/validators-C4PItWnf.mjs.map +1 -0
- package/dist/validators-CxeHhHrf.d.mts +206 -0
- package/dist/validators-CxeHhHrf.d.mts.map +1 -0
- package/dist/value-set-derivation-hook-BhgGVtw0.d.mts +35 -0
- package/dist/value-set-derivation-hook-BhgGVtw0.d.mts.map +1 -0
- package/dist/value-set-derivation-hook-Di9JZ0X7.mjs +22 -0
- package/dist/value-set-derivation-hook-Di9JZ0X7.mjs.map +1 -0
- package/dist/verify-E6Dd2vYp-gYwnlhLm.mjs +86 -0
- package/dist/verify-E6Dd2vYp-gYwnlhLm.mjs.map +1 -0
- package/dist/verify-zDRnw0Rn.d.mts +26 -0
- package/dist/verify-zDRnw0Rn.d.mts.map +1 -0
- package/package.json +112 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2026] [Prisma Data, Inc]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @prisma/orm-family-sql
|
|
2
|
+
|
|
3
|
+
The SQL family domain of Prisma Next: the SQL contract surface, schema IR, query lanes, SQL builder, and the SQL runtime shared by every SQL target (Postgres, SQLite).
|
|
4
|
+
|
|
5
|
+
Applications receive it as an exact-pinned dependency of a SQL facade (`@prisma/orm-postgres`, `@prisma/orm-sqlite`); app developers install the facade. Extension authors and decomposed installs building against the SQL family import it directly.
|
|
6
|
+
|
|
7
|
+
## Entrypoints
|
|
8
|
+
|
|
9
|
+
| Namespace | Surface |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `/contract` | SQL contract entities, validators, index and FK modelling |
|
|
12
|
+
| `/schema-ir` | SQL schema intermediate representation |
|
|
13
|
+
| `/contract-psl`, `/contract-ts` | PSL and TypeScript contract authoring for SQL |
|
|
14
|
+
| `/contract-emitter` | SQL contract emission |
|
|
15
|
+
| `/relational-core`, `/lane-query-builder`, `/builder` | query lanes, relational AST, SQL builder |
|
|
16
|
+
| `/runtime` | SQL runtime |
|
|
17
|
+
| `/orm-client` | the fluent, type-safe ORM client over SQL model collections |
|
|
18
|
+
| `/family` | the family pack: control, migration, diff, IR, verification |
|
|
19
|
+
|
|
20
|
+
## Responsibilities
|
|
21
|
+
|
|
22
|
+
Everything SQL databases share and nothing any one of them owns: contract semantics, relational query building, the ORM client, and the family-level control/migration surface. Target-specific behavior (Postgres or SQLite DDL, drivers) lives in the `@prisma/orm-target-*` packages.
|
|
23
|
+
|
|
24
|
+
The ORM client sits here rather than in a facade because both SQL facades use it and a module may be published from only one package. Its source still lives in `packages/3-extensions/sql-orm-client/` for historical reasons; the directory does not make it a user-installed extension.
|
|
25
|
+
|
|
26
|
+
## Dependencies
|
|
27
|
+
|
|
28
|
+
`@prisma/orm-framework` and `@prisma/orm-toolchain` (exact lockstep pins) plus small third-party runtime libraries. No database drivers.
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { z as frozenCodecRef } from "./types-BgkZru_1-H7yfikSQ.mjs";
|
|
2
|
+
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
|
+
import { type } from "arktype";
|
|
4
|
+
import { CodecDescriptorImpl, CodecImpl, column, voidParamsSchema } from "@prisma/orm-framework/components/codec";
|
|
5
|
+
//#region ../../../2-sql/4-lanes/relational-core/dist/exports/ast.mjs
|
|
6
|
+
var JsonValueProjection = class {
|
|
7
|
+
value;
|
|
8
|
+
constructor(value) {
|
|
9
|
+
this.value = value;
|
|
10
|
+
}
|
|
11
|
+
fold(folder) {
|
|
12
|
+
return this.value.fold(folder);
|
|
13
|
+
}
|
|
14
|
+
collectColumnRefs() {
|
|
15
|
+
return this.value.collectColumnRefs();
|
|
16
|
+
}
|
|
17
|
+
collectParamRefs() {
|
|
18
|
+
return this.value.collectParamRefs();
|
|
19
|
+
}
|
|
20
|
+
freeze() {
|
|
21
|
+
Object.freeze(this);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {
|
|
25
|
+
kind = "codec";
|
|
26
|
+
codec;
|
|
27
|
+
constructor(value, codec) {
|
|
28
|
+
super(value);
|
|
29
|
+
this.codec = frozenCodecRef(codec);
|
|
30
|
+
this.freeze();
|
|
31
|
+
}
|
|
32
|
+
accept(visitor) {
|
|
33
|
+
return visitor.codec(this);
|
|
34
|
+
}
|
|
35
|
+
rewrite(rewriter) {
|
|
36
|
+
return new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {
|
|
40
|
+
kind = "native";
|
|
41
|
+
constructor(value) {
|
|
42
|
+
super(value);
|
|
43
|
+
this.freeze();
|
|
44
|
+
}
|
|
45
|
+
accept(visitor) {
|
|
46
|
+
return visitor.native(this);
|
|
47
|
+
}
|
|
48
|
+
rewrite(rewriter) {
|
|
49
|
+
return new NativeJsonValueProjection(this.value.rewrite(rewriter));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {
|
|
53
|
+
kind = "document";
|
|
54
|
+
constructor(value) {
|
|
55
|
+
super(value);
|
|
56
|
+
this.freeze();
|
|
57
|
+
}
|
|
58
|
+
accept(visitor) {
|
|
59
|
+
return visitor.document(this);
|
|
60
|
+
}
|
|
61
|
+
rewrite(rewriter) {
|
|
62
|
+
return new JsonDocumentProjection(this.value.rewrite(rewriter));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const SQL_CHAR_CODEC_ID = "sql/char@1";
|
|
66
|
+
const SQL_VARCHAR_CODEC_ID = "sql/varchar@1";
|
|
67
|
+
const SQL_INT_CODEC_ID = "sql/int@1";
|
|
68
|
+
const SQL_FLOAT_CODEC_ID = "sql/float@1";
|
|
69
|
+
const SQL_TEXT_CODEC_ID = "sql/text@1";
|
|
70
|
+
const SQL_TIMESTAMP_CODEC_ID = "sql/timestamp@1";
|
|
71
|
+
const sqlCharEncode = (value) => value;
|
|
72
|
+
const sqlCharDecode = (wire) => wire.trimEnd();
|
|
73
|
+
const sqlCharRenderOutputType = (typeParams) => {
|
|
74
|
+
const length = typeParams.length;
|
|
75
|
+
if (length === void 0) return void 0;
|
|
76
|
+
if (typeof length !== "number" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError("RUNTIME.TYPE_PARAMS_INVALID", `renderOutputType: expected integer "length" in typeParams for Char, got ${String(length)}`, { meta: {
|
|
77
|
+
codec: SQL_CHAR_CODEC_ID,
|
|
78
|
+
param: "length",
|
|
79
|
+
received: String(length)
|
|
80
|
+
} });
|
|
81
|
+
return `Char<${length}>`;
|
|
82
|
+
};
|
|
83
|
+
const sqlVarcharEncode = (value) => value;
|
|
84
|
+
const sqlVarcharDecode = (wire) => wire;
|
|
85
|
+
const sqlVarcharRenderOutputType = (typeParams) => {
|
|
86
|
+
const length = typeParams.length;
|
|
87
|
+
if (length === void 0) return void 0;
|
|
88
|
+
if (typeof length !== "number" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError("RUNTIME.TYPE_PARAMS_INVALID", `renderOutputType: expected integer "length" in typeParams for Varchar, got ${String(length)}`, { meta: {
|
|
89
|
+
codec: SQL_VARCHAR_CODEC_ID,
|
|
90
|
+
param: "length",
|
|
91
|
+
received: String(length)
|
|
92
|
+
} });
|
|
93
|
+
return `Varchar<${length}>`;
|
|
94
|
+
};
|
|
95
|
+
const sqlIntEncode = (value) => value;
|
|
96
|
+
const sqlIntDecode = (wire) => wire;
|
|
97
|
+
const sqlFloatEncode = (value) => value;
|
|
98
|
+
const sqlFloatDecode = (wire) => wire;
|
|
99
|
+
/**
|
|
100
|
+
* JSON has no spelling for a non-finite number, and a database that holds one
|
|
101
|
+
* emits it as a string — PostgreSQL writes `"NaN"` and `"Infinity"`. This
|
|
102
|
+
* codec's application type is `number`, so both directions reject rather than
|
|
103
|
+
* carry a value that type cannot hold.
|
|
104
|
+
*/
|
|
105
|
+
const sqlFloatEncodeJson = (value) => {
|
|
106
|
+
if (!Number.isFinite(value)) throw structuredError("RUNTIME.ENCODE_FAILED", `${SQL_FLOAT_CODEC_ID} application value must be a finite number, got ${value}`, { meta: { codec: SQL_FLOAT_CODEC_ID } });
|
|
107
|
+
return value;
|
|
108
|
+
};
|
|
109
|
+
const sqlFloatDecodeJson = (json) => {
|
|
110
|
+
if (typeof json !== "number" || !Number.isFinite(json)) throw structuredError("RUNTIME.DECODE_FAILED", `Expected a finite number for ${SQL_FLOAT_CODEC_ID}, got ${JSON.stringify(json)}`, { meta: { codec: SQL_FLOAT_CODEC_ID } });
|
|
111
|
+
return json;
|
|
112
|
+
};
|
|
113
|
+
const sqlTextEncode = (value) => value;
|
|
114
|
+
const sqlTextDecode = (wire) => wire;
|
|
115
|
+
const ZONELESS_ISO_TIMESTAMP = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?$/;
|
|
116
|
+
const sqlTimestampEncode = (value) => value;
|
|
117
|
+
const sqlTimestampDecode = (wire) => wire;
|
|
118
|
+
/**
|
|
119
|
+
* A `timestamp` carries no zone, so its JSON form is the ISO rendering without a
|
|
120
|
+
* trailing `Z` — `2026-01-02T03:04:05.678` — and {@link sqlTimestampDecodeJson}
|
|
121
|
+
* reads that form back as UTC.
|
|
122
|
+
*/
|
|
123
|
+
const sqlTimestampEncodeJson = (value) => value.toISOString().slice(0, -1);
|
|
124
|
+
const sqlTimestampDecodeJson = (json) => {
|
|
125
|
+
if (typeof json !== "string") throw structuredError("RUNTIME.DECODE_FAILED", `Expected ISO date string for sql/timestamp@1, got ${typeof json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });
|
|
126
|
+
if (!ZONELESS_ISO_TIMESTAMP.test(json)) throw structuredError("RUNTIME.DECODE_FAILED", `Expected a zone-less ISO date-time (YYYY-MM-DDTHH:MM:SS[.sss]) for sql/timestamp@1, got ${json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });
|
|
127
|
+
const date = /* @__PURE__ */ new Date(`${json}Z`);
|
|
128
|
+
if (Number.isNaN(date.getTime())) throw structuredError("RUNTIME.DECODE_FAILED", `Invalid ISO date string for sql/timestamp@1: ${json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });
|
|
129
|
+
return date;
|
|
130
|
+
};
|
|
131
|
+
const sqlTimestampRenderOutputType = (typeParams) => {
|
|
132
|
+
const precision = typeParams.precision;
|
|
133
|
+
if (precision === void 0) return "Timestamp";
|
|
134
|
+
if (typeof precision !== "number" || !Number.isFinite(precision) || !Number.isInteger(precision)) throw structuredError("RUNTIME.TYPE_PARAMS_INVALID", `renderOutputType: expected integer "precision" in typeParams for Timestamp, got ${String(precision)}`, { meta: {
|
|
135
|
+
codec: SQL_TIMESTAMP_CODEC_ID,
|
|
136
|
+
param: "precision",
|
|
137
|
+
received: String(precision)
|
|
138
|
+
} });
|
|
139
|
+
return `Timestamp<${precision}>`;
|
|
140
|
+
};
|
|
141
|
+
const lengthParamsSchema = type({ "length?": "number.integer > 0" });
|
|
142
|
+
const precisionParamsSchema = type({ "precision?": "number.integer >= 0 & number.integer <= 6" });
|
|
143
|
+
var SqlTextCodec = class extends CodecImpl {
|
|
144
|
+
async encode(value, _ctx) {
|
|
145
|
+
return sqlTextEncode(value);
|
|
146
|
+
}
|
|
147
|
+
async decode(wire, _ctx) {
|
|
148
|
+
return sqlTextDecode(wire);
|
|
149
|
+
}
|
|
150
|
+
encodeJson(value) {
|
|
151
|
+
return value;
|
|
152
|
+
}
|
|
153
|
+
decodeJson(json) {
|
|
154
|
+
return json;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
var SqlTextDescriptor = class extends CodecDescriptorImpl {
|
|
158
|
+
codecId = SQL_TEXT_CODEC_ID;
|
|
159
|
+
traits = [
|
|
160
|
+
"equality",
|
|
161
|
+
"order",
|
|
162
|
+
"textual"
|
|
163
|
+
];
|
|
164
|
+
targetTypes = ["text"];
|
|
165
|
+
paramsSchema = voidParamsSchema;
|
|
166
|
+
factory() {
|
|
167
|
+
return () => new SqlTextCodec(this);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const sqlTextDescriptor = new SqlTextDescriptor();
|
|
171
|
+
const sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0, "text");
|
|
172
|
+
var SqlIntCodec = class extends CodecImpl {
|
|
173
|
+
async encode(value, _ctx) {
|
|
174
|
+
return sqlIntEncode(value);
|
|
175
|
+
}
|
|
176
|
+
async decode(wire, _ctx) {
|
|
177
|
+
return sqlIntDecode(wire);
|
|
178
|
+
}
|
|
179
|
+
encodeJson(value) {
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
decodeJson(json) {
|
|
183
|
+
return json;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
var SqlIntDescriptor = class extends CodecDescriptorImpl {
|
|
187
|
+
codecId = SQL_INT_CODEC_ID;
|
|
188
|
+
traits = [
|
|
189
|
+
"equality",
|
|
190
|
+
"order",
|
|
191
|
+
"numeric"
|
|
192
|
+
];
|
|
193
|
+
targetTypes = ["int"];
|
|
194
|
+
paramsSchema = voidParamsSchema;
|
|
195
|
+
factory() {
|
|
196
|
+
return () => new SqlIntCodec(this);
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const sqlIntDescriptor = new SqlIntDescriptor();
|
|
200
|
+
const sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0, "int");
|
|
201
|
+
var SqlFloatCodec = class extends CodecImpl {
|
|
202
|
+
async encode(value, _ctx) {
|
|
203
|
+
return sqlFloatEncode(value);
|
|
204
|
+
}
|
|
205
|
+
async decode(wire, _ctx) {
|
|
206
|
+
return sqlFloatDecode(wire);
|
|
207
|
+
}
|
|
208
|
+
encodeJson(value) {
|
|
209
|
+
return sqlFloatEncodeJson(value);
|
|
210
|
+
}
|
|
211
|
+
decodeJson(json) {
|
|
212
|
+
return sqlFloatDecodeJson(json);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
var SqlFloatDescriptor = class extends CodecDescriptorImpl {
|
|
216
|
+
codecId = SQL_FLOAT_CODEC_ID;
|
|
217
|
+
traits = [
|
|
218
|
+
"equality",
|
|
219
|
+
"order",
|
|
220
|
+
"numeric"
|
|
221
|
+
];
|
|
222
|
+
targetTypes = ["float"];
|
|
223
|
+
paramsSchema = voidParamsSchema;
|
|
224
|
+
factory() {
|
|
225
|
+
return () => new SqlFloatCodec(this);
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const sqlFloatDescriptor = new SqlFloatDescriptor();
|
|
229
|
+
const sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0, "float");
|
|
230
|
+
var SqlCharCodec = class extends CodecImpl {
|
|
231
|
+
async encode(value, _ctx) {
|
|
232
|
+
return sqlCharEncode(value);
|
|
233
|
+
}
|
|
234
|
+
async decode(wire, _ctx) {
|
|
235
|
+
return sqlCharDecode(wire);
|
|
236
|
+
}
|
|
237
|
+
encodeJson(value) {
|
|
238
|
+
return value;
|
|
239
|
+
}
|
|
240
|
+
decodeJson(json) {
|
|
241
|
+
return json;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
var SqlCharDescriptor = class extends CodecDescriptorImpl {
|
|
245
|
+
codecId = SQL_CHAR_CODEC_ID;
|
|
246
|
+
traits = [
|
|
247
|
+
"equality",
|
|
248
|
+
"order",
|
|
249
|
+
"textual"
|
|
250
|
+
];
|
|
251
|
+
targetTypes = ["char"];
|
|
252
|
+
paramsSchema = lengthParamsSchema;
|
|
253
|
+
renderOutputType(params) {
|
|
254
|
+
return sqlCharRenderOutputType(params);
|
|
255
|
+
}
|
|
256
|
+
factory(_params) {
|
|
257
|
+
return () => new SqlCharCodec(this);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
const sqlCharDescriptor = new SqlCharDescriptor();
|
|
261
|
+
const sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params, "char");
|
|
262
|
+
var SqlVarcharCodec = class extends CodecImpl {
|
|
263
|
+
async encode(value, _ctx) {
|
|
264
|
+
return sqlVarcharEncode(value);
|
|
265
|
+
}
|
|
266
|
+
async decode(wire, _ctx) {
|
|
267
|
+
return sqlVarcharDecode(wire);
|
|
268
|
+
}
|
|
269
|
+
encodeJson(value) {
|
|
270
|
+
return value;
|
|
271
|
+
}
|
|
272
|
+
decodeJson(json) {
|
|
273
|
+
return json;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var SqlVarcharDescriptor = class extends CodecDescriptorImpl {
|
|
277
|
+
codecId = SQL_VARCHAR_CODEC_ID;
|
|
278
|
+
traits = [
|
|
279
|
+
"equality",
|
|
280
|
+
"order",
|
|
281
|
+
"textual"
|
|
282
|
+
];
|
|
283
|
+
targetTypes = ["varchar"];
|
|
284
|
+
paramsSchema = lengthParamsSchema;
|
|
285
|
+
renderOutputType(params) {
|
|
286
|
+
return sqlVarcharRenderOutputType(params);
|
|
287
|
+
}
|
|
288
|
+
factory(_params) {
|
|
289
|
+
return () => new SqlVarcharCodec(this);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const sqlVarcharDescriptor = new SqlVarcharDescriptor();
|
|
293
|
+
const sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params, "varchar");
|
|
294
|
+
var SqlTimestampCodec = class extends CodecImpl {
|
|
295
|
+
async encode(value, _ctx) {
|
|
296
|
+
return sqlTimestampEncode(value);
|
|
297
|
+
}
|
|
298
|
+
async decode(wire, _ctx) {
|
|
299
|
+
return sqlTimestampDecode(wire);
|
|
300
|
+
}
|
|
301
|
+
encodeJson(value) {
|
|
302
|
+
return sqlTimestampEncodeJson(value);
|
|
303
|
+
}
|
|
304
|
+
decodeJson(json) {
|
|
305
|
+
return sqlTimestampDecodeJson(json);
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
var SqlTimestampDescriptor = class extends CodecDescriptorImpl {
|
|
309
|
+
codecId = SQL_TIMESTAMP_CODEC_ID;
|
|
310
|
+
traits = ["equality", "order"];
|
|
311
|
+
targetTypes = ["timestamp"];
|
|
312
|
+
paramsSchema = precisionParamsSchema;
|
|
313
|
+
renderOutputType(params) {
|
|
314
|
+
return sqlTimestampRenderOutputType(params);
|
|
315
|
+
}
|
|
316
|
+
factory(_params) {
|
|
317
|
+
return () => new SqlTimestampCodec(this);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
const sqlTimestampDescriptor = new SqlTimestampDescriptor();
|
|
321
|
+
const sqlTimestampColumn = (params = {}) => column(sqlTimestampDescriptor.factory(params), sqlTimestampDescriptor.codecId, params, "timestamp");
|
|
322
|
+
//#endregion
|
|
323
|
+
export { sqlFloatDescriptor as A, sqlTextEncode as B, sqlCharDecode as C, sqlFloatColumn as D, sqlCharRenderOutputType as E, sqlIntDescriptor as F, sqlTimestampEncode as G, sqlTimestampDecode as H, sqlIntEncode as I, sqlVarcharColumn as J, sqlTimestampEncodeJson as K, sqlTextColumn as L, sqlFloatEncodeJson as M, sqlIntColumn as N, sqlFloatDecode as O, sqlIntDecode as P, sqlVarcharRenderOutputType as Q, sqlTextDecode as R, sqlCharColumn as S, sqlCharEncode as T, sqlTimestampDecodeJson as U, sqlTimestampColumn as V, sqlTimestampDescriptor as W, sqlVarcharDescriptor as X, sqlVarcharDecode as Y, sqlVarcharEncode as Z, SqlTextDescriptor as _, SQL_FLOAT_CODEC_ID as a, SqlVarcharCodec as b, SQL_TIMESTAMP_CODEC_ID as c, SqlCharDescriptor as d, SqlFloatCodec as f, SqlTextCodec as g, SqlIntDescriptor as h, SQL_CHAR_CODEC_ID as i, sqlFloatEncode as j, sqlFloatDecodeJson as k, SQL_VARCHAR_CODEC_ID as l, SqlIntCodec as m, JsonDocumentProjection as n, SQL_INT_CODEC_ID as o, SqlFloatDescriptor as p, sqlTimestampRenderOutputType as q, NativeJsonValueProjection as r, SQL_TEXT_CODEC_ID as s, CodecJsonValueProjection as t, SqlCharCodec as u, SqlTimestampCodec as v, sqlCharDescriptor as w, SqlVarcharDescriptor as x, SqlTimestampDescriptor as y, sqlTextDescriptor as z };
|
|
324
|
+
|
|
325
|
+
//# sourceMappingURL=ast-BstHjAoG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-BstHjAoG.mjs","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/exports/ast.mjs"],"sourcesContent":["import { A as PreparedParamRef, B as isWhereExpr, C as LiteralExpr, D as OrExpr, E as OperationExpr, F as SubqueryExpr, H as whereExprKinds, I as TableSource, L as UpdateAst, M as RawExpr, N as RawSqlExpr, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, U as frozenCodecRef, V as queryAstKinds, _ as InsertAst, a as CastExpr, b as JsonArrayAggExpr, c as DeleteAst, d as DoUpdateSetConflictAction, f as EqColJoinOn, g as IdentifierRef, h as FunctionSource, i as CaseExpr, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, m as FunctionCallExpr, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, u as DoNothingConflictAction, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst, z as isQueryAst } from \"../types-BgkZru_1.mjs\";\nimport { a as ForeignKeyConstraint, c as PrimaryKeyConstraint, i as DdlNode, l as UniqueConstraint, n as DdlColumn, o as FunctionColumnDefault, r as DdlColumnDefault, s as LiteralColumnDefault, t as CheckExpressionConstraint, u as isDdlNode } from \"../ddl-types-BMp2bWVS.mjs\";\nimport { n as compact, t as collectOrderedParamRefs } from \"../util-DQQgv2j1.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { CodecDescriptorImpl, CodecImpl, column, voidParamsSchema } from \"@internal/framework-components/codec\";\nimport { type } from \"arktype\";\n//#region src/ast/json-value-projection.ts\nvar JsonValueProjection = class {\n\tvalue;\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n\tfold(folder) {\n\t\treturn this.value.fold(folder);\n\t}\n\tcollectColumnRefs() {\n\t\treturn this.value.collectColumnRefs();\n\t}\n\tcollectParamRefs() {\n\t\treturn this.value.collectParamRefs();\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nvar CodecJsonValueProjection = class CodecJsonValueProjection extends JsonValueProjection {\n\tkind = \"codec\";\n\tcodec;\n\tconstructor(value, codec) {\n\t\tsuper(value);\n\t\tthis.codec = frozenCodecRef(codec);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.codec(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new CodecJsonValueProjection(this.value.rewrite(rewriter), this.codec);\n\t}\n};\nvar NativeJsonValueProjection = class NativeJsonValueProjection extends JsonValueProjection {\n\tkind = \"native\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.native(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new NativeJsonValueProjection(this.value.rewrite(rewriter));\n\t}\n};\nvar JsonDocumentProjection = class JsonDocumentProjection extends JsonValueProjection {\n\tkind = \"document\";\n\tconstructor(value) {\n\t\tsuper(value);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.document(this);\n\t}\n\trewrite(rewriter) {\n\t\treturn new JsonDocumentProjection(this.value.rewrite(rewriter));\n\t}\n};\n//#endregion\n//#region src/ast/sql-codec-helpers.ts\nconst SQL_CHAR_CODEC_ID = \"sql/char@1\";\nconst SQL_VARCHAR_CODEC_ID = \"sql/varchar@1\";\nconst SQL_INT_CODEC_ID = \"sql/int@1\";\nconst SQL_FLOAT_CODEC_ID = \"sql/float@1\";\nconst SQL_TEXT_CODEC_ID = \"sql/text@1\";\nconst SQL_TIMESTAMP_CODEC_ID = \"sql/timestamp@1\";\nconst sqlCharEncode = (value) => value;\nconst sqlCharDecode = (wire) => wire.trimEnd();\nconst sqlCharRenderOutputType = (typeParams) => {\n\tconst length = typeParams.length;\n\tif (length === void 0) return void 0;\n\tif (typeof length !== \"number\" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"length\" in typeParams for Char, got ${String(length)}`, { meta: {\n\t\tcodec: SQL_CHAR_CODEC_ID,\n\t\tparam: \"length\",\n\t\treceived: String(length)\n\t} });\n\treturn `Char<${length}>`;\n};\nconst sqlVarcharEncode = (value) => value;\nconst sqlVarcharDecode = (wire) => wire;\nconst sqlVarcharRenderOutputType = (typeParams) => {\n\tconst length = typeParams.length;\n\tif (length === void 0) return void 0;\n\tif (typeof length !== \"number\" || !Number.isFinite(length) || !Number.isInteger(length)) throw structuredError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"length\" in typeParams for Varchar, got ${String(length)}`, { meta: {\n\t\tcodec: SQL_VARCHAR_CODEC_ID,\n\t\tparam: \"length\",\n\t\treceived: String(length)\n\t} });\n\treturn `Varchar<${length}>`;\n};\nconst sqlIntEncode = (value) => value;\nconst sqlIntDecode = (wire) => wire;\nconst sqlFloatEncode = (value) => value;\nconst sqlFloatDecode = (wire) => wire;\n/**\n* JSON has no spelling for a non-finite number, and a database that holds one\n* emits it as a string — PostgreSQL writes `\"NaN\"` and `\"Infinity\"`. This\n* codec's application type is `number`, so both directions reject rather than\n* carry a value that type cannot hold.\n*/\nconst sqlFloatEncodeJson = (value) => {\n\tif (!Number.isFinite(value)) throw structuredError(\"RUNTIME.ENCODE_FAILED\", `${SQL_FLOAT_CODEC_ID} application value must be a finite number, got ${value}`, { meta: { codec: SQL_FLOAT_CODEC_ID } });\n\treturn value;\n};\nconst sqlFloatDecodeJson = (json) => {\n\tif (typeof json !== \"number\" || !Number.isFinite(json)) throw structuredError(\"RUNTIME.DECODE_FAILED\", `Expected a finite number for ${SQL_FLOAT_CODEC_ID}, got ${JSON.stringify(json)}`, { meta: { codec: SQL_FLOAT_CODEC_ID } });\n\treturn json;\n};\nconst sqlTextEncode = (value) => value;\nconst sqlTextDecode = (wire) => wire;\nconst ZONELESS_ISO_TIMESTAMP = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?$/;\nconst sqlTimestampEncode = (value) => value;\nconst sqlTimestampDecode = (wire) => wire;\n/**\n* A `timestamp` carries no zone, so its JSON form is the ISO rendering without a\n* trailing `Z` — `2026-01-02T03:04:05.678` — and {@link sqlTimestampDecodeJson}\n* reads that form back as UTC.\n*/\nconst sqlTimestampEncodeJson = (value) => value.toISOString().slice(0, -1);\nconst sqlTimestampDecodeJson = (json) => {\n\tif (typeof json !== \"string\") throw structuredError(\"RUNTIME.DECODE_FAILED\", `Expected ISO date string for sql/timestamp@1, got ${typeof json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });\n\tif (!ZONELESS_ISO_TIMESTAMP.test(json)) throw structuredError(\"RUNTIME.DECODE_FAILED\", `Expected a zone-less ISO date-time (YYYY-MM-DDTHH:MM:SS[.sss]) for sql/timestamp@1, got ${json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });\n\tconst date = /* @__PURE__ */ new Date(`${json}Z`);\n\tif (Number.isNaN(date.getTime())) throw structuredError(\"RUNTIME.DECODE_FAILED\", `Invalid ISO date string for sql/timestamp@1: ${json}`, { meta: { codec: SQL_TIMESTAMP_CODEC_ID } });\n\treturn date;\n};\nconst sqlTimestampRenderOutputType = (typeParams) => {\n\tconst precision = typeParams.precision;\n\tif (precision === void 0) return \"Timestamp\";\n\tif (typeof precision !== \"number\" || !Number.isFinite(precision) || !Number.isInteger(precision)) throw structuredError(\"RUNTIME.TYPE_PARAMS_INVALID\", `renderOutputType: expected integer \"precision\" in typeParams for Timestamp, got ${String(precision)}`, { meta: {\n\t\tcodec: SQL_TIMESTAMP_CODEC_ID,\n\t\tparam: \"precision\",\n\t\treceived: String(precision)\n\t} });\n\treturn `Timestamp<${precision}>`;\n};\n//#endregion\n//#region src/ast/sql-codecs.ts\nconst lengthParamsSchema = type({ \"length?\": \"number.integer > 0\" });\nconst precisionParamsSchema = type({ \"precision?\": \"number.integer >= 0 & number.integer <= 6\" });\nvar SqlTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlTextEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlTextDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqlTextDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqlTextCodec(this);\n\t}\n};\nconst sqlTextDescriptor = new SqlTextDescriptor();\nconst sqlTextColumn = () => column(sqlTextDescriptor.factory(), sqlTextDescriptor.codecId, void 0, \"text\");\nvar SqlIntCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlIntEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlIntDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqlIntDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_INT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"int\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqlIntCodec(this);\n\t}\n};\nconst sqlIntDescriptor = new SqlIntDescriptor();\nconst sqlIntColumn = () => column(sqlIntDescriptor.factory(), sqlIntDescriptor.codecId, void 0, \"int\");\nvar SqlFloatCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlFloatEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlFloatDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn sqlFloatEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn sqlFloatDecodeJson(json);\n\t}\n};\nvar SqlFloatDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_FLOAT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"float\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqlFloatCodec(this);\n\t}\n};\nconst sqlFloatDescriptor = new SqlFloatDescriptor();\nconst sqlFloatColumn = () => column(sqlFloatDescriptor.factory(), sqlFloatDescriptor.codecId, void 0, \"float\");\nvar SqlCharCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlCharEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlCharDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqlCharDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_CHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"char\"];\n\tparamsSchema = lengthParamsSchema;\n\trenderOutputType(params) {\n\t\treturn sqlCharRenderOutputType(params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new SqlCharCodec(this);\n\t}\n};\nconst sqlCharDescriptor = new SqlCharDescriptor();\nconst sqlCharColumn = (params = {}) => column(sqlCharDescriptor.factory(params), sqlCharDescriptor.codecId, params, \"char\");\nvar SqlVarcharCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlVarcharEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlVarcharDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqlVarcharDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_VARCHAR_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"varchar\"];\n\tparamsSchema = lengthParamsSchema;\n\trenderOutputType(params) {\n\t\treturn sqlVarcharRenderOutputType(params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new SqlVarcharCodec(this);\n\t}\n};\nconst sqlVarcharDescriptor = new SqlVarcharDescriptor();\nconst sqlVarcharColumn = (params = {}) => column(sqlVarcharDescriptor.factory(params), sqlVarcharDescriptor.codecId, params, \"varchar\");\nvar SqlTimestampCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn sqlTimestampEncode(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn sqlTimestampDecode(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn sqlTimestampEncodeJson(value);\n\t}\n\tdecodeJson(json) {\n\t\treturn sqlTimestampDecodeJson(json);\n\t}\n};\nvar SqlTimestampDescriptor = class extends CodecDescriptorImpl {\n\tcodecId = SQL_TIMESTAMP_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\ttargetTypes = [\"timestamp\"];\n\tparamsSchema = precisionParamsSchema;\n\trenderOutputType(params) {\n\t\treturn sqlTimestampRenderOutputType(params);\n\t}\n\tfactory(_params) {\n\t\treturn () => new SqlTimestampCodec(this);\n\t}\n};\nconst sqlTimestampDescriptor = new SqlTimestampDescriptor();\nconst sqlTimestampColumn = (params = {}) => column(sqlTimestampDescriptor.factory(params), sqlTimestampDescriptor.codecId, params, \"timestamp\");\n//#endregion\nexport { AggregateExpr, AndExpr, BinaryExpr, CaseExpr, CastExpr, CheckExpressionConstraint, CodecJsonValueProjection, ColumnRef, DdlColumn, DdlColumnDefault, DdlNode, DefaultValueExpr, DeleteAst, DerivedTableSource, DoNothingConflictAction, DoUpdateSetConflictAction, EqColJoinOn, ExistsExpr, ForeignKeyConstraint, FunctionCallExpr, FunctionColumnDefault, FunctionSource, IdentifierRef, InsertAst, InsertOnConflict, JoinAst, JsonArrayAggExpr, JsonDocumentProjection, JsonObjectExpr, ListExpression, LiteralColumnDefault, LiteralExpr, NativeJsonValueProjection, NotExpr, NullCheckExpr, OperationExpr, OrExpr, OrderByItem, ParamRef, PreparedParamRef, PrimaryKeyConstraint, ProjectionItem, RawExpr, RawSqlExpr, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SelectAst, SqlCharCodec, SqlCharDescriptor, SqlFloatCodec, SqlFloatDescriptor, SqlIntCodec, SqlIntDescriptor, SqlTextCodec, SqlTextDescriptor, SqlTimestampCodec, SqlTimestampDescriptor, SqlVarcharCodec, SqlVarcharDescriptor, SubqueryExpr, TableSource, UniqueConstraint, UpdateAst, WindowFuncExpr, collectOrderedParamRefs, compact, frozenCodecRef, isDdlNode, isQueryAst, isWhereExpr, queryAstKinds, sqlCharColumn, sqlCharDecode, sqlCharDescriptor, sqlCharEncode, sqlCharRenderOutputType, sqlFloatColumn, sqlFloatDecode, sqlFloatDecodeJson, sqlFloatDescriptor, sqlFloatEncode, sqlFloatEncodeJson, sqlIntColumn, sqlIntDecode, sqlIntDescriptor, sqlIntEncode, sqlTextColumn, sqlTextDecode, sqlTextDescriptor, sqlTextEncode, sqlTimestampColumn, sqlTimestampDecode, sqlTimestampDecodeJson, sqlTimestampDescriptor, sqlTimestampEncode, sqlTimestampEncodeJson, sqlTimestampRenderOutputType, sqlVarcharColumn, sqlVarcharDecode, sqlVarcharDescriptor, sqlVarcharEncode, sqlVarcharRenderOutputType, whereExprKinds };\n\n//# sourceMappingURL=ast.mjs.map"],"mappings":";;;;;AAOA,IAAI,sBAAsB,MAAM;CAC/B;CACA,YAAY,OAAO;EAClB,KAAK,QAAQ;CACd;CACA,KAAK,QAAQ;EACZ,OAAO,KAAK,MAAM,KAAK,MAAM;CAC9B;CACA,oBAAoB;EACnB,OAAO,KAAK,MAAM,kBAAkB;CACrC;CACA,mBAAmB;EAClB,OAAO,KAAK,MAAM,iBAAiB;CACpC;CACA,SAAS;EACR,OAAO,OAAO,IAAI;CACnB;AACD;AACA,IAAI,2BAA2B,MAAM,iCAAiC,oBAAoB;CACzF,OAAO;CACP;CACA,YAAY,OAAO,OAAO;EACzB,MAAM,KAAK;EACX,KAAK,QAAQ,eAAe,KAAK;EACjC,KAAK,OAAO;CACb;CACA,OAAO,SAAS;EACf,OAAO,QAAQ,MAAM,IAAI;CAC1B;CACA,QAAQ,UAAU;EACjB,OAAO,IAAI,yBAAyB,KAAK,MAAM,QAAQ,QAAQ,GAAG,KAAK,KAAK;CAC7E;AACD;AACA,IAAI,4BAA4B,MAAM,kCAAkC,oBAAoB;CAC3F,OAAO;CACP,YAAY,OAAO;EAClB,MAAM,KAAK;EACX,KAAK,OAAO;CACb;CACA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