@prisma/orm-family-sql 8.0.0-rc.18-dev.16 → 8.0.0-rc.18-dev.18
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-DrJ1vHEo.mjs → aggregate-descriptor-registry-Dd7Uj7DJ.mjs} +3 -3
- package/dist/{aggregate-descriptor-registry-DrJ1vHEo.mjs.map → aggregate-descriptor-registry-Dd7Uj7DJ.mjs.map} +1 -1
- package/dist/{ast-BDwGvnKK.mjs → ast-CBO3PEJF.mjs} +73 -47
- package/dist/ast-CBO3PEJF.mjs.map +1 -0
- package/dist/{ast-BoM9T1b2.d.mts → ast-Dzsat0Zb.d.mts} +27 -26
- package/dist/ast-Dzsat0Zb.d.mts.map +1 -0
- package/dist/{attribute-specs-D7EhHD08.d.mts → attribute-specs-2I2xuKEa.d.mts} +4 -3
- package/dist/attribute-specs-2I2xuKEa.d.mts.map +1 -0
- package/dist/{authored-check-naming-CO3GA46Y.mjs → authored-check-naming-CIX7Bbyh.mjs} +3 -3
- package/dist/{authored-check-naming-CO3GA46Y.mjs.map → authored-check-naming-CIX7Bbyh.mjs.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-Cl5erH9X.d.mts.map → authoring-entity-types-CZ-vdwYS-BpyuSxbj.d.mts.map} +1 -1
- package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs} +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-yMnSyGBK.mjs.map → authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map} +1 -1
- package/dist/builder.d.mts +3 -3
- package/dist/builder__runtime.d.mts +7 -7
- package/dist/builder__runtime.mjs +2 -2
- package/dist/builder__types.d.mts +5 -5
- package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs → codec-descriptor-registry-4kw8FPpo.mjs} +2 -2
- package/dist/{codec-descriptor-registry-Bg9OjQf_.mjs.map → codec-descriptor-registry-4kw8FPpo.mjs.map} +1 -1
- package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts} +3 -3
- package/dist/{collection-methods-BnR4UjcW-C_55W2m0.d.mts.map → collection-methods-B-tM7OPZ-v8HK9Txa.d.mts.map} +1 -1
- package/dist/collection-methods-DQAFcGEB.d.mts +1 -0
- package/dist/{config-types-ni1nb_HA.mjs → config-types-ComQZUlA.mjs} +2 -2
- package/dist/{config-types-ni1nb_HA.mjs.map → config-types-ComQZUlA.mjs.map} +1 -1
- package/dist/{contract-builder-CH0AIjsv.d.mts → contract-builder-De_fyZGT.d.mts} +6 -6
- package/dist/{contract-builder-CH0AIjsv.d.mts.map → contract-builder-De_fyZGT.d.mts.map} +1 -1
- package/dist/{contract-builder-CiYVj56_.mjs → contract-builder-fQ3gkIR5.mjs} +5 -5
- package/dist/{contract-builder-CiYVj56_.mjs.map → contract-builder-fQ3gkIR5.mjs.map} +1 -1
- package/dist/contract-emitter.mjs +1 -1
- package/dist/contract-prisma7__provider.d.mts +12 -6
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +48 -43
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +2 -2
- 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__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +2 -2
- package/dist/contract-ts.mjs +4 -4
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +2 -2
- package/dist/contract-ts__contract-builder.mjs +3 -3
- package/dist/contract.d.mts +6 -6
- package/dist/contract.mjs +15 -15
- package/dist/contract__authored-check-naming.mjs +1 -1
- package/dist/contract__data-type-support.d.mts +2 -2
- package/dist/contract__data-type-support.mjs +2 -2
- package/dist/contract__data-type.d.mts +2 -2
- package/dist/contract__data-type.mjs +3 -3
- package/dist/contract__entity-kinds.mjs +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.mjs +1 -1
- package/dist/contract__sql-expression.d.mts +2 -2
- package/dist/contract__sql-expression.mjs +2 -2
- 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-DXqMl_gd.mjs → control-ClahTAD-.mjs} +246 -40
- package/dist/control-ClahTAD-.mjs.map +1 -0
- package/dist/{control-adapter-CkFfBVei-DGf1LihO.d.mts → control-adapter-BCopdpsT-DIHCWbq_.d.mts} +9 -26
- package/dist/control-adapter-BCopdpsT-DIHCWbq_.d.mts.map +1 -0
- package/dist/control-adapter-BsSf5pqM.d.mts +1 -0
- package/dist/{control-CPg4LwJV.d.mts → control-mpACqp72.d.mts} +72 -39
- package/dist/control-mpACqp72.d.mts.map +1 -0
- package/dist/{data-type-CYsho6Yd.d.mts → data-type-B8N33s-_.d.mts} +14 -7
- package/dist/data-type-B8N33s-_.d.mts.map +1 -0
- package/dist/{numeral-text-Cqu87pVe-DJCqBaSC.mjs → data-type-DKk8Unnz.mjs} +2 -2
- package/dist/data-type-DKk8Unnz.mjs.map +1 -0
- package/dist/{data-type-support-CfhpAKLX.mjs → data-type-support-C5-XxxeB.mjs} +11 -24
- package/dist/data-type-support-C5-XxxeB.mjs.map +1 -0
- package/dist/{data-type-support-4TcZuD7d.d.mts → data-type-support-CBcYhSkD.d.mts} +12 -16
- package/dist/data-type-support-CBcYhSkD.d.mts.map +1 -0
- package/dist/{db-BmrN9nRS-CzyybGKR.d.mts → db-BmrN9nRS-xynLbnAy.d.mts} +10 -10
- package/dist/{db-BmrN9nRS-CzyybGKR.d.mts.map → db-BmrN9nRS-xynLbnAy.d.mts.map} +1 -1
- package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts → ddl-types-CoP6yAw9-BDp3W_5g.d.mts} +4 -4
- package/dist/{ddl-types-DtKZjNtN-DWQeO79o.d.mts.map → ddl-types-CoP6yAw9-BDp3W_5g.d.mts.map} +1 -1
- package/dist/{default-mapping-B8_APB1M-CWcTmSQW.d.mts → default-mapping-CEISdj2g-DF1LzGBR.d.mts} +7 -5
- package/dist/default-mapping-CEISdj2g-DF1LzGBR.d.mts.map +1 -0
- package/dist/{derived-checks-Cgx_VgS3-CmFqNFgU.mjs → derived-checks-CrvMQTJF-DlxFFtNM.mjs} +18 -18
- package/dist/derived-checks-CrvMQTJF-DlxFFtNM.mjs.map +1 -0
- package/dist/{diff-CVVGktZG.d.mts → diff-Bd9ILpZL.d.mts} +20 -7
- package/dist/diff-Bd9ILpZL.d.mts.map +1 -0
- package/dist/diff-DZ82XaGR.mjs +21 -0
- package/dist/diff-DZ82XaGR.mjs.map +1 -0
- package/dist/{dist-Cg2lL1hR.mjs → dist-DAHIT4AS.mjs} +2 -2
- package/dist/{dist-Cg2lL1hR.mjs.map → dist-DAHIT4AS.mjs.map} +1 -1
- package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs} +3 -3
- package/dist/{entity-kinds-CQ_jwgYv-HA5t2SE0.mjs.map → entity-kinds-CQ_jwgYv-DoOBWwvX.mjs.map} +1 -1
- package/dist/exports-DVsHk8HP-DrH_2a-H.mjs +2371 -0
- package/dist/exports-DVsHk8HP-DrH_2a-H.mjs.map +1 -0
- package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts → expression-BzrfOiPC-3NqR8UzK.d.mts} +4 -4
- package/dist/{expression-Ck1wys3N-Cdc7eUQS.d.mts.map → expression-BzrfOiPC-3NqR8UzK.d.mts.map} +1 -1
- package/dist/expression-CeerCjQG.d.mts +2 -0
- package/dist/{expression-CNBCbbzU-DOXKUxQs.d.mts → expression-sOY1120I-DOykEQlw.d.mts} +4 -4
- package/dist/expression-sOY1120I-DOykEQlw.d.mts.map +1 -0
- package/dist/{factories-vDQ3S5gW.mjs → factories-DkD3nMYt.mjs} +3 -3
- package/dist/{factories-vDQ3S5gW.mjs.map → factories-DkD3nMYt.mjs.map} +1 -1
- package/dist/family.d.mts +14 -14
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +5 -5
- package/dist/family__control.mjs +4 -4
- package/dist/family__diff.d.mts +1 -2
- package/dist/family__diff.mjs +2 -2
- package/dist/family__ir.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/{foreign-key-materialization-DJ6uhBba.d.mts → foreign-key-materialization-DCaDnUs-.d.mts} +3 -3
- package/dist/{foreign-key-materialization-DJ6uhBba.d.mts.map → foreign-key-materialization-DCaDnUs-.d.mts.map} +1 -1
- package/dist/{foreign-key-materialization-DibQ9Hjg.mjs → foreign-key-materialization-DfNPQL9G.mjs} +4 -4
- package/dist/{foreign-key-materialization-DibQ9Hjg.mjs.map → foreign-key-materialization-DfNPQL9G.mjs.map} +1 -1
- package/dist/{functions-DSwXxsTg.d.mts → functions-Cp8soSAv.d.mts} +3 -3
- package/dist/{functions-DSwXxsTg.d.mts.map → functions-Cp8soSAv.d.mts.map} +1 -1
- package/dist/{index-C8jUgdUh.d.mts → index-BxlXOVeT.d.mts} +30 -23
- package/dist/{index-C8jUgdUh.d.mts.map → index-BxlXOVeT.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs → index-equivalence-DswCiq5l-BsphajRC.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-DlC2yTK1.mjs.map → index-equivalence-DswCiq5l-BsphajRC.mjs.map} +1 -1
- package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs → index-naming-BOcJT1B3-18gQUduD.mjs} +2 -2
- package/dist/{index-naming-BOcJT1B3-CeEoP8t3.mjs.map → index-naming-BOcJT1B3-18gQUduD.mjs.map} +1 -1
- package/dist/index-reference-CWppFpUV.d.mts +1 -0
- package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts → index-reference-DJaQLZA3-DxmYkkX-.d.mts} +3 -3
- package/dist/{index-reference-DJX-CNsb-D5uoBnH_.d.mts.map → index-reference-DJaQLZA3-DxmYkkX-.d.mts.map} +1 -1
- package/dist/{interpreter-CvmBTYyI-DNl-jr2E.mjs → interpreter-CFj2aTEP-BHL3TOqk.mjs} +13 -11
- package/dist/interpreter-CFj2aTEP-BHL3TOqk.mjs.map +1 -0
- package/dist/{ir-D0Vpm5O9.d.mts → ir-DgNo535E.d.mts} +4 -2
- package/dist/ir-DgNo535E.d.mts.map +1 -0
- package/dist/ir-I-xciGUH.mjs.map +1 -1
- package/dist/middleware-IqWk9Eff.d.mts +1 -0
- package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts → middleware-oCT0RWkt-AFlRNCOD.d.mts} +3 -3
- package/dist/{middleware-YsFLC19Y-5mJZCBWq.d.mts.map → middleware-oCT0RWkt-AFlRNCOD.d.mts.map} +1 -1
- package/dist/{migration-ESRa6312.d.mts → migration-lg_VgP_F.d.mts} +2 -2
- package/dist/{migration-ESRa6312.d.mts.map → migration-lg_VgP_F.d.mts.map} +1 -1
- package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs → naming-bM5qm5PY-DdginUhA.mjs} +2 -2
- package/dist/{naming-CT8tRisJ-DLHKo0Hm.mjs.map → naming-bM5qm5PY-DdginUhA.mjs.map} +1 -1
- package/dist/{opaque-sql-BWxbqe5a-GGKfyakq.mjs → opaque-sql-Dset3kln-BzzXoO94.mjs} +3 -3
- package/dist/opaque-sql-Dset3kln-BzzXoO94.mjs.map +1 -0
- package/dist/orm-client.d.mts +28 -60
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +564 -233
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{pack-BtGENS4_.d.mts → pack-CyjyMUN0.d.mts} +3 -3
- package/dist/{pack-BtGENS4_.d.mts.map → pack-CyjyMUN0.d.mts.map} +1 -1
- package/dist/plan-BZpZafiQ.d.mts +2 -0
- package/dist/{plan-cGEaSXHv-yuz43WrR.d.mts → plan-Cbed2eDu-BZM3geSm.d.mts} +3 -3
- package/dist/plan-Cbed2eDu-BZM3geSm.d.mts.map +1 -0
- package/dist/{psl-build-PXVtl8gM.d.mts → psl-build-BHQfP1_C.d.mts} +5 -5
- package/dist/{psl-build-PXVtl8gM.d.mts.map → psl-build-BHQfP1_C.d.mts.map} +1 -1
- package/dist/{psl-build-8bx9WTUt.mjs → psl-build-BsJ6eChh.mjs} +118 -84
- package/dist/psl-build-BsJ6eChh.mjs.map +1 -0
- package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts} +2 -2
- package/dist/{psl-column-resolution-BCkhNzOK-Bbrs_WzK.d.mts.map → psl-column-resolution-BCkhNzOK-mW_8C9vr.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs → psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs} +76 -66
- package/dist/psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map +1 -0
- package/dist/{psl-infer-g040TwAr.d.mts → psl-infer-B6iemK9i.d.mts} +4 -4
- package/dist/{psl-infer-g040TwAr.d.mts.map → psl-infer-B6iemK9i.d.mts.map} +1 -1
- package/dist/{psl-infer-CG0_wra6.mjs → psl-infer-HPi_YMeE.mjs} +2 -2
- package/dist/{psl-infer-CG0_wra6.mjs.map → psl-infer-HPi_YMeE.mjs.map} +1 -1
- package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts} +5 -5
- package/dist/{query-lane-context-C42-u9L1-BSJoP83K.d.mts.map → query-lane-context-BLOPW1rQ-Bn3ugl9a.d.mts.map} +1 -1
- package/dist/query-lane-context-Dpep1Fzy.d.mts +1 -0
- package/dist/relational-core.d.mts +12 -12
- package/dist/relational-core.mjs +2 -2
- package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
- package/dist/relational-core__aggregate-descriptor-registry.mjs +1 -1
- package/dist/relational-core__ast.d.mts +3 -3
- package/dist/relational-core__ast.mjs +2 -2
- package/dist/relational-core__codec-descriptor-registry.d.mts +2 -2
- 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 +3 -3
- package/dist/relational-core__contract-free.mjs +2 -2
- package/dist/relational-core__contract-free.mjs.map +1 -1
- package/dist/relational-core__expression.d.mts +3 -3
- package/dist/relational-core__functions.d.mts +1 -1
- package/dist/relational-core__index-reference.d.mts +2 -2
- 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/runtime.d.mts +5 -5
- package/dist/runtime.mjs +1 -2289
- package/dist/runtime__internal__prepared-query.d.mts +1 -1
- package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts → schema-differ-DmP74bB8-BGA6fzOv.d.mts} +4 -4
- package/dist/{schema-differ-CqWOkoW9-uVU2SdFf.d.mts.map → schema-differ-DmP74bB8-BGA6fzOv.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +2 -2
- package/dist/schema-ir.mjs +2 -2
- package/dist/schema-ir__naming.mjs +1 -1
- package/dist/schema-ir__types.d.mts +3 -3
- package/dist/schema-ir__types.mjs +2 -2
- package/dist/{schema-verify-DIfHSB4I-wt28gB9e.mjs → schema-verify-BwRdzbHb-B9vFrm3T.mjs} +22 -6
- package/dist/schema-verify-BwRdzbHb-B9vFrm3T.mjs.map +1 -0
- package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs → serialized-index-52COq1yV-CUJ2F65u.mjs} +3 -3
- package/dist/{serialized-index-52COq1yV-D8zJP-Xl.mjs.map → serialized-index-52COq1yV-CUJ2F65u.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs → sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs} +12 -7
- package/dist/sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs.map +1 -0
- package/dist/{data-type-DU0mtme5.mjs → sql-data-type-Dabuwxet-BljsNjBu.mjs} +32 -13
- package/dist/sql-data-type-Dabuwxet-BljsNjBu.mjs.map +1 -0
- package/dist/{sql-execution-plan-C7XauPPu-BgBp89vP.d.mts → sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts} +3 -3
- package/dist/sql-execution-plan-Dam5yMZg-Bc_eneSz.d.mts.map +1 -0
- package/dist/{sql-expression-BWrjmY6M.d.mts → sql-expression-BAtH-2UU.d.mts} +6 -6
- package/dist/sql-expression-BAtH-2UU.d.mts.map +1 -0
- package/dist/{sql-expression-DSRILiU2.mjs → sql-expression-BJCuy-WI.mjs} +15 -9
- package/dist/sql-expression-BJCuy-WI.mjs.map +1 -0
- package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs → storage-table-DN36E2yE-0ncS821l.mjs} +2 -2
- package/dist/{storage-table-DN36E2yE-Bm5eKeGw.mjs.map → storage-table-DN36E2yE-0ncS821l.mjs.map} +1 -1
- package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts → transaction-state-DR3nKTmH-n_12DsnU.d.mts} +9 -9
- package/dist/{transaction-state-DR3nKTmH-D5eFB250.d.mts.map → transaction-state-DR3nKTmH-n_12DsnU.d.mts.map} +1 -1
- package/dist/types-BLyhYk6B.d.mts +1 -0
- package/dist/{types-DvhckjSz-Cm0Oodhr.mjs → types-CaVn_xxe-D9WdU3Iy.mjs} +81 -157
- package/dist/types-CaVn_xxe-D9WdU3Iy.mjs.map +1 -0
- package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts → types-Cv5t6_Ly-CcBWTpfM.d.mts} +6 -6
- package/dist/{types-Cl4MLNrS-BXDsTb9U.d.mts.map → types-Cv5t6_Ly-CcBWTpfM.d.mts.map} +1 -1
- package/dist/{types-Sh5HuaZE-BwZNUDEi.d.mts → types-DVaVM20q-B-QcMIOa.d.mts} +9 -20
- package/dist/types-DVaVM20q-B-QcMIOa.d.mts.map +1 -0
- package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts → types-DaYtBAYT-B22gkh5z.d.mts} +5 -5
- package/dist/{types-CzxOObSY-Cq3t_HCe.d.mts.map → types-DaYtBAYT-B22gkh5z.d.mts.map} +1 -1
- package/dist/{types-GS3fwvoX.mjs → types-M_FeBD9w.mjs} +2 -2
- package/dist/{types-GS3fwvoX.mjs.map → types-M_FeBD9w.mjs.map} +1 -1
- package/dist/types-_7TbRpPw.d.mts +1 -0
- package/dist/{types-C-z8HyiZ-1Nhw0pHj.d.mts → types-c1iIhJep-DdMj6TNl.d.mts} +49 -51
- package/dist/types-c1iIhJep-DdMj6TNl.d.mts.map +1 -0
- package/dist/{validators-DlpO67uZ.mjs → validators-Bvfk0aN7.mjs} +14 -11
- package/dist/validators-Bvfk0aN7.mjs.map +1 -0
- package/dist/{validators-R-Wsy5Rr.d.mts → validators-CTZ-hU2l.d.mts} +4 -1
- package/dist/validators-CTZ-hU2l.d.mts.map +1 -0
- package/package.json +18 -18
- package/dist/ast-BDwGvnKK.mjs.map +0 -1
- package/dist/ast-BoM9T1b2.d.mts.map +0 -1
- package/dist/attribute-specs-D7EhHD08.d.mts.map +0 -1
- package/dist/collection-methods-CyUXbXVw.d.mts +0 -1
- package/dist/control-CPg4LwJV.d.mts.map +0 -1
- package/dist/control-DXqMl_gd.mjs.map +0 -1
- package/dist/control-adapter-CkFfBVei-DGf1LihO.d.mts.map +0 -1
- package/dist/control-adapter-DDjgBMy3.d.mts +0 -1
- package/dist/data-type-CYsho6Yd.d.mts.map +0 -1
- package/dist/data-type-DU0mtme5.mjs.map +0 -1
- package/dist/data-type-support-4TcZuD7d.d.mts.map +0 -1
- package/dist/data-type-support-CfhpAKLX.mjs.map +0 -1
- package/dist/default-mapping-B8_APB1M-CWcTmSQW.d.mts.map +0 -1
- package/dist/derived-checks-Cgx_VgS3-CmFqNFgU.mjs.map +0 -1
- package/dist/diff-B16bL_IR.mjs +0 -13
- package/dist/diff-B16bL_IR.mjs.map +0 -1
- package/dist/diff-CVVGktZG.d.mts.map +0 -1
- package/dist/expression-CNBCbbzU-DOXKUxQs.d.mts.map +0 -1
- package/dist/expression-DUYovBa6.d.mts +0 -2
- package/dist/index-reference-DGQdSRjQ.d.mts +0 -1
- package/dist/interpreter-CvmBTYyI-DNl-jr2E.mjs.map +0 -1
- package/dist/ir-D0Vpm5O9.d.mts.map +0 -1
- package/dist/middleware-Bp-R5o9E.d.mts +0 -1
- package/dist/numeral-text-Cqu87pVe-DJCqBaSC.mjs.map +0 -1
- package/dist/opaque-sql-BWxbqe5a-GGKfyakq.mjs.map +0 -1
- package/dist/plan-DdpaNNu1.d.mts +0 -2
- package/dist/plan-cGEaSXHv-yuz43WrR.d.mts.map +0 -1
- package/dist/psl-build-8bx9WTUt.mjs.map +0 -1
- package/dist/psl-field-resolution-SPNDr-jr-CH_gs3Oy.mjs.map +0 -1
- package/dist/query-lane-context-C4xq68Mr.d.mts +0 -1
- package/dist/runtime.mjs.map +0 -1
- package/dist/schema-verify-DIfHSB4I-wt28gB9e.mjs.map +0 -1
- package/dist/sql-contract-serializer-DDaAVCQr-Ba3XOCG6.mjs.map +0 -1
- package/dist/sql-execution-plan-C7XauPPu-BgBp89vP.d.mts.map +0 -1
- package/dist/sql-expression-BWrjmY6M.d.mts.map +0 -1
- package/dist/sql-expression-DSRILiU2.mjs.map +0 -1
- package/dist/types-BSBsW0qR.d.mts +0 -1
- package/dist/types-C-z8HyiZ-1Nhw0pHj.d.mts.map +0 -1
- package/dist/types-CJK7FBdw.d.mts +0 -1
- package/dist/types-DvhckjSz-Cm0Oodhr.mjs.map +0 -1
- package/dist/types-Sh5HuaZE-BwZNUDEi.d.mts.map +0 -1
- package/dist/validators-DlpO67uZ.mjs.map +0 -1
- package/dist/validators-R-Wsy5Rr.d.mts.map +0 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { p as sqlTextFromStored, t as SQL_EXPRESSION_DATA_TYPE_ID } from "./sql-expression-BJCuy-WI.mjs";
|
|
2
|
+
import { d as resolvedTypeParams } from "./types-M_FeBD9w.mjs";
|
|
3
|
+
import { n as checkSqlDefaultText, o as reservedSqlDefaultText } from "./validators-Bvfk0aN7.mjs";
|
|
4
|
+
import { a as storedAsListColumn, i as isValueObjectMember } from "./derived-checks-CrvMQTJF-DlxFFtNM.mjs";
|
|
4
5
|
import { n as getAttribute, o as storageName, t as formatDbAttributeMigrationMessage } from "./psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs";
|
|
5
6
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
6
7
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
7
8
|
import { admittedForms, castTypedValue, describeExpected, describeRefusal, describeRefusedValueType, exactRewrite, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, readWrittenValue, tagForm, validateAuthoringHelperArguments, validateAuthoringTypeParams } from "@prisma/orm-framework/components/authoring";
|
|
8
|
-
import {
|
|
9
|
+
import { codecForRef, dataTypeParams, readContractValue } from "@prisma/orm-framework/components/codec";
|
|
9
10
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
10
11
|
import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
11
12
|
import { FunctionCallAst } from "@prisma/orm-framework/psl-parser/syntax";
|
|
12
13
|
import { invariant } from "@prisma/orm-framework/utils/assertions";
|
|
13
14
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
14
|
-
import { bool, dataTypeValue, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, identifier, interpretAttribute, leafDiagnostic, list, mapArg, modelAttribute, nodePslSpan, numLiteral, oneOf, optional, record, referencedFieldRef, str, taggedLiteral, typeReferenceNode, writtenList, writtenScalar } from "@prisma/orm-framework/psl-parser";
|
|
15
|
+
import { bool, contributedTypeOf, dataTypeValue, diagnosticSource, entityRef, fieldAttribute, fieldRef, funcCall, identifier, interpretAttribute, leafDiagnostic, list, mapArg, modelAttribute, nodePslSpan, numLiteral, oneOf, optional, record, referencedFieldRef, str, taggedLiteral, typeReferenceNode, writtenList, writtenScalar } from "@prisma/orm-framework/psl-parser";
|
|
15
16
|
import { describeTaggedLiteralFailure as describeTaggedLiteralFailure$1 } from "@prisma/orm-framework/components/control";
|
|
16
17
|
import { instantiatePslFieldPreset, isBareTypeConstructor, mapPslHelperArgs, reportPresetNotCalled, reportTypeConstructorNotCalled } from "@prisma/orm-framework/psl-parser/interpret";
|
|
17
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-
|
|
18
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-field-resolution-o9sXqIlE.mjs
|
|
18
19
|
function contractError(code, message, options) {
|
|
19
20
|
return structuredError(code, message, options);
|
|
20
21
|
}
|
|
21
|
-
/** A written value the column's codec refuses. */
|
|
22
|
+
/** A written value the column's type, under the column's parameters, or the column's codec refuses. */
|
|
22
23
|
const PSL_INVALID_DEFAULT_LITERAL = "PSL_INVALID_DEFAULT_LITERAL";
|
|
23
24
|
/** A written value whose data type the receiving type neither is nor casts from. */
|
|
24
25
|
const PSL_VALUE_TYPE_INCOMPATIBLE = "PSL_VALUE_TYPE_INCOMPATIBLE";
|
|
@@ -48,32 +49,8 @@ function readOneValue(dataTypes, written, elementIndex, suggestedTypes) {
|
|
|
48
49
|
function codecRefTypeParams(typeParams) {
|
|
49
50
|
return typeParams === void 0 ? void 0 : blindCast(typeParams);
|
|
50
51
|
}
|
|
51
|
-
/** A value in the canonical form of the column's values, when they have one. */
|
|
52
|
-
function inCanonicalForm(toCanonicalForm, value, elementIndex, suggestedTypes) {
|
|
53
|
-
if (toCanonicalForm === void 0) return {
|
|
54
|
-
ok: true,
|
|
55
|
-
value
|
|
56
|
-
};
|
|
57
|
-
try {
|
|
58
|
-
return {
|
|
59
|
-
ok: true,
|
|
60
|
-
value: toCanonicalForm(value)
|
|
61
|
-
};
|
|
62
|
-
} catch (error) {
|
|
63
|
-
if (isInternalError(error)) throw error;
|
|
64
|
-
return {
|
|
65
|
-
ok: false,
|
|
66
|
-
refusal: {
|
|
67
|
-
kind: "unreadable",
|
|
68
|
-
message: messageOf(error),
|
|
69
|
-
elementIndex
|
|
70
|
-
},
|
|
71
|
-
suggestedTypes
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
52
|
/**
|
|
76
|
-
* The column's codec descriptor, and `read`, which
|
|
53
|
+
* The column's codec descriptor, and `read`, which makes a value in its stored JSON form a value of the column's type under the column's parameters, and checks it with the column's codec, built with those parameters.
|
|
77
54
|
*/
|
|
78
55
|
function storedValueReader(input) {
|
|
79
56
|
const descriptor = input.codecLookup.descriptorFor(input.column.codecId);
|
|
@@ -83,16 +60,19 @@ function storedValueReader(input) {
|
|
|
83
60
|
});
|
|
84
61
|
if (codec === void 0 || descriptor === void 0) throw new InternalError(`Field "${input.fieldPath}": no codec descriptor is registered for "${input.column.codecId}", but the column was resolved from one.`);
|
|
85
62
|
const suggestedTypes = [descriptor.dataType];
|
|
86
|
-
const
|
|
63
|
+
const params = dataTypeParams(codec.dataType, input.column.typeParams);
|
|
87
64
|
const read = (written, elementIndex) => {
|
|
65
|
+
let stored;
|
|
88
66
|
try {
|
|
89
|
-
codec.
|
|
67
|
+
const value = codec.dataType.valueFrom(written, params);
|
|
68
|
+
codec.fromDataTypeValue(value);
|
|
69
|
+
stored = codec.dataType.toContract(value);
|
|
90
70
|
} catch (error) {
|
|
91
71
|
if (isInternalError(error)) throw error;
|
|
92
72
|
return {
|
|
93
73
|
ok: false,
|
|
94
74
|
refusal: {
|
|
95
|
-
kind: "refused-by-
|
|
75
|
+
kind: "refused-by-column",
|
|
96
76
|
codecId: input.column.codecId,
|
|
97
77
|
message: messageOf(error),
|
|
98
78
|
elementIndex
|
|
@@ -100,15 +80,19 @@ function storedValueReader(input) {
|
|
|
100
80
|
suggestedTypes
|
|
101
81
|
};
|
|
102
82
|
}
|
|
103
|
-
return
|
|
83
|
+
return {
|
|
84
|
+
ok: true,
|
|
85
|
+
value: stored
|
|
86
|
+
};
|
|
104
87
|
};
|
|
105
88
|
return {
|
|
106
89
|
descriptor,
|
|
90
|
+
params,
|
|
107
91
|
read
|
|
108
92
|
};
|
|
109
93
|
}
|
|
110
94
|
/**
|
|
111
|
-
* Reads a value already in its stored JSON form, such as one member of a JSON document default,
|
|
95
|
+
* Reads a value already in its stored JSON form, such as one member of a JSON document default, as a value of the column's type checked by the column's codec. Worded as {@link lowerDataTypeDefault} words the same refusals.
|
|
112
96
|
*/
|
|
113
97
|
function readStoredValue(input) {
|
|
114
98
|
const reading = storedValueReader(input).read(input.value, void 0);
|
|
@@ -124,7 +108,7 @@ function readStoredValue(input) {
|
|
|
124
108
|
* its type's list cast — which is how `pgvector.Vector(3) @default([0.1, 0.2])` is read.
|
|
125
109
|
*/
|
|
126
110
|
function readDataTypeDefault(input) {
|
|
127
|
-
const { descriptor, read: readStored } = storedValueReader({
|
|
111
|
+
const { descriptor, params, read: readStored } = storedValueReader({
|
|
128
112
|
...input,
|
|
129
113
|
dataTypeLookup: input.dataTypes.lookup
|
|
130
114
|
});
|
|
@@ -133,11 +117,19 @@ function readDataTypeDefault(input) {
|
|
|
133
117
|
const readOne = (written, elementIndex) => {
|
|
134
118
|
const read = readOneValue(input.dataTypes, written, elementIndex, suggestedTypes);
|
|
135
119
|
if (!read.ok) return read;
|
|
136
|
-
const cast = castTypedValue(input.dataTypes, columnType, read.typed);
|
|
137
|
-
if (!cast.ok)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
120
|
+
const cast = castTypedValue(input.dataTypes, columnType, params, read.typed);
|
|
121
|
+
if (!cast.ok) {
|
|
122
|
+
const { failure } = cast;
|
|
123
|
+
return failure.kind === "refused-by-type" ? refused({
|
|
124
|
+
kind: "refused-by-column",
|
|
125
|
+
codecId: input.column.codecId,
|
|
126
|
+
message: failure.message,
|
|
127
|
+
elementIndex
|
|
128
|
+
}, suggestedTypes) : refused({
|
|
129
|
+
...failure,
|
|
130
|
+
elementIndex
|
|
131
|
+
}, suggestedTypes);
|
|
132
|
+
}
|
|
141
133
|
return readStored(cast.value.value, elementIndex);
|
|
142
134
|
};
|
|
143
135
|
if (input.written.kind !== "list") {
|
|
@@ -225,7 +217,7 @@ function formsOf(dataTypes, types) {
|
|
|
225
217
|
function rewriteOf(refusal, written, dataTypes) {
|
|
226
218
|
if (refusal.kind !== "no-cast") return void 0;
|
|
227
219
|
const refused = refusal.elementIndex === void 0 || written.kind !== "list" ? written : written.elements[refusal.elementIndex];
|
|
228
|
-
return refused === void 0 || refused.kind === "list" ? void 0 : exactRewrite(dataTypes, refusal
|
|
220
|
+
return refused === void 0 || refused.kind === "list" ? void 0 : exactRewrite(dataTypes, refusal, refused);
|
|
229
221
|
}
|
|
230
222
|
/**
|
|
231
223
|
* {@link readDataTypeDefault} worded as a PSL diagnostic's code, message and span: a cast-rule
|
|
@@ -285,7 +277,7 @@ function codecRefusalMessage(refusal, subject) {
|
|
|
285
277
|
};
|
|
286
278
|
}
|
|
287
279
|
function storedRefusalMessage(refusal, subject) {
|
|
288
|
-
if (refusal.kind === "refused-by-
|
|
280
|
+
if (refusal.kind === "refused-by-column") return codecRefusalMessage(refusal, subject);
|
|
289
281
|
return {
|
|
290
282
|
code: "PSL_INVALID_LITERAL",
|
|
291
283
|
message: `${location(subject, refusal.elementIndex)}: ${refusal.message}`
|
|
@@ -299,7 +291,7 @@ function refusalMessage(refusal, subject, dataTypes, guidance) {
|
|
|
299
291
|
code: PSL_DEFAULT_LIST_EXPECTED,
|
|
300
292
|
message: `${where}: this column holds a list, so its default is a list literal, as in [1, 2]`
|
|
301
293
|
};
|
|
302
|
-
case "refused-by-
|
|
294
|
+
case "refused-by-column": return codecRefusalMessage(refusal, subject);
|
|
303
295
|
case "no-list-cast": return {
|
|
304
296
|
code: PSL_VALUE_TYPE_INCOMPATIBLE,
|
|
305
297
|
message: `${where}: ${describeExpected(guidance.forms)}; got a list`
|
|
@@ -320,7 +312,7 @@ function refusalMessage(refusal, subject, dataTypes, guidance) {
|
|
|
320
312
|
function refusalSpan(refusal, spans, fieldPath) {
|
|
321
313
|
switch (refusal.kind) {
|
|
322
314
|
case "not-a-list":
|
|
323
|
-
case "refused-by-
|
|
315
|
+
case "refused-by-column": return spans.attribute;
|
|
324
316
|
default: return writtenValueSpan(spans, refusal.elementIndex, fieldPath);
|
|
325
317
|
}
|
|
326
318
|
}
|
|
@@ -454,32 +446,44 @@ function defaultFunctionArm(name, signature) {
|
|
|
454
446
|
call
|
|
455
447
|
}));
|
|
456
448
|
}
|
|
457
|
-
|
|
449
|
+
/** The data type of the column a field declares, when its type, or the named type it is declared with, is a constructor or preset the stack knows. */
|
|
450
|
+
function receivingDataType(ctx) {
|
|
451
|
+
const typeConstructor = ctx.typeConstructor;
|
|
452
|
+
return typeConstructor === void 0 ? void 0 : ctx.dataTypes.dataTypeOfCodec(typeConstructor.descriptor.output.codecId);
|
|
453
|
+
}
|
|
454
|
+
/** Whether a value of `type` can be written for a column of `receiving`: it is that type, or the column's type casts from it. An unknown column takes every type. */
|
|
455
|
+
function receives(dataTypes, receiving, type) {
|
|
456
|
+
if (receiving === void 0 || type === receiving) return true;
|
|
457
|
+
const receivingType = dataTypes.lookup.get(receiving);
|
|
458
|
+
if (receivingType === void 0) return true;
|
|
459
|
+
return Object.hasOwn(receivingType.casts, type) || (receivingType.listCast?.of.some((of) => of === type) ?? false);
|
|
460
|
+
}
|
|
461
|
+
function scalarDefaultArms(isList, receiving, dataTypes, defaultFunctionRegistry) {
|
|
458
462
|
const tagArms = (admits) => {
|
|
459
463
|
const tagsByDocumentation = /* @__PURE__ */ new Map();
|
|
460
|
-
for (const [
|
|
461
|
-
if (entry.written.kind !== "tag" || !admits(
|
|
464
|
+
for (const [key, entry] of Object.entries(dataTypes.entries)) {
|
|
465
|
+
if (entry.written.kind !== "tag" || !admits(key)) continue;
|
|
462
466
|
const tags = tagsByDocumentation.get(entry.documentation);
|
|
463
467
|
if (tags === void 0) tagsByDocumentation.set(entry.documentation, [entry.written.tag]);
|
|
464
468
|
else tags.push(entry.written.tag);
|
|
465
469
|
}
|
|
466
470
|
return [...tagsByDocumentation].map(([documentation, tags]) => writtenScalar(taggedLiteral(tags, { documentation })));
|
|
467
471
|
};
|
|
468
|
-
const
|
|
469
|
-
const literal = () => oneOf(writtenScalar(str()), writtenScalar(numLiteral()), writtenScalar(bool()), nullLiteral(), ...tagArms((dataType) => dataType !== SQL_EXPRESSION_DATA_TYPE_ID));
|
|
472
|
+
const columnTags = () => tagArms((dataType) => dataType === SQL_EXPRESSION_DATA_TYPE_ID || !isList && receives(dataTypes, receiving, dataType));
|
|
473
|
+
const literal = () => oneOf(writtenScalar(str()), writtenScalar(numLiteral()), writtenScalar(bool()), nullLiteral(), ...tagArms((dataType) => dataType !== SQL_EXPRESSION_DATA_TYPE_ID && receives(dataTypes, receiving, dataType)));
|
|
470
474
|
const listArm = () => writtenList(literal());
|
|
471
475
|
const funcArms = [...defaultFunctionRegistry.entries()].map(([name, entry]) => defaultFunctionArm(name, blindCast(entry.signature)));
|
|
472
476
|
return isList ? [
|
|
473
477
|
listArm(),
|
|
474
478
|
...funcArms,
|
|
475
|
-
...
|
|
479
|
+
...columnTags()
|
|
476
480
|
] : [
|
|
477
481
|
writtenScalar(str()),
|
|
478
482
|
writtenScalar(numLiteral()),
|
|
479
483
|
writtenScalar(bool()),
|
|
480
484
|
nullLiteral(),
|
|
481
485
|
...funcArms,
|
|
482
|
-
...
|
|
486
|
+
...columnTags(),
|
|
483
487
|
listArm()
|
|
484
488
|
];
|
|
485
489
|
}
|
|
@@ -535,7 +539,7 @@ function defaultFieldSpec(ctx) {
|
|
|
535
539
|
documentation: "Supplies a default value when this field is omitted from a mutation.",
|
|
536
540
|
positional: [{
|
|
537
541
|
key: "value",
|
|
538
|
-
type: defaultValueArm(members === void 0 ? scalarDefaultArms(ctx.field.list, ctx.dataTypes, ctx.defaultFunctionRegistry) : enumDefaultArms(members, ctx.field.typeName, ctx.field.list), ctx.defaultFunctionRegistry),
|
|
542
|
+
type: defaultValueArm(members === void 0 ? scalarDefaultArms(ctx.field.list, receivingDataType(ctx), ctx.dataTypes, ctx.defaultFunctionRegistry) : enumDefaultArms(members, ctx.field.typeName, ctx.field.list), ctx.defaultFunctionRegistry),
|
|
539
543
|
documentation: "A literal, enum member, or registered default function compatible with this field."
|
|
540
544
|
}]
|
|
541
545
|
});
|
|
@@ -668,7 +672,7 @@ function checkModelSpec(ctx) {
|
|
|
668
672
|
},
|
|
669
673
|
refine: (value, ctx, attributeNode) => {
|
|
670
674
|
const diagnostics = [];
|
|
671
|
-
if (
|
|
675
|
+
if (sqlTextFromStored(value.expression.value.value).trim().length === 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, "`@@check` expression must not be empty — an empty predicate is not a constraint", PSL_CHECK_EXPRESSION_EMPTY));
|
|
672
676
|
if (value.name === void 0 && value.map === void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, "`@@check` requires a `name` or `map` argument (a default name cannot be derived — a check has no column tuple to name itself after)", PSL_CHECK_REQUIRES_NAME_OR_MAP));
|
|
673
677
|
if (value.name !== void 0 && value.map !== void 0) diagnostics.push(leafDiagnostic(ctx, attributeNode, "`@@check` takes at most one of `name` and `map`", PSL_CHECK_NAME_XOR_MAP));
|
|
674
678
|
return diagnostics;
|
|
@@ -774,11 +778,13 @@ function modelSpecContext(input) {
|
|
|
774
778
|
}
|
|
775
779
|
function fieldSpecContext(input) {
|
|
776
780
|
const node = typeReferenceNode(input.field);
|
|
781
|
+
const typeResolution = node === void 0 ? void 0 : input.binder.symbolForNode(node);
|
|
777
782
|
return {
|
|
778
783
|
symbols: input.symbols,
|
|
779
784
|
model: input.model,
|
|
780
785
|
field: input.field,
|
|
781
|
-
typeResolution
|
|
786
|
+
typeResolution,
|
|
787
|
+
typeConstructor: contributedTypeOf(typeResolution, input.binder),
|
|
782
788
|
defaultFunctionRegistry: input.defaultFunctionRegistry,
|
|
783
789
|
dataTypes: input.dataTypes
|
|
784
790
|
};
|
|
@@ -819,7 +825,7 @@ function valueObjectDefaultDocument(input) {
|
|
|
819
825
|
const document = input.stored.map((element) => readDocument(codec, element));
|
|
820
826
|
return {
|
|
821
827
|
document,
|
|
822
|
-
stored: codec.
|
|
828
|
+
stored: codec.dataType.toContract(codec.toDataTypeValue(document))
|
|
823
829
|
};
|
|
824
830
|
}
|
|
825
831
|
return {
|
|
@@ -830,7 +836,7 @@ function valueObjectDefaultDocument(input) {
|
|
|
830
836
|
/** The column's codec has already read `stored` while the default was lowered, so it reads again. */
|
|
831
837
|
function readDocument(codec, stored) {
|
|
832
838
|
if (stored === null) return null;
|
|
833
|
-
return blindCast(codec
|
|
839
|
+
return blindCast(readContractValue(codec, stored, void 0));
|
|
834
840
|
}
|
|
835
841
|
/** Each way the default does not match the composite type. */
|
|
836
842
|
function valueObjectDefaultMismatches(input) {
|
|
@@ -923,7 +929,7 @@ function enumValueMismatch(value, member, path, codecLookup) {
|
|
|
923
929
|
const handle = member.enumTypeHandle;
|
|
924
930
|
if (handle === void 0) return void 0;
|
|
925
931
|
const codec = codecLookup.get(handle.codecId);
|
|
926
|
-
const stored = handle.values.map((enumValue) => codec === void 0 ? enumValue : codec.
|
|
932
|
+
const stored = handle.values.map((enumValue) => codec === void 0 ? enumValue : codec.dataType.toContract(codec.toDataTypeValue(enumValue)));
|
|
927
933
|
if (stored.some((storedValue) => storedValue === value)) return void 0;
|
|
928
934
|
return {
|
|
929
935
|
code: PSL_INVALID_DEFAULT_LITERAL,
|
|
@@ -1332,7 +1338,7 @@ function lowerDefaultForField(input) {
|
|
|
1332
1338
|
return { defaultValue: {
|
|
1333
1339
|
kind: "literal",
|
|
1334
1340
|
value: null,
|
|
1335
|
-
|
|
1341
|
+
inStoredForm: true
|
|
1336
1342
|
} };
|
|
1337
1343
|
}
|
|
1338
1344
|
if (value.kind === "list" && rejectStrictListNullDefault({
|
|
@@ -1347,7 +1353,10 @@ function lowerDefaultForField(input) {
|
|
|
1347
1353
|
spans,
|
|
1348
1354
|
sourceElementIndexes,
|
|
1349
1355
|
isList: readsListElements(written),
|
|
1350
|
-
column:
|
|
1356
|
+
column: {
|
|
1357
|
+
codecId: input.columnDescriptor.codecId,
|
|
1358
|
+
typeParams: input.columnTypeParams
|
|
1359
|
+
},
|
|
1351
1360
|
codecLookup: input.codecLookup,
|
|
1352
1361
|
dataTypes: input.dataTypes,
|
|
1353
1362
|
fieldPath: `${input.modelName}.${input.fieldName}`
|
|
@@ -1392,13 +1401,13 @@ function lowerDefaultForField(input) {
|
|
|
1392
1401
|
return { defaultValue: {
|
|
1393
1402
|
kind: "literal",
|
|
1394
1403
|
value: stored,
|
|
1395
|
-
|
|
1404
|
+
inStoredForm: true
|
|
1396
1405
|
} };
|
|
1397
1406
|
}
|
|
1398
1407
|
return { defaultValue: {
|
|
1399
1408
|
kind: "literal",
|
|
1400
1409
|
value: restoredValue,
|
|
1401
|
-
|
|
1410
|
+
inStoredForm: true
|
|
1402
1411
|
} };
|
|
1403
1412
|
};
|
|
1404
1413
|
const canonicalized = (scalar) => {
|
|
@@ -1472,7 +1481,7 @@ function lowerDefaultForField(input) {
|
|
|
1472
1481
|
};
|
|
1473
1482
|
if (written.kind !== "tag") return readAsLiteral(written, spans);
|
|
1474
1483
|
const read = readWrittenValue(input.dataTypes, written);
|
|
1475
|
-
if (read.ok && read.value.type === SQL_EXPRESSION_DATA_TYPE_ID) return sqlExpressionDefault(
|
|
1484
|
+
if (read.ok && read.value.type === SQL_EXPRESSION_DATA_TYPE_ID) return sqlExpressionDefault(sqlTextFromStored(read.value.value), value.span);
|
|
1476
1485
|
return readAsLiteral(written, spans);
|
|
1477
1486
|
}
|
|
1478
1487
|
const { call } = value;
|
|
@@ -1748,6 +1757,7 @@ function collectResolvedFields(input) {
|
|
|
1748
1757
|
sources: input.sources,
|
|
1749
1758
|
binder: input.binder,
|
|
1750
1759
|
columnDescriptor: descriptor,
|
|
1760
|
+
columnTypeParams: resolvedTypeParams(descriptor, input.namedTypes),
|
|
1751
1761
|
isListColumn,
|
|
1752
1762
|
valueObjectDefault: valueObjectName === void 0 ? void 0 : {
|
|
1753
1763
|
valueObjectName,
|
|
@@ -1853,4 +1863,4 @@ function collectResolvedFields(input) {
|
|
|
1853
1863
|
//#endregion
|
|
1854
1864
|
export { resolveFieldTypeDescriptor as _, describeUnsupportedSqlAttribute as a, instantiateFieldTypeConstructor as c, interpretModelAttribute as d, modelAttributeSpecsFrom as f, readWrittenNumberForCodec as g, readDataTypeDefault as h, contractError as i, instantiatePslTypeConstructor as l, modelSpecContext as m, bareTypeConstructorOf as n, fieldSpecContext as o, modelCoordinateKey as p, collectResolvedFields as r, getAuthoringEntity as s, PSL_CHECK_ON_STI_VARIANT as t, interpretFieldAttribute as u, sqlAttributeSpecs as v, toNamedTypeFieldDescriptor as y };
|
|
1855
1865
|
|
|
1856
|
-
//# sourceMappingURL=psl-field-resolution-
|
|
1866
|
+
//# sourceMappingURL=psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map
|