@prisma/orm-family-sql 8.0.0-rc.14-dev.14 → 8.0.0-rc.14-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ast-qnGR-fmK.d.mts → ast-S4eEzFmO.d.mts} +3 -3
- package/dist/{ast-qnGR-fmK.d.mts.map → ast-S4eEzFmO.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-BCsVtN8A.d.mts → authoring-entity-types-CZ-vdwYS-CvNNLogv.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-BCsVtN8A.d.mts.map → authoring-entity-types-CZ-vdwYS-CvNNLogv.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-DIyheCzv-BgR6EC_E.mjs → authoring-type-constructors-DIyheCzv-BuirUCc_.mjs} +2 -2
- package/dist/{authoring-type-constructors-DIyheCzv-BgR6EC_E.mjs.map → authoring-type-constructors-DIyheCzv-BuirUCc_.mjs.map} +1 -1
- package/dist/builder.d.mts +2 -2
- package/dist/builder__runtime.d.mts +9 -9
- package/dist/builder__runtime.mjs +1 -1
- package/dist/builder__types.d.mts +2 -2
- package/dist/{codec-descriptor-registry-B1v3GEdK.mjs → codec-descriptor-registry-BSoMKDUv.mjs} +2 -2
- package/dist/{codec-descriptor-registry-B1v3GEdK.mjs.map → codec-descriptor-registry-BSoMKDUv.mjs.map} +1 -1
- package/dist/{config-types-BzCtgjh6.mjs → config-types-CYRUgWbg.mjs} +2 -2
- package/dist/{config-types-BzCtgjh6.mjs.map → config-types-CYRUgWbg.mjs.map} +1 -1
- package/dist/{config-types-VJ5O9Ert.d.mts → config-types-Dpg3tzCJ.d.mts} +4 -4
- package/dist/{config-types-VJ5O9Ert.d.mts.map → config-types-Dpg3tzCJ.d.mts.map} +1 -1
- package/dist/{contract-builder-CyJOBIFB.mjs → contract-builder-CUfUvDc1.mjs} +16 -10
- package/dist/contract-builder-CUfUvDc1.mjs.map +1 -0
- package/dist/{contract-builder-ezejmfrY.d.mts → contract-builder-_39f3LuO.d.mts} +73 -26
- package/dist/contract-builder-_39f3LuO.d.mts.map +1 -0
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +2 -2
- package/dist/contract-prisma7__provider.mjs +9 -6
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +3 -3
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -2
- package/dist/contract-psl__attribute-specs.d.mts.map +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.d.mts +2 -2
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +4 -4
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.d.mts +1 -1
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +3 -3
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{contract-view-BTFdP8wh.d.mts → contract-view-D8enRe9A.d.mts} +2 -2
- package/dist/{contract-view-BTFdP8wh.d.mts.map → contract-view-D8enRe9A.d.mts.map} +1 -1
- package/dist/contract.d.mts +10 -10
- package/dist/contract.mjs +6 -6
- package/dist/contract__contract-view.d.mts +1 -1
- package/dist/contract__entity-kinds.d.mts +1 -1
- package/dist/contract__entity-kinds.mjs +1 -1
- package/dist/contract__factories.d.mts +1 -1
- package/dist/contract__factories.mjs +1 -1
- package/dist/contract__index-type-validation.d.mts +1 -1
- package/dist/contract__resolve-storage-table.d.mts +1 -1
- package/dist/contract__types.d.mts +4 -4
- package/dist/contract__types.mjs +3 -3
- package/dist/contract__validators.d.mts +1 -1
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-BFgBjkQh.d.mts → control--13SHD7X.d.mts} +15 -15
- package/dist/{control-BFgBjkQh.d.mts.map → control--13SHD7X.d.mts.map} +1 -1
- package/dist/{control-D7yb7l7O.mjs → control-B8LE0HRq.mjs} +13 -12
- package/dist/control-B8LE0HRq.mjs.map +1 -0
- package/dist/{control-adapter-C4_cgvzB-BhRxZg-n.d.mts → control-adapter-C4_cgvzB-C9dQipiW.d.mts} +6 -6
- package/dist/{control-adapter-C4_cgvzB-BhRxZg-n.d.mts.map → control-adapter-C4_cgvzB-C9dQipiW.d.mts.map} +1 -1
- package/dist/control-adapter-D2k9sW7u.d.mts +1 -0
- package/dist/{db-DLjWu9-f-B79_8TyU.d.mts → db-DLjWu9-f-NJprwMBN.d.mts} +9 -9
- package/dist/{db-DLjWu9-f-B79_8TyU.d.mts.map → db-DLjWu9-f-NJprwMBN.d.mts.map} +1 -1
- package/dist/{ddl-types-B23QEzDx-ridB7leA.d.mts → ddl-types-B23QEzDx-DnMvLEgB.d.mts} +3 -3
- package/dist/{ddl-types-B23QEzDx-ridB7leA.d.mts.map → ddl-types-B23QEzDx-DnMvLEgB.d.mts.map} +1 -1
- package/dist/{derived-checks-a_OpD3OE-BLAb_lZ9.mjs → derived-checks-C_y1rk6O-DdqjzGNy.mjs} +23 -16
- package/dist/derived-checks-C_y1rk6O-DdqjzGNy.mjs.map +1 -0
- package/dist/{derived-checks-DPdD01O0-zXZEuy5P.d.mts → derived-checks-DPdD01O0-CwIwhhTu.d.mts} +3 -3
- package/dist/{derived-checks-DPdD01O0-zXZEuy5P.d.mts.map → derived-checks-DPdD01O0-CwIwhhTu.d.mts.map} +1 -1
- package/dist/{diff-CPnJUpHZ.d.mts → diff-D3Ocd7-r.d.mts} +6 -6
- package/dist/{diff-CPnJUpHZ.d.mts.map → diff-D3Ocd7-r.d.mts.map} +1 -1
- package/dist/{dist-DeiKZwAD.mjs → dist-BW8u_IDQ.mjs} +5 -4
- package/dist/dist-BW8u_IDQ.mjs.map +1 -0
- package/dist/{entity-kinds-B5cUFU22.d.mts → entity-kinds-BG4YTvrr.d.mts} +2 -2
- package/dist/{entity-kinds-B5cUFU22.d.mts.map → entity-kinds-BG4YTvrr.d.mts.map} +1 -1
- package/dist/{entity-kinds-D7vwoN_T-NmeI6TpT.mjs → entity-kinds-ChX-owgJ-BgpQHnfy.mjs} +16 -12
- package/dist/entity-kinds-ChX-owgJ-BgpQHnfy.mjs.map +1 -0
- package/dist/{expression-C6yUAU4j.d.mts → expression-DLgBXKdO.d.mts} +7 -7
- package/dist/{expression-C6yUAU4j.d.mts.map → expression-DLgBXKdO.d.mts.map} +1 -1
- package/dist/{factories-aJoZYxkD.mjs → factories-16A63DkK.mjs} +21 -15
- package/dist/factories-16A63DkK.mjs.map +1 -0
- package/dist/{factories-TIM9dI6S.d.mts → factories-CLPZYUUw.d.mts} +12 -6
- package/dist/factories-CLPZYUUw.d.mts.map +1 -0
- package/dist/family.d.mts +12 -12
- package/dist/family.mjs +5 -5
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +4 -4
- package/dist/family__control.mjs +3 -3
- package/dist/family__diff.d.mts +2 -2
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__runtime.d.mts +2 -2
- package/dist/{index-DrUd8HwS.d.mts → index-BlVbNiHO.d.mts} +3 -3
- package/dist/{index-DrUd8HwS.d.mts.map → index-BlVbNiHO.d.mts.map} +1 -1
- package/dist/{index-CQ74jdOW.d.mts → index-VjA5whAC.d.mts} +11 -11
- package/dist/{index-CQ74jdOW.d.mts.map → index-VjA5whAC.d.mts.map} +1 -1
- package/dist/{index-type-validation-BAQWs-c_.d.mts → index-type-validation-DLPW4oTq.d.mts} +3 -3
- package/dist/{index-type-validation-BAQWs-c_.d.mts.map → index-type-validation-DLPW4oTq.d.mts.map} +1 -1
- package/dist/{interpreter-j1ewAXPb-BbCjJ0ta.mjs → interpreter-CkCfPqup-DF7bZvNM.mjs} +82 -16
- package/dist/interpreter-CkCfPqup-DF7bZvNM.mjs.map +1 -0
- package/dist/{ir-DI4cwMsy.d.mts → ir-DbwRAIkx.d.mts} +3 -3
- package/dist/{ir-DI4cwMsy.d.mts.map → ir-DbwRAIkx.d.mts.map} +1 -1
- package/dist/middleware-BwwcaXlc.d.mts +1 -0
- package/dist/{middleware-CuGBptK0-CGDI6sQU.d.mts → middleware-CuGBptK0-BEYuhhG2.d.mts} +2 -2
- package/dist/{middleware-CuGBptK0-CGDI6sQU.d.mts.map → middleware-CuGBptK0-BEYuhhG2.d.mts.map} +1 -1
- package/dist/{migration-Ixy5Tqxd.d.mts → migration-BqUra50L.d.mts} +4 -4
- package/dist/{migration-Ixy5Tqxd.d.mts.map → migration-BqUra50L.d.mts.map} +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/orm-client.d.mts +15 -15
- package/dist/orm-client.mjs +2 -2
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{pack-DcSVDz7M.d.mts → pack-fBtj2dsq.d.mts} +3 -3
- package/dist/{pack-DcSVDz7M.d.mts.map → pack-fBtj2dsq.d.mts.map} +1 -1
- package/dist/{plan-B7g2kDfQ-Do1iWC4q.d.mts → plan-B7g2kDfQ-BVlzwDKL.d.mts} +4 -4
- package/dist/{plan-B7g2kDfQ-Do1iWC4q.d.mts.map → plan-B7g2kDfQ-BVlzwDKL.d.mts.map} +1 -1
- package/dist/plan-hQv6wCbk.d.mts +2 -0
- package/dist/{prepared-statement-Cv54gpY_-CbIaPDc1.d.mts → prepared-statement-Cv54gpY_-BObeNp2I.d.mts} +16 -16
- package/dist/{prepared-statement-Cv54gpY_-CbIaPDc1.d.mts.map → prepared-statement-Cv54gpY_-BObeNp2I.d.mts.map} +1 -1
- package/dist/{psl-build-139T3MMA.mjs → psl-build-CqhSpaQE.mjs} +2 -2
- package/dist/{psl-build-139T3MMA.mjs.map → psl-build-CqhSpaQE.mjs.map} +1 -1
- package/dist/{query-lane-context-BSmWfohZ-QAWw_dXQ.d.mts → query-lane-context-BSmWfohZ-yCQ9qzQZ.d.mts} +5 -5
- package/dist/{query-lane-context-BSmWfohZ-QAWw_dXQ.d.mts.map → query-lane-context-BSmWfohZ-yCQ9qzQZ.d.mts.map} +1 -1
- package/dist/query-lane-context-DbJO1bmQ.d.mts +1 -0
- package/dist/relational-core.d.mts +11 -11
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__ast.d.mts +3 -3
- package/dist/relational-core__codec-descriptor-registry.d.mts +4 -4
- package/dist/relational-core__codec-descriptor-registry.mjs +1 -1
- package/dist/relational-core__contract-free.d.mts +3 -3
- package/dist/relational-core__expression.d.mts +1 -1
- package/dist/relational-core__middleware.d.mts +2 -2
- package/dist/relational-core__plan.d.mts +3 -3
- package/dist/relational-core__query-lane-context.d.mts +2 -2
- package/dist/relational-core__types.d.mts +2 -2
- package/dist/{resolve-storage-table-DhgzQjow.d.mts → resolve-storage-table-5G0L5k6M.d.mts} +3 -3
- package/dist/{resolve-storage-table-DhgzQjow.d.mts.map → resolve-storage-table-5G0L5k6M.d.mts.map} +1 -1
- package/dist/{runtime-I-W0bhvd.d.mts → runtime-CajhgB9z.d.mts} +2 -2
- package/dist/{runtime-I-W0bhvd.d.mts.map → runtime-CajhgB9z.d.mts.map} +1 -1
- package/dist/runtime.d.mts +4 -4
- package/dist/runtime.mjs +1 -1
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-DpG_gnur-gLIPLPVI.d.mts → schema-differ-DpG_gnur-CYpc6zuh.d.mts} +3 -3
- package/dist/{schema-differ-DpG_gnur-gLIPLPVI.d.mts.map → schema-differ-DpG_gnur-CYpc6zuh.d.mts.map} +1 -1
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{schema-verify-DI0aJQ9d-DL-C6on7.mjs → schema-verify-DI0aJQ9d-TpdeERRD.mjs} +2 -2
- package/dist/{schema-verify-DI0aJQ9d-DL-C6on7.mjs.map → schema-verify-DI0aJQ9d-TpdeERRD.mjs.map} +1 -1
- package/dist/{serialized-index-nBTwanKy-B0C03Q_R.mjs → serialized-index-B5X7s-oX-TKQhXsZz.mjs} +3 -3
- package/dist/{serialized-index-nBTwanKy-B0C03Q_R.mjs.map → serialized-index-B5X7s-oX-TKQhXsZz.mjs.map} +1 -1
- package/dist/{sql-attribute-specs-Bs9QDuS7-DmIRJUz9.mjs → sql-attribute-specs-DxpHr9Fk-CeWmMP7y.mjs} +20 -7
- package/dist/sql-attribute-specs-DxpHr9Fk-CeWmMP7y.mjs.map +1 -0
- package/dist/{sql-contract-serializer-C90xg7_q-DBJSt3MT.mjs → sql-contract-serializer-C90xg7_q-CxzBoB0F.mjs} +4 -4
- package/dist/{sql-contract-serializer-C90xg7_q-DBJSt3MT.mjs.map → sql-contract-serializer-C90xg7_q-CxzBoB0F.mjs.map} +1 -1
- package/dist/{sql-execution-plan-Db0j752I-uGUWy8sD.d.mts → sql-execution-plan-Db0j752I-B3yGocR6.d.mts} +2 -2
- package/dist/{sql-execution-plan-Db0j752I-uGUWy8sD.d.mts.map → sql-execution-plan-Db0j752I-B3yGocR6.d.mts.map} +1 -1
- package/dist/{sql-storage-BSxD7_vv-C4ugLH39.d.mts → sql-storage-jJySr7bL-1Eh2i2r1.d.mts} +3 -3
- package/dist/{sql-storage-BSxD7_vv-C4ugLH39.d.mts.map → sql-storage-jJySr7bL-1Eh2i2r1.d.mts.map} +1 -1
- package/dist/{storage-table-ZzbR-xzQ-C8gXT45E.mjs → storage-table-ADhJ4Imk-0FbJXvSZ.mjs} +6 -3
- package/dist/storage-table-ADhJ4Imk-0FbJXvSZ.mjs.map +1 -0
- package/dist/{storage-table-DSeWszOL-CI-cItEK.d.mts → storage-table-DLFvP77v-BfO2iOT4.d.mts} +9 -6
- package/dist/storage-table-DLFvP77v-BfO2iOT4.d.mts.map +1 -0
- package/dist/{types-C5QzgUrH-B7IJM6qN.mjs → types-B9rf_EdI-CEYrMMeO.mjs} +6 -2
- package/dist/types-B9rf_EdI-CEYrMMeO.mjs.map +1 -0
- package/dist/{types-BGHABElw-C5MKkR3c.d.mts → types-BGHABElw-CZyfbuWe.d.mts} +10 -10
- package/dist/{types-BGHABElw-C5MKkR3c.d.mts.map → types-BGHABElw-CZyfbuWe.d.mts.map} +1 -1
- package/dist/{types-BHKZ4M-a-DYsrOHhh.d.mts → types-BHKZ4M-a-CPFh-lCl.d.mts} +7 -7
- package/dist/{types-BHKZ4M-a-DYsrOHhh.d.mts.map → types-BHKZ4M-a-CPFh-lCl.d.mts.map} +1 -1
- package/dist/{types-DTUyRqZv-DLh98w8w.d.mts → types-Bl6ohp1g-ROH3Mwm9.d.mts} +4 -4
- package/dist/{types-DTUyRqZv-DLh98w8w.d.mts.map → types-Bl6ohp1g-ROH3Mwm9.d.mts.map} +1 -1
- package/dist/types-CHcsPFTv.d.mts +1 -0
- package/dist/{types-BoMDdzjD.d.mts → types-E46h1SEX.d.mts} +4 -4
- package/dist/{types-BoMDdzjD.d.mts.map → types-E46h1SEX.d.mts.map} +1 -1
- package/dist/{types-Yui2yFf6-DQkiEr9B.d.mts → types-Yui2yFf6-Ceyf2gJ2.d.mts} +2 -2
- package/dist/{types-Yui2yFf6-DQkiEr9B.d.mts.map → types-Yui2yFf6-Ceyf2gJ2.d.mts.map} +1 -1
- package/dist/{types-BmXzMDQL.mjs → types-jFnALKoT.mjs} +2 -2
- package/dist/{types-BmXzMDQL.mjs.map → types-jFnALKoT.mjs.map} +1 -1
- package/dist/{validators-CZNulH-_.d.mts → validators-CQ_fniE7.d.mts} +6 -4
- package/dist/validators-CQ_fniE7.d.mts.map +1 -0
- package/dist/{validators-BlqrBU7I.mjs → validators-DvzOZLel.mjs} +34 -32
- package/dist/validators-DvzOZLel.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/contract-builder-CyJOBIFB.mjs.map +0 -1
- package/dist/contract-builder-ezejmfrY.d.mts.map +0 -1
- package/dist/control-D7yb7l7O.mjs.map +0 -1
- package/dist/control-adapter-Cj6XQ7Yo.d.mts +0 -1
- package/dist/derived-checks-a_OpD3OE-BLAb_lZ9.mjs.map +0 -1
- package/dist/dist-DeiKZwAD.mjs.map +0 -1
- package/dist/entity-kinds-D7vwoN_T-NmeI6TpT.mjs.map +0 -1
- package/dist/factories-TIM9dI6S.d.mts.map +0 -1
- package/dist/factories-aJoZYxkD.mjs.map +0 -1
- package/dist/interpreter-j1ewAXPb-BbCjJ0ta.mjs.map +0 -1
- package/dist/middleware-C6T9FExV.d.mts +0 -1
- package/dist/plan-BBBYfvlz.d.mts +0 -2
- package/dist/query-lane-context-B0R8L6W-.d.mts +0 -1
- package/dist/sql-attribute-specs-Bs9QDuS7-DmIRJUz9.mjs.map +0 -1
- package/dist/storage-table-DSeWszOL-CI-cItEK.d.mts.map +0 -1
- package/dist/storage-table-ZzbR-xzQ-C8gXT45E.mjs.map +0 -1
- package/dist/types-C5QzgUrH-B7IJM6qN.mjs.map +0 -1
- package/dist/types-CXe4fCcu.d.mts +0 -1
- package/dist/validators-BlqrBU7I.mjs.map +0 -1
- package/dist/validators-CZNulH-_.d.mts.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as isAuthoredIndexInput } from "./index-naming-Cj1Anq-T-C9TevpPR.mjs";
|
|
2
2
|
import { n as providesPslEntityPlacement } from "./entity-handle-lowering-hook-B3atrRKX.mjs";
|
|
3
3
|
import { s as sqlTextFromCanonical, t as SQL_EXPRESSION_DATA_TYPE_ID } from "./sql-expression-BXx0Ilj-.mjs";
|
|
4
|
-
import { d as resolvedTypeParams } from "./types-
|
|
5
|
-
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-
|
|
4
|
+
import { d as resolvedTypeParams } from "./types-jFnALKoT.mjs";
|
|
5
|
+
import { n as checkSqlDefaultBody, o as reservedSqlDefaultBody } from "./validators-DvzOZLel.mjs";
|
|
6
6
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
7
|
-
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition } from "./derived-checks-
|
|
8
|
-
import { a as getAttribute, c as interpretModelAttribute, d as modelAttributeSpecsFrom, f as sqlAttributeSpecs, i as formatDbAttributeMigrationMessage, l as lowerDefaultFunctionWithRegistry, n as createSqlBinder, o as getNamedArgument, p as storageName, r as fieldSpecContext, s as interpretFieldAttribute, t as PSL_CHECK_ON_STI_VARIANT, u as mapFieldNamesToColumns } from "./sql-attribute-specs-
|
|
7
|
+
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition } from "./derived-checks-C_y1rk6O-DdqjzGNy.mjs";
|
|
8
|
+
import { a as getAttribute, c as interpretModelAttribute, d as modelAttributeSpecsFrom, f as sqlAttributeSpecs, i as formatDbAttributeMigrationMessage, l as lowerDefaultFunctionWithRegistry, n as createSqlBinder, o as getNamedArgument, p as storageName, r as fieldSpecContext, s as interpretFieldAttribute, t as PSL_CHECK_ON_STI_VARIANT, u as mapFieldNamesToColumns } from "./sql-attribute-specs-DxpHr9Fk-CeWmMP7y.mjs";
|
|
9
9
|
import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
|
|
10
10
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
11
11
|
import { checkUncomposedNamespace, getAuthoringFieldPreset, getAuthoringTypeConstructor, hasRegisteredFieldNamespace, instantiateAuthoringEntityType, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringModelAttributeDescriptor, validateAuthoringHelperArguments } from "@prisma/orm-framework/components/authoring";
|
|
@@ -15,7 +15,7 @@ import { crossRef } from "@prisma/orm-framework/contract/types";
|
|
|
15
15
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
16
16
|
import { codecForRef } from "@prisma/orm-framework/components/codec";
|
|
17
17
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
18
|
-
import { NamespaceDeclarationAst } from "@prisma/orm-framework/psl-parser/syntax";
|
|
18
|
+
import { ArrayLiteralAst, IdentifierAst, NamespaceDeclarationAst } from "@prisma/orm-framework/psl-parser/syntax";
|
|
19
19
|
import { resolveToOneRelationNullable } from "@prisma/orm-framework/contract-authoring";
|
|
20
20
|
import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
|
|
21
21
|
import { describeTaggedLiteralFailure } from "@prisma/orm-framework/components/control";
|
|
@@ -23,7 +23,7 @@ import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
|
23
23
|
import { createPslDiagnosticCollector, diagnosticSource, findBlockDescriptor, interpretExtensionBlocks, nodePslSpan, typeReferenceNode } from "@prisma/orm-framework/psl-parser";
|
|
24
24
|
import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID } from "@prisma/orm-framework/components/psl-ast";
|
|
25
25
|
import { claimedBlockKeywords, enumMemberAttributeDiagnostics, fkRelationPairKey, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, unsupportedBlockDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
|
|
26
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-
|
|
26
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-CkCfPqup.mjs
|
|
27
27
|
function contractError(code, message, options) {
|
|
28
28
|
return structuredError(code, message, options);
|
|
29
29
|
}
|
|
@@ -373,7 +373,10 @@ function valueObjectDefaultMismatches(input) {
|
|
|
373
373
|
shape(path, `the member is a list, so its value is a JSON array, not ${jsonKind(value)}`);
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
|
-
for (const [index, element] of value.entries())
|
|
376
|
+
for (const [index, element] of value.entries()) {
|
|
377
|
+
if (element === null && member.elementNullable) continue;
|
|
378
|
+
checkOne(element, member, `${path}[${index}]`, "an element of the member is not null");
|
|
379
|
+
}
|
|
377
380
|
return;
|
|
378
381
|
}
|
|
379
382
|
checkOne(value, member, path, "the member is not optional, so its value is not null");
|
|
@@ -411,7 +414,10 @@ function valueObjectDefaultMismatches(input) {
|
|
|
411
414
|
shape(input.fieldPath, `the default of a list of value objects is a JSON array, not ${jsonKind(input.value)}`);
|
|
412
415
|
return mismatches;
|
|
413
416
|
}
|
|
414
|
-
for (const [index, element] of input.value.entries())
|
|
417
|
+
for (const [index, element] of input.value.entries()) {
|
|
418
|
+
if (element === null && input.elementNullable) continue;
|
|
419
|
+
checkObject(element, input.valueObjectName, `${input.fieldPath}[${index}]`);
|
|
420
|
+
}
|
|
415
421
|
return mismatches;
|
|
416
422
|
}
|
|
417
423
|
if (!isJsonObject(input.value)) {
|
|
@@ -752,6 +758,24 @@ function readTaggedLiteral(literal, support, source) {
|
|
|
752
758
|
}
|
|
753
759
|
};
|
|
754
760
|
}
|
|
761
|
+
function rejectStrictListNullDefault(input) {
|
|
762
|
+
if (input.field.elementOptional) return false;
|
|
763
|
+
for (const arg of input.node.argList()?.args() ?? []) {
|
|
764
|
+
const expression = arg.value();
|
|
765
|
+
const list = expression ? ArrayLiteralAst.cast(expression.syntax) : void 0;
|
|
766
|
+
for (const element of list?.elements() ?? []) {
|
|
767
|
+
const identifier = IdentifierAst.cast(element.syntax);
|
|
768
|
+
if (identifier?.token()?.text !== "null") continue;
|
|
769
|
+
input.diagnostics.push({
|
|
770
|
+
code: "PSL_INVALID_DEFAULT_APPLICABILITY",
|
|
771
|
+
message: `Field "${input.modelName}.${input.field.name}" has strict list elements and cannot use null in a literal list default. Make the element type nullable or remove null from the default.`,
|
|
772
|
+
...diagnosticSource(input.sources, identifier.syntax).at()
|
|
773
|
+
});
|
|
774
|
+
return true;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return false;
|
|
778
|
+
}
|
|
755
779
|
function lowerDefaultForField(input) {
|
|
756
780
|
const node = getAttribute(input.field.attributes, "default")?.node;
|
|
757
781
|
if (node === void 0) return {};
|
|
@@ -777,6 +801,25 @@ function lowerDefaultForField(input) {
|
|
|
777
801
|
});
|
|
778
802
|
if (interpreted === void 0) return {};
|
|
779
803
|
const value = interpreted.value;
|
|
804
|
+
if (Array.isArray(value) && value.includes(null) && rejectStrictListNullDefault({
|
|
805
|
+
...input,
|
|
806
|
+
node
|
|
807
|
+
})) return {};
|
|
808
|
+
if (value === null) {
|
|
809
|
+
if (!input.field.optional) {
|
|
810
|
+
input.diagnostics.push({
|
|
811
|
+
code: "PSL_INVALID_DEFAULT_APPLICABILITY",
|
|
812
|
+
message: `Field "${input.modelName}.${input.fieldName}" is non-nullable and cannot use null as its literal default. Make the field nullable or use a non-null default.`,
|
|
813
|
+
...source.at()
|
|
814
|
+
});
|
|
815
|
+
return {};
|
|
816
|
+
}
|
|
817
|
+
return { defaultValue: {
|
|
818
|
+
kind: "literal",
|
|
819
|
+
value: null,
|
|
820
|
+
canonical: true
|
|
821
|
+
} };
|
|
822
|
+
}
|
|
780
823
|
const readsListElements = (written) => input.isListColumn || input.field.list && written.kind === "list";
|
|
781
824
|
const readAsLiteral = (written) => {
|
|
782
825
|
const lowered = lowerDataTypeDefault({
|
|
@@ -795,12 +838,19 @@ function lowerDefaultForField(input) {
|
|
|
795
838
|
});
|
|
796
839
|
return {};
|
|
797
840
|
}
|
|
841
|
+
let restoredValue = lowered.value;
|
|
842
|
+
if (Array.isArray(value) && value.includes(null) && Array.isArray(lowered.value)) {
|
|
843
|
+
let index = 0;
|
|
844
|
+
const nonNullValues = lowered.value;
|
|
845
|
+
restoredValue = value.map((element) => element === null ? null : nonNullValues[index++] ?? null);
|
|
846
|
+
}
|
|
798
847
|
if (input.valueObjectDefault !== void 0) {
|
|
799
848
|
const mismatches = valueObjectDefaultMismatches({
|
|
800
849
|
fieldPath: `${input.modelName}.${input.fieldName}`,
|
|
801
|
-
value:
|
|
850
|
+
value: restoredValue,
|
|
802
851
|
list: input.field.list,
|
|
803
852
|
nullable: input.field.optional,
|
|
853
|
+
elementNullable: input.field.elementOptional,
|
|
804
854
|
...input.valueObjectDefault,
|
|
805
855
|
codecLookup: input.codecLookup
|
|
806
856
|
});
|
|
@@ -813,7 +863,7 @@ function lowerDefaultForField(input) {
|
|
|
813
863
|
}
|
|
814
864
|
return { defaultValue: {
|
|
815
865
|
kind: "literal",
|
|
816
|
-
value:
|
|
866
|
+
value: restoredValue,
|
|
817
867
|
canonical: true
|
|
818
868
|
} };
|
|
819
869
|
};
|
|
@@ -859,7 +909,7 @@ function lowerDefaultForField(input) {
|
|
|
859
909
|
value
|
|
860
910
|
} };
|
|
861
911
|
if (Array.isArray(value)) {
|
|
862
|
-
const members = value.filter((element) => typeof element === "string");
|
|
912
|
+
const members = value.filter((element) => element === null || typeof element === "string");
|
|
863
913
|
if (members.length === value.length) return { defaultValue: {
|
|
864
914
|
kind: "literal",
|
|
865
915
|
value: members
|
|
@@ -869,6 +919,7 @@ function lowerDefaultForField(input) {
|
|
|
869
919
|
if (Array.isArray(value)) {
|
|
870
920
|
const elements = [];
|
|
871
921
|
for (const element of value) {
|
|
922
|
+
if (element === null) continue;
|
|
872
923
|
const written = writtenElement(element);
|
|
873
924
|
if ("ok" in written) return {};
|
|
874
925
|
elements.push(written);
|
|
@@ -978,6 +1029,16 @@ function lowerEnumDefaultForField(input) {
|
|
|
978
1029
|
});
|
|
979
1030
|
if (interpreted === void 0) return {};
|
|
980
1031
|
const member = interpreted.value;
|
|
1032
|
+
if (Array.isArray(member)) {
|
|
1033
|
+
if (member.includes(null) && rejectStrictListNullDefault({
|
|
1034
|
+
...input,
|
|
1035
|
+
node
|
|
1036
|
+
})) return {};
|
|
1037
|
+
return { defaultValue: {
|
|
1038
|
+
kind: "literal",
|
|
1039
|
+
value: blindCast(member.map((entry) => entry === null ? null : enumHandle.enumMembers.find((candidate) => candidate.name === entry)?.value))
|
|
1040
|
+
} };
|
|
1041
|
+
}
|
|
981
1042
|
invariant(typeof member === "string", "the enum @default grammar admits only member identifiers, so the parsed value is a string");
|
|
982
1043
|
const match = enumHandle.enumMembers.find((m) => m.name === member);
|
|
983
1044
|
if (!match) return {};
|
|
@@ -1099,7 +1160,7 @@ function lowerNoCheckForField(input) {
|
|
|
1099
1160
|
const span = getAttribute(input.field.attributes, "noCheck")?.span ?? input.field.span;
|
|
1100
1161
|
const subject = `Field "${input.model.name}.${input.field.name}"`;
|
|
1101
1162
|
const derivable = [];
|
|
1102
|
-
if (input.isListColumn) derivable.push("elementNotNull");
|
|
1163
|
+
if (input.isListColumn && !input.elementNullable) derivable.push("elementNotNull");
|
|
1103
1164
|
if (input.isDomainEnum) derivable.push("membership");
|
|
1104
1165
|
const authored = [interpreted.first, interpreted.second].filter((kind) => kind === "membership" || kind === "elementNotNull");
|
|
1105
1166
|
if (authored.length === 0) {
|
|
@@ -1114,7 +1175,7 @@ function lowerNoCheckForField(input) {
|
|
|
1114
1175
|
return derivable;
|
|
1115
1176
|
}
|
|
1116
1177
|
for (const kind of authored) if (!derivable.includes(kind)) {
|
|
1117
|
-
const explanation = kind === "membership" ? "membership checks are derived only from enum value sets" : "element-non-null checks are derived only for
|
|
1178
|
+
const explanation = kind === "membership" ? "membership checks are derived only from enum value sets" : "element-non-null checks are derived only for lists whose elements are semantically non-null";
|
|
1118
1179
|
input.diagnostics.push({
|
|
1119
1180
|
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
1120
1181
|
message: `${subject} @noCheck(${kind}) does not apply — ${explanation}`,
|
|
@@ -1338,6 +1399,7 @@ function collectResolvedFields(input) {
|
|
|
1338
1399
|
sources: input.sources,
|
|
1339
1400
|
binder: input.binder,
|
|
1340
1401
|
isListColumn,
|
|
1402
|
+
elementNullable: field.elementOptional,
|
|
1341
1403
|
isDomainEnum: enumHandle !== void 0,
|
|
1342
1404
|
diagnostics
|
|
1343
1405
|
}) : void 0;
|
|
@@ -1354,6 +1416,7 @@ function collectResolvedFields(input) {
|
|
|
1354
1416
|
...ifDefined("uniqueName", uniqueName),
|
|
1355
1417
|
...ifDefined("many", isListField ? true : void 0),
|
|
1356
1418
|
...ifDefined("noCheck", noCheckKinds),
|
|
1419
|
+
...ifDefined("elementNullable", field.elementOptional ? true : void 0),
|
|
1357
1420
|
...ifDefined("valueObjectTypeName", valueObjectName)
|
|
1358
1421
|
});
|
|
1359
1422
|
}
|
|
@@ -2708,6 +2771,7 @@ function buildModelNodeFromPsl(input) {
|
|
|
2708
2771
|
descriptor: resolvedField.descriptor,
|
|
2709
2772
|
nullable: resolvedField.nullable,
|
|
2710
2773
|
...ifDefined("many", resolvedField.many),
|
|
2774
|
+
...ifDefined("elementNullable", resolvedField.many ? resolvedField.elementNullable === true : void 0),
|
|
2711
2775
|
...ifDefined("default", resolvedField.defaultValue),
|
|
2712
2776
|
...ifDefined("executionDefaults", resolvedField.executionDefaults)
|
|
2713
2777
|
};
|
|
@@ -2753,7 +2817,8 @@ function buildValueObjectNodes(input) {
|
|
|
2753
2817
|
const common = {
|
|
2754
2818
|
fieldName: field.name,
|
|
2755
2819
|
nullable: field.optional,
|
|
2756
|
-
...ifDefined("many", field.list ? true : void 0)
|
|
2820
|
+
...ifDefined("many", field.list ? true : void 0),
|
|
2821
|
+
...ifDefined("elementNullable", field.list ? field.elementOptional : void 0)
|
|
2757
2822
|
};
|
|
2758
2823
|
const fieldTypeReference = typeReferenceNode(field);
|
|
2759
2824
|
const fieldTypeResolution = fieldTypeReference === void 0 ? void 0 : binder.symbolForNode(fieldTypeReference);
|
|
@@ -2997,7 +3062,8 @@ function materializeMtiVariantStorageLinks(modelNodes, baseDeclarations, stiVari
|
|
|
2997
3062
|
fieldName: baseField.fieldName,
|
|
2998
3063
|
columnName: pkColumn,
|
|
2999
3064
|
descriptor: baseField.descriptor,
|
|
3000
|
-
nullable: false
|
|
3065
|
+
nullable: false,
|
|
3066
|
+
many: false
|
|
3001
3067
|
});
|
|
3002
3068
|
}
|
|
3003
3069
|
if (linkFields.length === 0) return node;
|
|
@@ -3581,4 +3647,4 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
3581
3647
|
//#endregion
|
|
3582
3648
|
export { interpretPslDocumentToSqlContract as a, resolveFieldTypeDescriptor as c, indexFkRelations as i, buildEntityTypesByDiscriminator as n, normalizeReferentialAction as o, entryForTag as r, readDataTypeDefault as s, applyBackrelationCandidates as t };
|
|
3583
3649
|
|
|
3584
|
-
//# sourceMappingURL=interpreter-
|
|
3650
|
+
//# sourceMappingURL=interpreter-CkCfPqup-DF7bZvNM.mjs.map
|