@prisma/orm-family-sql 8.0.0-rc.11-dev.41 → 8.0.0-rc.11-dev.43

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.
Files changed (168) hide show
  1. package/dist/{ast-BHZ0g4iL.d.mts → ast-d2-iNoEs.d.mts} +72 -10
  2. package/dist/ast-d2-iNoEs.d.mts.map +1 -0
  3. package/dist/{ast-C8jX7HNs.mjs → ast-um6jG7BL.mjs} +129 -8
  4. package/dist/ast-um6jG7BL.mjs.map +1 -0
  5. package/dist/{authoring-type-constructors-C1ogrr_x-BeSS93gc.mjs → authoring-type-constructors-C1ogrr_x-VWDkCaSq.mjs} +2 -2
  6. package/dist/{authoring-type-constructors-C1ogrr_x-BeSS93gc.mjs.map → authoring-type-constructors-C1ogrr_x-VWDkCaSq.mjs.map} +1 -1
  7. package/dist/builder.d.mts +2 -2
  8. package/dist/builder__runtime.d.mts +8 -8
  9. package/dist/builder__types.d.mts +2 -2
  10. package/dist/{config-types-C-rrJ_8P.d.mts → config-types-Bd3ud-mX.d.mts} +3 -3
  11. package/dist/{config-types-C-rrJ_8P.d.mts.map → config-types-Bd3ud-mX.d.mts.map} +1 -1
  12. package/dist/{config-types-B98UYjF0.mjs → config-types-fwqTEhK6.mjs} +2 -2
  13. package/dist/{config-types-B98UYjF0.mjs.map → config-types-fwqTEhK6.mjs.map} +1 -1
  14. package/dist/{contract-builder-DV-DZX4h.d.mts → contract-builder-BHCjHphC.d.mts} +12 -5
  15. package/dist/{contract-builder-DV-DZX4h.d.mts.map → contract-builder-BHCjHphC.d.mts.map} +1 -1
  16. package/dist/{contract-builder-BCqPVNbs.mjs → contract-builder-BgWPuVYv.mjs} +2 -2
  17. package/dist/{contract-builder-BCqPVNbs.mjs.map → contract-builder-BgWPuVYv.mjs.map} +1 -1
  18. package/dist/contract-prisma7__provider.d.mts +1 -1
  19. package/dist/contract-prisma7__provider.mjs +118 -48
  20. package/dist/contract-prisma7__provider.mjs.map +1 -1
  21. package/dist/contract-psl.d.mts +10 -6
  22. package/dist/contract-psl.d.mts.map +1 -1
  23. package/dist/contract-psl.mjs +1 -1
  24. package/dist/contract-psl__attribute-specs.d.mts +3 -2
  25. package/dist/contract-psl__attribute-specs.d.mts.map +1 -1
  26. package/dist/contract-psl__attribute-specs.mjs +1 -1
  27. package/dist/contract-psl__provider.d.mts +1 -1
  28. package/dist/contract-psl__provider.mjs +3 -2
  29. package/dist/contract-psl__provider.mjs.map +1 -1
  30. package/dist/contract-ts.d.mts +3 -3
  31. package/dist/contract-ts.mjs +3 -3
  32. package/dist/contract-ts__config-types.d.mts +1 -1
  33. package/dist/contract-ts__config-types.mjs +1 -1
  34. package/dist/contract-ts__contract-builder.d.mts +2 -2
  35. package/dist/contract-ts__contract-builder.mjs +2 -2
  36. package/dist/contract.d.mts +5 -5
  37. package/dist/contract__factories.d.mts +1 -1
  38. package/dist/contract__index-type-validation.d.mts +1 -1
  39. package/dist/contract__types.d.mts +2 -2
  40. package/dist/contract__validators.d.mts +1 -1
  41. package/dist/{control-Cijy1SHG.mjs → control-Ber3kz3q.mjs} +11 -6
  42. package/dist/{control-Cijy1SHG.mjs.map → control-Ber3kz3q.mjs.map} +1 -1
  43. package/dist/{control-C9oCqe39.d.mts → control-CkJbZTUB.d.mts} +20 -17
  44. package/dist/control-CkJbZTUB.d.mts.map +1 -0
  45. package/dist/{control-adapter-C99J7aEF-B2G4GA5s.d.mts → control-adapter-C99J7aEF-DwFChl8n.d.mts} +8 -8
  46. package/dist/{control-adapter-C99J7aEF-B2G4GA5s.d.mts.map → control-adapter-C99J7aEF-DwFChl8n.d.mts.map} +1 -1
  47. package/dist/control-adapter-DPWKLNdH.d.mts +1 -0
  48. package/dist/{db-BhQdL6Za-Dod07quT.d.mts → db-BhQdL6Za-BBgu_awF.d.mts} +8 -8
  49. package/dist/{db-BhQdL6Za-Dod07quT.d.mts.map → db-BhQdL6Za-BBgu_awF.d.mts.map} +1 -1
  50. package/dist/{ddl-types-BGdnAbXo-DKPHPUGx.mjs → ddl-types-DOgOmDOh-Cs_MY05h.mjs} +2 -2
  51. package/dist/{ddl-types-BGdnAbXo-DKPHPUGx.mjs.map → ddl-types-DOgOmDOh-Cs_MY05h.mjs.map} +1 -1
  52. package/dist/{ddl-types-Biy7miT--CSyPnOHq.d.mts → ddl-types-DrK8E0jL-ClX_UkVh.d.mts} +4 -4
  53. package/dist/{ddl-types-Biy7miT--CSyPnOHq.d.mts.map → ddl-types-DrK8E0jL-ClX_UkVh.d.mts.map} +1 -1
  54. package/dist/{derived-checks-C4BPtrnO-B9MQRh6W.mjs → derived-checks-6WZKIUxH-B3Pd6QA5.mjs} +30 -12
  55. package/dist/derived-checks-6WZKIUxH-B3Pd6QA5.mjs.map +1 -0
  56. package/dist/{derived-checks-DPdD01O0-DCKdvxNK.d.mts → derived-checks-DPdD01O0-DNBs1ZDA.d.mts} +2 -2
  57. package/dist/{derived-checks-DPdD01O0-DCKdvxNK.d.mts.map → derived-checks-DPdD01O0-DNBs1ZDA.d.mts.map} +1 -1
  58. package/dist/{diff-CwozLSiO.d.mts → diff-C9tzE_nE.d.mts} +7 -7
  59. package/dist/{diff-CwozLSiO.d.mts.map → diff-C9tzE_nE.d.mts.map} +1 -1
  60. package/dist/{expression-CTADTPZW.d.mts → expression-CAJjmssr.d.mts} +6 -6
  61. package/dist/{expression-CTADTPZW.d.mts.map → expression-CAJjmssr.d.mts.map} +1 -1
  62. package/dist/{factories-B9PfKd5k.d.mts → factories-P3qBQhO-.d.mts} +2 -2
  63. package/dist/{factories-B9PfKd5k.d.mts.map → factories-P3qBQhO-.d.mts.map} +1 -1
  64. package/dist/family.d.mts +11 -11
  65. package/dist/family.mjs +2 -2
  66. package/dist/family__control-adapter.d.mts +2 -2
  67. package/dist/family__control.d.mts +4 -4
  68. package/dist/family__control.mjs +1 -1
  69. package/dist/family__diff.d.mts +2 -2
  70. package/dist/family__ir.d.mts +1 -1
  71. package/dist/family__migration.d.mts +1 -1
  72. package/dist/family__pack.d.mts +1 -1
  73. package/dist/family__pack.d.mts.map +1 -1
  74. package/dist/family__pack.mjs +2 -2
  75. package/dist/family__psl-infer.d.mts +1 -1
  76. package/dist/family__psl-infer.mjs +1 -1
  77. package/dist/family__runtime.d.mts +1 -1
  78. package/dist/{index-C6_--MKi.d.mts → index-CLAshwKN.d.mts} +3 -3
  79. package/dist/{index-C6_--MKi.d.mts.map → index-CLAshwKN.d.mts.map} +1 -1
  80. package/dist/{index-CA_WLNy1.d.mts → index-DI6YpxCw.d.mts} +10 -10
  81. package/dist/{index-CA_WLNy1.d.mts.map → index-DI6YpxCw.d.mts.map} +1 -1
  82. package/dist/{index-type-validation-BFiTwZub.d.mts → index-type-validation-CZ5L2lli.d.mts} +2 -2
  83. package/dist/{index-type-validation-BFiTwZub.d.mts.map → index-type-validation-CZ5L2lli.d.mts.map} +1 -1
  84. package/dist/{interpreter-Bf7Um__3-DC_thY44.mjs → interpreter-DvKii7Bl-D8Ipte3f.mjs} +463 -104
  85. package/dist/interpreter-DvKii7Bl-D8Ipte3f.mjs.map +1 -0
  86. package/dist/{ir-CodnAisu.d.mts → ir-BJ-dsbe-.d.mts} +2 -2
  87. package/dist/{ir-CodnAisu.d.mts.map → ir-BJ-dsbe-.d.mts.map} +1 -1
  88. package/dist/{middleware-0yjzaoBT-BqmCD6Dt.d.mts → middleware-CHg6zJkn-DJAKnDpd.d.mts} +3 -3
  89. package/dist/{middleware-0yjzaoBT-BqmCD6Dt.d.mts.map → middleware-CHg6zJkn-DJAKnDpd.d.mts.map} +1 -1
  90. package/dist/middleware-wyJe8dVq.d.mts +1 -0
  91. package/dist/{migration-CniGZoFt.d.mts → migration-BQWwBE8Q.d.mts} +3 -3
  92. package/dist/{migration-CniGZoFt.d.mts.map → migration-BQWwBE8Q.d.mts.map} +1 -1
  93. package/dist/operations.d.mts +1 -1
  94. package/dist/orm-client.d.mts +13 -13
  95. package/dist/orm-client.mjs +1 -1
  96. package/dist/{plan-Bs-Pdirc-BCy94--G.d.mts → plan-DVkrl9Pq-DOf_eQ84.d.mts} +4 -4
  97. package/dist/plan-DVkrl9Pq-DOf_eQ84.d.mts.map +1 -0
  98. package/dist/plan-Dzq6Nwb4.d.mts +2 -0
  99. package/dist/{prepared-statement-DZtymlzd-DFIuG_WK.d.mts → prepared-statement-DZtymlzd-DmbP44p0.d.mts} +15 -15
  100. package/dist/{prepared-statement-DZtymlzd-DFIuG_WK.d.mts.map → prepared-statement-DZtymlzd-DmbP44p0.d.mts.map} +1 -1
  101. package/dist/{psl-infer-6p4x9ebN.mjs → psl-infer-BAbdN_ZR.mjs} +195 -13
  102. package/dist/psl-infer-BAbdN_ZR.mjs.map +1 -0
  103. package/dist/{psl-infer-CLZsT2Hz.d.mts → psl-infer-DQCWvJtk.d.mts} +16 -3
  104. package/dist/psl-infer-DQCWvJtk.d.mts.map +1 -0
  105. package/dist/{query-lane-context-QIUURgPP-CvQ9jQRm.d.mts → query-lane-context-BUNC86DS-C_hIrqaW.d.mts} +6 -6
  106. package/dist/{query-lane-context-QIUURgPP-CvQ9jQRm.d.mts.map → query-lane-context-BUNC86DS-C_hIrqaW.d.mts.map} +1 -1
  107. package/dist/query-lane-context-CeOxBL6I.d.mts +1 -0
  108. package/dist/relational-core.d.mts +12 -12
  109. package/dist/relational-core.mjs +3 -3
  110. package/dist/relational-core__aggregate-descriptor-registry.d.mts +1 -1
  111. package/dist/relational-core__ast.d.mts +4 -4
  112. package/dist/relational-core__ast.mjs +3 -3
  113. package/dist/relational-core__codec-descriptor-registry.d.mts +3 -3
  114. package/dist/relational-core__contract-free.d.mts +3 -3
  115. package/dist/relational-core__contract-free.mjs +1 -1
  116. package/dist/relational-core__contract-free.mjs.map +1 -1
  117. package/dist/relational-core__expression.d.mts +1 -1
  118. package/dist/relational-core__middleware.d.mts +2 -2
  119. package/dist/relational-core__plan.d.mts +3 -3
  120. package/dist/relational-core__query-lane-context.d.mts +2 -2
  121. package/dist/relational-core__types.d.mts +2 -2
  122. package/dist/{runtime-gCSNgykk.d.mts → runtime-BqAUXvAl.d.mts} +3 -3
  123. package/dist/{runtime-gCSNgykk.d.mts.map → runtime-BqAUXvAl.d.mts.map} +1 -1
  124. package/dist/runtime.d.mts +4 -4
  125. package/dist/runtime.mjs +1 -1
  126. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  127. package/dist/{schema-differ-DpG_gnur-DrAcUO68.d.mts → schema-differ-DpG_gnur-CXVM1Oed.d.mts} +4 -4
  128. package/dist/{schema-differ-DpG_gnur-DrAcUO68.d.mts.map → schema-differ-DpG_gnur-CXVM1Oed.d.mts.map} +1 -1
  129. package/dist/schema-ir.d.mts +1 -1
  130. package/dist/schema-ir__types.d.mts +2 -2
  131. package/dist/{sql-attribute-specs-DAEpjrWl-C0kmaUJt.mjs → sql-attribute-specs-CQoOV2MU-DLD9uxC6.mjs} +16 -8
  132. package/dist/sql-attribute-specs-CQoOV2MU-DLD9uxC6.mjs.map +1 -0
  133. package/dist/{sql-execution-plan-S3HvDKIP-8KF1nBHu.d.mts → sql-execution-plan-DBvAsaOB-LUMcfRpN.d.mts} +3 -3
  134. package/dist/sql-execution-plan-DBvAsaOB-LUMcfRpN.d.mts.map +1 -0
  135. package/dist/{types-BDUG29Df-DRoC4zw1.d.mts → types-BDUG29Df-LE85dIXP.d.mts} +2 -2
  136. package/dist/{types-BDUG29Df-DRoC4zw1.d.mts.map → types-BDUG29Df-LE85dIXP.d.mts.map} +1 -1
  137. package/dist/{types-BFPRCYGW-CvvVz-AC.d.mts → types-BFPRCYGW-CBv60DKI.d.mts} +7 -7
  138. package/dist/{types-BFPRCYGW-CvvVz-AC.d.mts.map → types-BFPRCYGW-CBv60DKI.d.mts.map} +1 -1
  139. package/dist/{types-CRU1CBUk-CR2_opbw.d.mts → types-BLVS175T-DmpY58Nx.d.mts} +9 -9
  140. package/dist/{types-CRU1CBUk-CR2_opbw.d.mts.map → types-BLVS175T-DmpY58Nx.d.mts.map} +1 -1
  141. package/dist/types-BijNazlM.d.mts +1 -0
  142. package/dist/{types-BmgtemBx.d.mts → types-C36_3E6_.d.mts} +2 -2
  143. package/dist/{types-BmgtemBx.d.mts.map → types-C36_3E6_.d.mts.map} +1 -1
  144. package/dist/{types-CHOgKgHg-DMlDrQz6.d.mts → types-CHOgKgHg-BxgkL3GS.d.mts} +2 -2
  145. package/dist/{types-CHOgKgHg-DMlDrQz6.d.mts.map → types-CHOgKgHg-BxgkL3GS.d.mts.map} +1 -1
  146. package/dist/types-CQ8FfvRk.d.mts +1 -0
  147. package/dist/{types-BXSw7th1-pL1Iggyd.d.mts → types-YGX78yVc-BBy1pp_1.d.mts} +7 -5
  148. package/dist/types-YGX78yVc-BBy1pp_1.d.mts.map +1 -0
  149. package/dist/{validators-DvtOcB04.d.mts → validators-CJSyNFS4.d.mts} +2 -2
  150. package/dist/{validators-DvtOcB04.d.mts.map → validators-CJSyNFS4.d.mts.map} +1 -1
  151. package/package.json +18 -18
  152. package/dist/ast-BHZ0g4iL.d.mts.map +0 -1
  153. package/dist/ast-C8jX7HNs.mjs.map +0 -1
  154. package/dist/control-C9oCqe39.d.mts.map +0 -1
  155. package/dist/control-adapter-Bx5ZQKj-.d.mts +0 -1
  156. package/dist/derived-checks-C4BPtrnO-B9MQRh6W.mjs.map +0 -1
  157. package/dist/interpreter-Bf7Um__3-DC_thY44.mjs.map +0 -1
  158. package/dist/middleware-Di3_d2T5.d.mts +0 -1
  159. package/dist/plan-BEJGOQ-l.d.mts +0 -2
  160. package/dist/plan-Bs-Pdirc-BCy94--G.d.mts.map +0 -1
  161. package/dist/psl-infer-6p4x9ebN.mjs.map +0 -1
  162. package/dist/psl-infer-CLZsT2Hz.d.mts.map +0 -1
  163. package/dist/query-lane-context-yy5kDAlG.d.mts +0 -1
  164. package/dist/sql-attribute-specs-DAEpjrWl-C0kmaUJt.mjs.map +0 -1
  165. package/dist/sql-execution-plan-S3HvDKIP-8KF1nBHu.d.mts.map +0 -1
  166. package/dist/types-BXSw7th1-pL1Iggyd.d.mts.map +0 -1
  167. package/dist/types-D3XRY_cO.d.mts +0 -1
  168. package/dist/types-RPn42d0t.d.mts +0 -1
@@ -1,5 +1,5 @@
1
1
  import { c as SqlStorage, s as SqlNamespaceInput, u as SqlStorageTypeEntry } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
2
- import "./types-BmgtemBx.mjs";
2
+ import "./types-C36_3E6_.mjs";
3
3
  import { AnyEntityKindDescriptor, Namespace } from "@prisma/orm-framework/components/ir";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { ContractSerializer, SchemaDiffIssue, SchemaVerifier, SchemaVerifyOptions, SchemaVerifyResult } from "@prisma/orm-framework/components/control";
@@ -124,4 +124,4 @@ declare abstract class SqlSchemaVerifierBase<TContract, TSchema> implements Sche
124
124
  }
125
125
  //#endregion
126
126
  export { SqlSchemaVerifierBase as i, SqlContractSerializerBase as n, SqlEntityHydrationFactory as r, SqlContractSerializer as t };
127
- //# sourceMappingURL=ir-CodnAisu.d.mts.map
127
+ //# sourceMappingURL=ir-BJ-dsbe-.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ir-CodnAisu.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/ir.d.mts"],"mappings":";;;;;;;;KAMK,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;uBAyBX,0BAA0B,kBAAkB,SAAS,wBAAwB,mBAAmB;qBAClG,yBAAyB,oBAAoB;mBAC/C;mBACA;EACjB,YAAY,0BAA0B,oBAAoB,4BAA4B,2BAA2B;EACjH,oBAAoB,UAAU,YAAY,WAAW,gBAAgB;EACrE,kBAAkB,UAAU,YAAY;EACxC,0DAA0D;EAC1D,kDAAkD;EAClD;aACW,0DAA0D;aAC1D,kDAAkD;;YAEnD,0BAA0B,gBAAgB,SAAS;YACnD,kBAAkB,WAAW,SAAS,cAAc,SAAS;YAC7D,uBAAuB,YAAY,SAAS,eAAe,4BAA4B,SAAS,eAAe;YAC/G,yBAAyB,cAAc,KAAK,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AA0B,SAAS;EAC7E;;;;;;;;;;;;;;;;;;;;;;;;uBAwBqB,sBAAsB,WAAW,oBAAoB,eAAe,WAAW;EACpG,aAAa,SAAS,oBAAoB,WAAW,WAAW;;;;;;;qBAO7C,sBAAsB,SAAS,oBAAoB,WAAW,oBAAoB;;;;;;qBAMlF,uBAAuB,SAAS,oBAAoB,WAAW,oBAAoB"}
@@ -1,6 +1,6 @@
1
- import { t as SqlExecutionPlan } from "./sql-execution-plan-S3HvDKIP-8KF1nBHu.mjs";
1
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-DBvAsaOB-LUMcfRpN.mjs";
2
2
  import { ParamRefMutator } from "@prisma/orm-framework/components/runtime";
3
- //#region ../../../2-sql/4-lanes/relational-core/dist/middleware-0yjzaoBT.d.mts
3
+ //#region ../../../2-sql/4-lanes/relational-core/dist/middleware-CHg6zJkn.d.mts
4
4
  //#region src/middleware/param-ref-mutator.d.ts
5
5
  /**
6
6
  * Brand applied to {@link ParamRefHandle} so user-constructed handles
@@ -116,4 +116,4 @@ interface SqlParamRefMutatorInternal<TCodecMap extends Record<string, unknown> =
116
116
  declare function createSqlParamRefMutator<TCodecMap extends Record<string, unknown> = Record<string, unknown>>(plan: SqlExecutionPlan): SqlParamRefMutatorInternal<TCodecMap>;
117
117
  //#endregion
118
118
  export { SqlParamRefMutatorInternal as a, SqlParamRefMutator as i, ParamRefEntryUnion as n, createSqlParamRefMutator as o, ParamRefHandle as r, ParamRefEntry as t };
119
- //# sourceMappingURL=middleware-0yjzaoBT-BqmCD6Dt.d.mts.map
119
+ //# sourceMappingURL=middleware-CHg6zJkn-DJAKnDpd.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"middleware-0yjzaoBT-BqmCD6Dt.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/middleware-0yjzaoBT.d.mts"],"mappings":";;;;;;;;;;;;;;cAac;;;;;;;;;;UAUJ,eAAe;YACb,sBAAsB;;;;;;;UAOxB,cAAc;WACb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+ import "./middleware-CHg6zJkn-DJAKnDpd.mjs";
@@ -1,6 +1,6 @@
1
1
  import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
2
- import "./types-BmgtemBx.mjs";
3
- import { f as SqlMigrationPlanOperation, w as SqlPlanTargetDetails } from "./types-BFPRCYGW-CvvVz-AC.mjs";
2
+ import "./types-C36_3E6_.mjs";
3
+ import { f as SqlMigrationPlanOperation, w as SqlPlanTargetDetails } from "./types-BFPRCYGW-CBv60DKI.mjs";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { Migration } from "@prisma/orm-toolchain/migration-tools/migration";
6
6
  //#region ../../../2-sql/9-family/dist/migration.d.mts
@@ -41,4 +41,4 @@ declare abstract class SqlMigration<TDetails extends SqlPlanTargetDetails, TTarg
41
41
  }
42
42
  //#endregion
43
43
  export { SqlMigration as t };
44
- //# sourceMappingURL=migration-CniGZoFt.d.mts.map
44
+ //# sourceMappingURL=migration-BQWwBE8Q.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-CniGZoFt.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0BuB,aAAa,iBAAiB,sBAAsB,mCAAmC,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,0BAA0B,kBAAkB,WAAW,OAAO;;;;;;;;;;;MAW5S"}
1
+ {"version":3,"file":"migration-BQWwBE8Q.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0BuB,aAAa,iBAAiB,sBAAsB,mCAAmC,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,0BAA0B,kBAAkB,WAAW,OAAO;;;;;;;;;;;MAW5S"}
@@ -1,2 +1,2 @@
1
- import { a as SqlOperationRegistry, i as SqlOperationEntry, n as SqlOperationDescriptor, o as createSqlOperationRegistry, r as SqlOperationDescriptors, t as SqlLoweringSpec } from "./index-C6_--MKi.mjs";
1
+ import { a as SqlOperationRegistry, i as SqlOperationEntry, n as SqlOperationDescriptor, o as createSqlOperationRegistry, r as SqlOperationDescriptors, t as SqlLoweringSpec } from "./index-CLAshwKN.mjs";
2
2
  export { SqlLoweringSpec, SqlOperationDescriptor, SqlOperationDescriptors, SqlOperationEntry, SqlOperationRegistry, createSqlOperationRegistry };
@@ -1,18 +1,18 @@
1
1
  import { t as StorageColumn } from "./storage-table-DSeWszOL-CI-cItEK.mjs";
2
2
  import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
3
- import { f as ExtractFieldOutputTypes, l as ExtractAggregateTypes, p as ExtractQueryOperationTypes, u as ExtractCodecTypes } from "./types-BDUG29Df-DRoC4zw1.mjs";
4
- import "./types-BmgtemBx.mjs";
5
- import { It as WhereArg, T as CodecRef$1, a as AndExpr, g as BinaryExpr, gt as OrderByItem, ht as OrExpr, ot as LimitOffsetValue, pt as NullCheckExpr, r as AggregateFn, s as AnyExpression } from "./types-BXSw7th1-pL1Iggyd.mjs";
6
- import "./ast-BHZ0g4iL.mjs";
7
- import { n as SqlQueryPlan, t as Preparable } from "./plan-Bs-Pdirc-BCy94--G.mjs";
8
- import { S as TraitExpression, i as CodecTypesBase, o as Expression } from "./expression-CTADTPZW.mjs";
9
- import "./plan-BEJGOQ-l.mjs";
10
- import { r as ExecutionContext } from "./query-lane-context-QIUURgPP-CvQ9jQRm.mjs";
11
- import "./query-lane-context-yy5kDAlG.mjs";
12
- import { h as RuntimeScope, o as ComputeColumnJsType } from "./types-CRU1CBUk-CR2_opbw.mjs";
13
- import "./types-RPn42d0t.mjs";
14
- import { T as RuntimeQueryable$1, l as ParamsFromDeclaration, m as PreparedStatement, p as PreparedFor, r as Declaration, t as BindSiteParams, y as Runtime } from "./prepared-statement-DZtymlzd-DFIuG_WK.mjs";
15
- import "./index-CA_WLNy1.mjs";
3
+ import { f as ExtractFieldOutputTypes, l as ExtractAggregateTypes, p as ExtractQueryOperationTypes, u as ExtractCodecTypes } from "./types-BDUG29Df-LE85dIXP.mjs";
4
+ import "./types-C36_3E6_.mjs";
5
+ import { E as CodecRef$1, Lt as WhereArg, _ as BinaryExpr, _t as OrderByItem, a as AndExpr, c as AnyExpression, gt as OrExpr, mt as NullCheckExpr, r as AggregateFn, st as LimitOffsetValue } from "./types-YGX78yVc-BBy1pp_1.mjs";
6
+ import "./ast-d2-iNoEs.mjs";
7
+ import { n as SqlQueryPlan, t as Preparable } from "./plan-DVkrl9Pq-DOf_eQ84.mjs";
8
+ import { S as TraitExpression, i as CodecTypesBase, o as Expression } from "./expression-CAJjmssr.mjs";
9
+ import "./plan-Dzq6Nwb4.mjs";
10
+ import { r as ExecutionContext } from "./query-lane-context-BUNC86DS-C_hIrqaW.mjs";
11
+ import "./query-lane-context-CeOxBL6I.mjs";
12
+ import { h as RuntimeScope, o as ComputeColumnJsType } from "./types-BLVS175T-DmpY58Nx.mjs";
13
+ import "./types-CQ8FfvRk.mjs";
14
+ import { T as RuntimeQueryable$1, l as ParamsFromDeclaration, m as PreparedStatement, p as PreparedFor, r as Declaration, t as BindSiteParams, y as Runtime } from "./prepared-statement-DZtymlzd-DmbP44p0.mjs";
15
+ import "./index-DI6YpxCw.mjs";
16
16
  import { Contract } from "@prisma/orm-framework/contract/types";
17
17
  import { AnnotationValue, AsyncIterableResult, MetaBuilder, OperationKind, ResultType, RuntimeExecuteOptions } from "@prisma/orm-framework/components/runtime";
18
18
  import { SimplifyDeep } from "@prisma/orm-framework/utils/simplify-deep";
@@ -2,7 +2,7 @@ import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
2
2
  import { i as isUniqueConstraintViolation } from "./dist-x6jvtkKM.mjs";
3
3
  import { C as LiteralExpr, D as OrExpr, F as SubqueryExpr, I as TableSource, L as UpdateAst, O as OrderByItem, P as SelectAst, R as WindowFuncExpr, S as ListExpression, T as NullCheckExpr, U as isWhereExpr, V as isAggregateFn, _ as InsertAst, b as JsonArrayAggExpr, c as DeleteAst, f as EqColJoinOn, j as ProjectionItem, k as ParamRef, l as DerivedTableSource, n as AndExpr, o as ColumnRef, p as ExistsExpr, r as BinaryExpr, s as DefaultValueExpr, t as AggregateExpr, v as InsertOnConflict, w as NotExpr, x as JsonObjectExpr, y as JoinAst } from "./types-ZNKYVjLr-DzjvSHKB.mjs";
4
4
  import { t as collectOrderedParamRefs } from "./util-DQQgv2j1-D6INZaRG.mjs";
5
- import { n as JsonDocumentProjection, r as NativeJsonValueProjection, t as CodecJsonValueProjection } from "./ast-C8jX7HNs.mjs";
5
+ import { n as JsonDocumentProjection, r as NativeJsonValueProjection, t as CodecJsonValueProjection } from "./ast-um6jG7BL.mjs";
6
6
  import { i as isExpression, o as toExpr } from "./expression-DqrE3myO.mjs";
7
7
  import { n as codecRefForStorageColumn } from "./codec-descriptor-registry-ECZ4ohtG.mjs";
8
8
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
@@ -1,9 +1,9 @@
1
1
  import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
2
- import "./types-BmgtemBx.mjs";
3
- import { m as AnyQueryAst } from "./types-BXSw7th1-pL1Iggyd.mjs";
2
+ import "./types-C36_3E6_.mjs";
3
+ import { h as AnyQueryAst } from "./types-YGX78yVc-BBy1pp_1.mjs";
4
4
  import { Contract } from "@prisma/orm-framework/contract/types";
5
5
  import { AsyncIterableResult, QueryPlan } from "@prisma/orm-framework/components/runtime";
6
- //#region ../../../2-sql/4-lanes/relational-core/dist/plan-Bs-Pdirc.d.mts
6
+ //#region ../../../2-sql/4-lanes/relational-core/dist/plan-DVkrl9Pq.d.mts
7
7
  //#region src/plan.d.ts
8
8
  /**
9
9
  * A SQL query plan produced by a lane before lowering.
@@ -47,4 +47,4 @@ interface Preparable<DbRow, Result> {
47
47
  declare function planFromAst<Row = unknown>(ast: AnyQueryAst, contract: Contract<SqlStorage>, laneId?: string): SqlQueryPlan<Row>;
48
48
  //#endregion
49
49
  export { SqlQueryPlan as n, planFromAst as r, Preparable as t };
50
- //# sourceMappingURL=plan-Bs-Pdirc-BCy94--G.d.mts.map
50
+ //# sourceMappingURL=plan-DVkrl9Pq-DOf_eQ84.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-DVkrl9Pq-DOf_eQ84.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/plan-DVkrl9Pq.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAkBU,aAAa,uBAAuB,UAAU;WAC7C,KAAK;WACL;;UAED,WAAW,OAAO;WACjB,MAAM,aAAa;EAC5B,QAAQ,MAAM,oBAAoB,SAAS;;;;;;;;;;;;;;;;;;;;iBAoB5B,YAAY,eAAe,KAAK,aAAa,UAAU,SAAS,aAAa,kBAAkB,aAAa"}
@@ -0,0 +1,2 @@
1
+ import "./plan-DVkrl9Pq-DOf_eQ84.mjs";
2
+ import "./sql-execution-plan-DBvAsaOB-LUMcfRpN.mjs";
@@ -1,19 +1,19 @@
1
1
  import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
2
- import "./types-BmgtemBx.mjs";
3
- import { r as SqlOperationDescriptors } from "./index-C6_--MKi.mjs";
4
- import { O as ContractCodecRegistry, Ot as SqlCodecCallContext, T as CodecRef$1, lt as LoweredParam, m as AnyQueryAst, ut as LoweredStatement, x as Codec$1 } from "./types-BXSw7th1-pL1Iggyd.mjs";
2
+ import "./types-C36_3E6_.mjs";
3
+ import { r as SqlOperationDescriptors } from "./index-CLAshwKN.mjs";
4
+ import { E as CodecRef$1, S as Codec$1, dt as LoweredStatement, h as AnyQueryAst, k as ContractCodecRegistry, kt as SqlCodecCallContext, ut as LoweredParam } from "./types-YGX78yVc-BBy1pp_1.mjs";
5
5
  import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConnection } from "./driver-types-BQtRkOJ0-Bv2RPSfr.mjs";
6
- import { o as MarkerReadResult, t as Adapter } from "./ast-BHZ0g4iL.mjs";
7
- import { n as SqlQueryPlan } from "./plan-Bs-Pdirc-BCy94--G.mjs";
8
- import { a as CodecValue, i as CodecTypesBase, l as RawCodecInferer, o as Expression, t as AffectedCount } from "./expression-CTADTPZW.mjs";
9
- import { t as SqlExecutionPlan } from "./sql-execution-plan-S3HvDKIP-8KF1nBHu.mjs";
10
- import "./plan-BEJGOQ-l.mjs";
11
- import { r as ExecutionContext } from "./query-lane-context-QIUURgPP-CvQ9jQRm.mjs";
12
- import "./query-lane-context-yy5kDAlG.mjs";
13
- import { i as SqlParamRefMutator } from "./middleware-0yjzaoBT-BqmCD6Dt.mjs";
14
- import "./middleware-Di3_d2T5.mjs";
15
- import { h as RuntimeScope } from "./types-CRU1CBUk-CR2_opbw.mjs";
16
- import "./types-RPn42d0t.mjs";
6
+ import { s as MarkerReadResult, t as Adapter } from "./ast-d2-iNoEs.mjs";
7
+ import { n as SqlQueryPlan } from "./plan-DVkrl9Pq-DOf_eQ84.mjs";
8
+ import { a as CodecValue, i as CodecTypesBase, l as RawCodecInferer, o as Expression, t as AffectedCount } from "./expression-CAJjmssr.mjs";
9
+ import { t as SqlExecutionPlan } from "./sql-execution-plan-DBvAsaOB-LUMcfRpN.mjs";
10
+ import "./plan-Dzq6Nwb4.mjs";
11
+ import { r as ExecutionContext } from "./query-lane-context-BUNC86DS-C_hIrqaW.mjs";
12
+ import "./query-lane-context-CeOxBL6I.mjs";
13
+ import { i as SqlParamRefMutator } from "./middleware-CHg6zJkn-DJAKnDpd.mjs";
14
+ import "./middleware-wyJe8dVq.mjs";
15
+ import { h as RuntimeScope } from "./types-BLVS175T-DmpY58Nx.mjs";
16
+ import "./types-CQ8FfvRk.mjs";
17
17
  import { Contract, JsonValue, PlanMeta } from "@prisma/orm-framework/contract/types";
18
18
  import { AfterExecuteResult, AfterQueryResult, AsyncIterableResult, ExecuteInterceptResult, ExecutionPlan, QueryInterceptResult, RuntimeCore, RuntimeExecuteOptions, RuntimeLog, RuntimeMiddleware, RuntimeMiddlewareContext } from "@prisma/orm-framework/components/runtime";
19
19
  import { AnyCodecDescriptor, CodecDescriptor } from "@prisma/orm-framework/components/codec";
@@ -528,4 +528,4 @@ declare class PreparedExecutionImpl<Params> implements PreparedExecution<Params>
528
528
  }
529
529
  //#endregion
530
530
  export { SqlMiddleware as A, TelemetryOutcome as B, RuntimeOptions as C, RuntimeTransaction as D, RuntimeTelemetryEvent as E, SqlRuntimeDriverInstance as F, deriveParamMetadata as G, VerifyMarkerOption as H, SqlRuntimeExtensionDescriptor as I, preparedStatementQuery as J, encodeParamsWithMetadata as K, SqlRuntimeExtensionInstance as L, SqlRuntimeAdapterDescriptor as M, SqlRuntimeAdapterInstance as N, SqlExecutionStack as O, SqlRuntimeBase as P, SqlRuntimeTargetDescriptor as R, RuntimeMutationDefaultGenerator as S, RuntimeQueryable as T, createExecutionContext as U, TransactionContext as V, createSqlExecutionStack as W, withTransaction as Y, PreparedStatementInternals as _, DeclaredNullable as a, RuntimeConnection as b, ParamSpec as c, PreparedExecution as d, PreparedExecutionImpl as f, PreparedStatementImpl as g, PreparedStatementExecuteTarget as h, DeclaredCodecId as i, SqlMiddlewareContext as j, SqlExecutionStackWithDriver as k, ParamsFromDeclaration as l, PreparedStatement as m, ConnectionProvider as n, GeneratorStability as o, PreparedFor as p, preparedStatementExecute as q, Declaration as r, MarkerReader as s, BindSiteParams as t, PrepareCallback as u, PreparedStatementQueryTarget as v, RuntimeParameterizedCodecDescriptor as w, RuntimeFamilyAdapter as x, Runtime as y, SqlStaticContributions as z };
531
- //# sourceMappingURL=prepared-statement-DZtymlzd-DFIuG_WK.d.mts.map
531
+ //# sourceMappingURL=prepared-statement-DZtymlzd-DmbP44p0.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepared-statement-DZtymlzd-DFIuG_WK.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/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AAI,sBAAsB,IAAI,qBAAqB,WAAW,cAAc,UAAU,wBAAwB,QAAQ;EACtK,cAAc,QAAQ;UACd;EACR,aAAa;EACb,SAAS;UACD;UACA;UACA;;;UAGA;EACR,cAAc,QAAQ;;iBAEP,gBAAgB,GAAG,SAAS,oBAAoB,KAAK,IAAI,uBAAuB,YAAY,KAAK,QAAQ;;;UAGhH;WACC;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;;cAErB,sBAAsB,QAAQ,gBAAgB,kBAAkB,QAAQ,MAAM;WACjF;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,MAAM,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,oBAAoB;;;;;;;;;;cAU1F,sBAAsB,mBAAmB,kBAAkB,SAAS;WACvE;WACA,KAAK;WACL,MAAM;WACN,gBAAgB;WAChB,eAAe;WACf,wBAAwB;EACjC,YAAY,WAAW;EACvB,QAAQ,QAAQ,kBAAkB,QAAQ,QAAQ,UAAU,wBAAwB,QAAQ"}
@@ -1,6 +1,9 @@
1
1
  import { n as isBackedByColumnKeys, t as backingIndexColumnKeys } from "./foreign-key-materialization-B3HQzQIA.mjs";
2
2
  import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
3
+ import { w as numeralText, x as escapePslString } from "./ast-um6jG7BL.mjs";
4
+ import { isDataTypeLoweringEntry } from "@prisma/orm-framework/components/authoring";
3
5
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
6
+ import { dataTypeId } from "@prisma/orm-framework/components/codec";
4
7
  import pluralizeLib from "pluralize";
5
8
  //#region ../../../2-sql/9-family/dist/psl-infer.mjs
6
9
  const DEFAULT_FUNCTION_ATTRIBUTES = {
@@ -9,27 +12,206 @@ const DEFAULT_FUNCTION_ATTRIBUTES = {
9
12
  };
10
13
  function mapDefault(columnDefault, options) {
11
14
  switch (columnDefault.kind) {
12
- case "literal": return { attribute: `@default(${formatLiteralValue(columnDefault.value)})` };
15
+ case "literal": {
16
+ const text = writeDefaultLiteral(columnDefault.value, options);
17
+ return text === void 0 ? { comment: `// Literal default: ${JSON.stringify(columnDefault.value)}` } : { attribute: `@default(${text})` };
18
+ }
13
19
  case "function": {
14
20
  const attribute = options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? options?.fallbackFunctionAttribute?.(columnDefault.expression);
15
21
  return attribute ? { attribute } : { comment: `// Raw default: ${columnDefault.expression.replace(/[\r\n]+/g, " ")}` };
16
22
  }
17
23
  }
18
24
  }
19
- function formatLiteralValue(value) {
20
- if (value === null) return "null";
21
- switch (typeof value) {
22
- case "boolean":
23
- case "number": return String(value);
24
- case "string": return quoteString(value);
25
- default: return quoteString(JSON.stringify(value));
25
+ function writingSurface(entries) {
26
+ const entryOf = /* @__PURE__ */ new Map();
27
+ let classify;
28
+ let plainStringType;
29
+ let plainBooleanType;
30
+ const tagTypes = [];
31
+ for (const [key, entry] of Object.entries(entries)) {
32
+ if (isDataTypeLoweringEntry(entry)) continue;
33
+ const written = entry.written;
34
+ if (written.kind === "tag") {
35
+ entryOf.set(key, entry);
36
+ tagTypes.push(dataTypeId(key));
37
+ continue;
38
+ }
39
+ if (written.syntax === "number") {
40
+ classify = written.classify;
41
+ for (const type of written.types) entryOf.set(type, entry);
42
+ continue;
43
+ }
44
+ entryOf.set(key, entry);
45
+ if (written.syntax === "string") plainStringType = dataTypeId(key);
46
+ else plainBooleanType = dataTypeId(key);
47
+ }
48
+ return {
49
+ entryOf,
50
+ classify,
51
+ plainStringType,
52
+ plainBooleanType,
53
+ tagTypes
54
+ };
55
+ }
56
+ /**
57
+ * Every type the stored form could be a value of, in the order a written value would be read: a
58
+ * number or numeral text through the classifier first, then the plain syntax that matches the
59
+ * shape, then each tag, whose canonical form is a whole document.
60
+ */
61
+ function classifications(value, surface) {
62
+ const found = [];
63
+ if (typeof value === "number") {
64
+ const classified = surface.classify?.(numeralText(value));
65
+ return classified === void 0 ? [] : [classified];
66
+ }
67
+ if (typeof value === "boolean") return surface.plainBooleanType === void 0 ? [] : [{
68
+ type: surface.plainBooleanType,
69
+ value
70
+ }];
71
+ if (typeof value === "string") {
72
+ const classified = surface.classify?.(value);
73
+ if (classified !== void 0) found.push(classified);
74
+ if (surface.plainStringType !== void 0) found.push({
75
+ type: surface.plainStringType,
76
+ value
77
+ });
78
+ }
79
+ for (const type of surface.tagTypes) found.push({
80
+ type,
81
+ value
82
+ });
83
+ return found;
84
+ }
85
+ /** The stored form the column takes this value as, or `undefined` when its type takes no such value. */
86
+ function admitted(candidate, columnDataType, dataTypes) {
87
+ if (candidate.type === columnDataType) return candidate.value;
88
+ const cast = dataTypes.get(columnDataType)?.casts[candidate.type];
89
+ if (cast === void 0) return void 0;
90
+ try {
91
+ return cast(candidate.value);
92
+ } catch {
93
+ return;
94
+ }
95
+ }
96
+ /** The body of the literal: what the entry prints, before the syntax that fences it. */
97
+ function printedBody(entry, value) {
98
+ try {
99
+ return entry.print(value);
100
+ } catch {
101
+ return;
102
+ }
103
+ }
104
+ /** What the entry reads the printed body back as, which for a number is the classifier's answer. */
105
+ function readBack(entry, type, body) {
106
+ const written = entry.written;
107
+ try {
108
+ return written.kind === "plain" && written.syntax === "number" ? written.classify(body) : {
109
+ type,
110
+ value: written.parse(body)
111
+ };
112
+ } catch {
113
+ return;
26
114
  }
27
115
  }
28
- function quoteString(str) {
29
- return `"${escapeString(str)}"`;
116
+ /**
117
+ * The literal as PSL source. A tag body sits inside a backtick fence, which resolves `` \` `` and
118
+ * `\\` and nothing else, so a `\n` in the body survives as the two characters the entry wrote.
119
+ */
120
+ function literalText(entry, body) {
121
+ const written = entry.written;
122
+ if (written.kind === "tag") {
123
+ const fenced = body.replace(/\\/g, "\\\\").replace(/`/g, "\\`");
124
+ return `${written.tag}\`${fenced}\``;
125
+ }
126
+ return written.syntax === "string" ? `"${escapePslString(body)}"` : body;
127
+ }
128
+ /**
129
+ * The value written as the literal of one of its types, proven by reading the text straight back:
130
+ * the same entry, the same cast, and the stored form again.
131
+ */
132
+ function writeScalar(value, columnDataType, dataTypes, surface) {
133
+ for (const candidate of classifications(value, surface)) {
134
+ const entry = surface.entryOf.get(candidate.type);
135
+ if (entry === void 0) continue;
136
+ const stored = admitted(candidate, columnDataType, dataTypes);
137
+ if (stored === void 0 || !sameForm(stored, value)) continue;
138
+ const body = printedBody(entry, candidate.value);
139
+ if (body === void 0) continue;
140
+ const reread = readBack(entry, candidate.type, body);
141
+ if (reread === void 0) continue;
142
+ const restored = admitted(reread, columnDataType, dataTypes);
143
+ if (restored === void 0 || !sameForm(restored, value)) continue;
144
+ return literalText(entry, body);
145
+ }
146
+ }
147
+ /** One written element of a list, printed as a value of any type, with no column type to admit it. */
148
+ function writeElement(value, of, surface) {
149
+ for (const candidate of classifications(value, surface)) {
150
+ if (!of.includes(candidate.type)) continue;
151
+ const entry = surface.entryOf.get(candidate.type);
152
+ if (entry === void 0) continue;
153
+ const body = printedBody(entry, candidate.value);
154
+ if (body === void 0) continue;
155
+ const reread = readBack(entry, candidate.type, body);
156
+ if (reread === void 0 || !of.includes(reread.type)) continue;
157
+ return {
158
+ text: literalText(entry, body),
159
+ value: reread.value
160
+ };
161
+ }
162
+ }
163
+ /**
164
+ * A written list on a scalar column, which the column type's list cast turns into its one value.
165
+ * Each element is classified on its own and must be of a type the cast takes.
166
+ */
167
+ function writeListCast(value, columnDataType, dataTypes, surface) {
168
+ const listCast = dataTypes.get(columnDataType)?.listCast;
169
+ if (listCast === void 0) return void 0;
170
+ const parts = [];
171
+ const elements = [];
172
+ for (const element of value) {
173
+ const written = writeElement(element, listCast.of, surface);
174
+ if (written === void 0) return void 0;
175
+ parts.push(written.text);
176
+ elements.push(written.value);
177
+ }
178
+ try {
179
+ if (!sameForm(listCast.cast(elements), value)) return void 0;
180
+ } catch {
181
+ return;
182
+ }
183
+ return `[${parts.join(", ")}]`;
184
+ }
185
+ function writeDefaultLiteral(value, options) {
186
+ if (value instanceof Date) return void 0;
187
+ const { dataTypeEntries, dataTypes, columnDataType } = options ?? {};
188
+ if (dataTypeEntries === void 0 || dataTypes === void 0 || columnDataType === void 0) return;
189
+ const surface = writingSurface(dataTypeEntries);
190
+ if (options?.list === true) {
191
+ if (!Array.isArray(value)) return void 0;
192
+ const parts = [];
193
+ for (const element of value) {
194
+ const written = writeScalar(element, columnDataType, dataTypes, surface);
195
+ if (written === void 0) return void 0;
196
+ parts.push(written);
197
+ }
198
+ return `[${parts.join(", ")}]`;
199
+ }
200
+ const written = writeScalar(value, columnDataType, dataTypes, surface);
201
+ if (written !== void 0) return written;
202
+ return Array.isArray(value) ? writeListCast(value, columnDataType, dataTypes, surface) : void 0;
30
203
  }
31
- function escapeString(str) {
32
- return JSON.stringify(str).slice(1, -1);
204
+ /** Whether two canonical forms are the same JSON value, member by member and element by element. */
205
+ function sameForm(left, right) {
206
+ if (left === right) return true;
207
+ if (Array.isArray(left) !== Array.isArray(right)) return false;
208
+ if (typeof left !== "object" || typeof right !== "object" || left === null || right === null) return false;
209
+ const members = Object.entries(left);
210
+ const others = new Map(Object.entries(right));
211
+ return members.length === others.size && members.every(([key, member]) => {
212
+ const other = others.get(key);
213
+ return other !== void 0 && sameForm(member, other);
214
+ });
33
215
  }
34
216
  const PSL_RESERVED_WORDS = /* @__PURE__ */ new Set([
35
217
  "model",
@@ -280,4 +462,4 @@ function addRelationField(map, tableName, field) {
280
462
  //#endregion
281
463
  export { mapDefault as a, toEnumName as c, inferRelations as i, toFieldName as l, deriveBackRelationFieldName as n, pluralize as o, deriveRelationFieldName as r, toEnumMemberName as s, buildChildRelationField as t, toModelName as u };
282
464
 
283
- //# sourceMappingURL=psl-infer-6p4x9ebN.mjs.map
465
+ //# sourceMappingURL=psl-infer-BAbdN_ZR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-infer-BAbdN_ZR.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.mjs"],"sourcesContent":["import { isDataTypeLoweringEntry } from \"@internal/framework-components/authoring\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { dataTypeId } from \"@internal/framework-components/codec\";\nimport { escapePslString, numeralText } from \"@internal/sql-relational-core/ast\";\nimport { defaultTableName } from \"@internal/sql-contract-psl/default-table-name\";\nimport pluralizeLib from \"pluralize\";\nimport { backingIndexColumnKeys, isBackedByColumnKeys } from \"@internal/sql-contract/foreign-key-materialization\";\n//#region src/core/psl-contract-infer/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\nfunction mapDefault(columnDefault, options) {\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": {\n\t\t\tconst text = writeDefaultLiteral(columnDefault.value, options);\n\t\t\treturn text === void 0 ? { comment: `// Literal default: ${JSON.stringify(columnDefault.value)}` } : { attribute: `@default(${text})` };\n\t\t}\n\t\tcase \"function\": {\n\t\t\tconst attribute = options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? options?.fallbackFunctionAttribute?.(columnDefault.expression);\n\t\t\treturn attribute ? { attribute } : { comment: `// Raw default: ${columnDefault.expression.replace(/[\\r\\n]+/g, \" \")}` };\n\t\t}\n\t}\n}\nfunction writingSurface(entries) {\n\tconst entryOf = /* @__PURE__ */ new Map();\n\tlet classify;\n\tlet plainStringType;\n\tlet plainBooleanType;\n\tconst tagTypes = [];\n\tfor (const [key, entry] of Object.entries(entries)) {\n\t\tif (isDataTypeLoweringEntry(entry)) continue;\n\t\tconst written = entry.written;\n\t\tif (written.kind === \"tag\") {\n\t\t\tentryOf.set(key, entry);\n\t\t\ttagTypes.push(dataTypeId(key));\n\t\t\tcontinue;\n\t\t}\n\t\tif (written.syntax === \"number\") {\n\t\t\tclassify = written.classify;\n\t\t\tfor (const type of written.types) entryOf.set(type, entry);\n\t\t\tcontinue;\n\t\t}\n\t\tentryOf.set(key, entry);\n\t\tif (written.syntax === \"string\") plainStringType = dataTypeId(key);\n\t\telse plainBooleanType = dataTypeId(key);\n\t}\n\treturn {\n\t\tentryOf,\n\t\tclassify,\n\t\tplainStringType,\n\t\tplainBooleanType,\n\t\ttagTypes\n\t};\n}\n/**\n* Every type the stored form could be a value of, in the order a written value would be read: a\n* number or numeral text through the classifier first, then the plain syntax that matches the\n* shape, then each tag, whose canonical form is a whole document.\n*/\nfunction classifications(value, surface) {\n\tconst found = [];\n\tif (typeof value === \"number\") {\n\t\tconst classified = surface.classify?.(numeralText(value));\n\t\treturn classified === void 0 ? [] : [classified];\n\t}\n\tif (typeof value === \"boolean\") return surface.plainBooleanType === void 0 ? [] : [{\n\t\ttype: surface.plainBooleanType,\n\t\tvalue\n\t}];\n\tif (typeof value === \"string\") {\n\t\tconst classified = surface.classify?.(value);\n\t\tif (classified !== void 0) found.push(classified);\n\t\tif (surface.plainStringType !== void 0) found.push({\n\t\t\ttype: surface.plainStringType,\n\t\t\tvalue\n\t\t});\n\t}\n\tfor (const type of surface.tagTypes) found.push({\n\t\ttype,\n\t\tvalue\n\t});\n\treturn found;\n}\n/** The stored form the column takes this value as, or `undefined` when its type takes no such value. */\nfunction admitted(candidate, columnDataType, dataTypes) {\n\tif (candidate.type === columnDataType) return candidate.value;\n\tconst cast = dataTypes.get(columnDataType)?.casts[candidate.type];\n\tif (cast === void 0) return void 0;\n\ttry {\n\t\treturn cast(candidate.value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The body of the literal: what the entry prints, before the syntax that fences it. */\nfunction printedBody(entry, value) {\n\ttry {\n\t\treturn entry.print(value);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** What the entry reads the printed body back as, which for a number is the classifier's answer. */\nfunction readBack(entry, type, body) {\n\tconst written = entry.written;\n\ttry {\n\t\treturn written.kind === \"plain\" && written.syntax === \"number\" ? written.classify(body) : {\n\t\t\ttype,\n\t\t\tvalue: written.parse(body)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The literal as PSL source. A tag body sits inside a backtick fence, which resolves `` \\` `` and\n* `\\\\` and nothing else, so a `\\n` in the body survives as the two characters the entry wrote.\n*/\nfunction literalText(entry, body) {\n\tconst written = entry.written;\n\tif (written.kind === \"tag\") {\n\t\tconst fenced = body.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\");\n\t\treturn `${written.tag}\\`${fenced}\\``;\n\t}\n\treturn written.syntax === \"string\" ? `\"${escapePslString(body)}\"` : body;\n}\n/**\n* The value written as the literal of one of its types, proven by reading the text straight back:\n* the same entry, the same cast, and the stored form again.\n*/\nfunction writeScalar(value, columnDataType, dataTypes, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst stored = admitted(candidate, columnDataType, dataTypes);\n\t\tif (stored === void 0 || !sameForm(stored, value)) continue;\n\t\tconst body = printedBody(entry, candidate.value);\n\t\tif (body === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, body);\n\t\tif (reread === void 0) continue;\n\t\tconst restored = admitted(reread, columnDataType, dataTypes);\n\t\tif (restored === void 0 || !sameForm(restored, value)) continue;\n\t\treturn literalText(entry, body);\n\t}\n}\n/** One written element of a list, printed as a value of any type, with no column type to admit it. */\nfunction writeElement(value, of, surface) {\n\tfor (const candidate of classifications(value, surface)) {\n\t\tif (!of.includes(candidate.type)) continue;\n\t\tconst entry = surface.entryOf.get(candidate.type);\n\t\tif (entry === void 0) continue;\n\t\tconst body = printedBody(entry, candidate.value);\n\t\tif (body === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, body);\n\t\tif (reread === void 0 || !of.includes(reread.type)) continue;\n\t\treturn {\n\t\t\ttext: literalText(entry, body),\n\t\t\tvalue: reread.value\n\t\t};\n\t}\n}\n/**\n* A written list on a scalar column, which the column type's list cast turns into its one value.\n* Each element is classified on its own and must be of a type the cast takes.\n*/\nfunction writeListCast(value, columnDataType, dataTypes, surface) {\n\tconst listCast = dataTypes.get(columnDataType)?.listCast;\n\tif (listCast === void 0) return void 0;\n\tconst parts = [];\n\tconst elements = [];\n\tfor (const element of value) {\n\t\tconst written = writeElement(element, listCast.of, surface);\n\t\tif (written === void 0) return void 0;\n\t\tparts.push(written.text);\n\t\telements.push(written.value);\n\t}\n\ttry {\n\t\tif (!sameForm(listCast.cast(elements), value)) return void 0;\n\t} catch {\n\t\treturn;\n\t}\n\treturn `[${parts.join(\", \")}]`;\n}\nfunction writeDefaultLiteral(value, options) {\n\tif (value instanceof Date) return void 0;\n\tconst { dataTypeEntries, dataTypes, columnDataType } = options ?? {};\n\tif (dataTypeEntries === void 0 || dataTypes === void 0 || columnDataType === void 0) return;\n\tconst surface = writingSurface(dataTypeEntries);\n\tif (options?.list === true) {\n\t\tif (!Array.isArray(value)) return void 0;\n\t\tconst parts = [];\n\t\tfor (const element of value) {\n\t\t\tconst written = writeScalar(element, columnDataType, dataTypes, surface);\n\t\t\tif (written === void 0) return void 0;\n\t\t\tparts.push(written);\n\t\t}\n\t\treturn `[${parts.join(\", \")}]`;\n\t}\n\tconst written = writeScalar(value, columnDataType, dataTypes, surface);\n\tif (written !== void 0) return written;\n\treturn Array.isArray(value) ? writeListCast(value, columnDataType, dataTypes, surface) : void 0;\n}\n/** Whether two canonical forms are the same JSON value, member by member and element by element. */\nfunction sameForm(left, right) {\n\tif (left === right) return true;\n\tif (Array.isArray(left) !== Array.isArray(right)) return false;\n\tif (typeof left !== \"object\" || typeof right !== \"object\" || left === null || right === null) return false;\n\tconst members = Object.entries(left);\n\tconst others = new Map(Object.entries(right));\n\treturn members.length === others.size && members.every(([key, member]) => {\n\t\tconst other = others.get(key);\n\t\treturn other !== void 0 && sameForm(member, other);\n\t});\n}\n//#endregion\n//#region src/core/psl-contract-infer/name-transforms.ts\nconst PSL_RESERVED_WORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"enum\",\n\t\"types\",\n\t\"type\",\n\t\"generator\",\n\t\"datasource\"\n]);\nconst IDENTIFIER_PART_PATTERN = /[A-Za-z0-9]+/g;\nfunction hasSeparators(input) {\n\treturn /[^A-Za-z0-9]/.test(input);\n}\nfunction extractIdentifierParts(input) {\n\treturn input.match(IDENTIFIER_PART_PATTERN) ?? [];\n}\nfunction createSyntheticIdentifier(input) {\n\tlet hash = 2166136261;\n\tfor (const char of input) {\n\t\thash ^= char.codePointAt(0) ?? 0;\n\t\thash = Math.imul(hash, 16777619);\n\t}\n\treturn `x${(hash >>> 0).toString(16)}`;\n}\nfunction sanitizeIdentifierCharacters(input) {\n\tconst sanitized = input.replace(/[^\\w]/g, \"\");\n\treturn sanitized.length > 0 ? sanitized : createSyntheticIdentifier(input);\n}\nfunction capitalize(word) {\n\treturn word.charAt(0).toUpperCase() + word.slice(1);\n}\nfunction snakeToPascalCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return capitalize(sanitizeIdentifierCharacters(input));\n\treturn parts.map(capitalize).join(\"\");\n}\nfunction snakeToCamelCase(input) {\n\tconst parts = extractIdentifierParts(input);\n\tif (parts.length === 0) return sanitizeIdentifierCharacters(input);\n\tconst [firstPart = input, ...rest] = parts;\n\treturn firstPart.charAt(0).toLowerCase() + firstPart.slice(1) + rest.map(capitalize).join(\"\");\n}\nfunction needsEscaping(name) {\n\treturn PSL_RESERVED_WORDS.has(name.toLowerCase()) || /^\\d/.test(name);\n}\nfunction escapeName(name) {\n\treturn `_${name}`;\n}\nfunction escapeIfNeeded(name) {\n\treturn needsEscaping(name) ? escapeName(name) : name;\n}\nfunction toModelName(tableName) {\n\tlet name;\n\tif (hasSeparators(tableName)) name = snakeToPascalCase(tableName);\n\telse name = tableName.charAt(0).toUpperCase() + tableName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: tableName\n\t};\n\tif (defaultTableName(name) !== tableName) return {\n\t\tname,\n\t\tmap: tableName\n\t};\n\treturn { name };\n}\nfunction toFieldName(columnName) {\n\tlet name;\n\tif (hasSeparators(columnName)) name = snakeToCamelCase(columnName);\n\telse name = columnName.charAt(0).toLowerCase() + columnName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: columnName\n\t};\n\tif (name !== columnName) return {\n\t\tname,\n\t\tmap: columnName\n\t};\n\treturn { name };\n}\nfunction toEnumName(pgTypeName) {\n\tlet name;\n\tif (hasSeparators(pgTypeName)) name = snakeToPascalCase(pgTypeName);\n\telse name = pgTypeName.charAt(0).toUpperCase() + pgTypeName.slice(1);\n\tif (needsEscaping(name)) return {\n\t\tname: escapeName(name),\n\t\tmap: pgTypeName\n\t};\n\tif (name !== pgTypeName) return {\n\t\tname,\n\t\tmap: pgTypeName\n\t};\n\treturn { name };\n}\nconst VALID_IDENTIFIER_PATTERN = /^[A-Za-z_]\\w*$/;\n/**\n* PSL member name for a native-enum value. The value itself always prints\n* explicitly (`member = \"value\"`), so the returned name never needs a map:\n* a value that already is a valid, non-reserved identifier is kept verbatim\n* (case included); anything else is camelCased/escaped like a field name.\n*/\nfunction toEnumMemberName(value) {\n\tif (VALID_IDENTIFIER_PATTERN.test(value) && !needsEscaping(value)) return value;\n\treturn escapeIfNeeded(snakeToCamelCase(value));\n}\nfunction pluralize(word) {\n\treturn pluralizeLib.plural(word);\n}\nfunction deriveRelationFieldName(fkColumns, referencedTableName) {\n\tif (fkColumns.length === 1) {\n\t\tconst [col = referencedTableName] = fkColumns;\n\t\tconst stripped = col.replace(/_id$/i, \"\").replace(/Id$/, \"\");\n\t\tif (stripped.length > 0 && stripped !== col) return escapeIfNeeded(snakeToCamelCase(stripped));\n\t\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n\t}\n\treturn escapeIfNeeded(snakeToCamelCase(referencedTableName));\n}\nfunction deriveBackRelationFieldName(childModelName, isOneToOne) {\n\tconst base = childModelName.charAt(0).toLowerCase() + childModelName.slice(1);\n\treturn isOneToOne ? base : pluralize(base);\n}\n//#endregion\n//#region src/core/psl-contract-infer/relation-inference.ts\nconst DEFAULT_ON_DELETE = \"noAction\";\nconst DEFAULT_ON_UPDATE = \"noAction\";\nconst REFERENTIAL_ACTION_PSL = {\n\tnoAction: \"NoAction\",\n\trestrict: \"Restrict\",\n\tcascade: \"Cascade\",\n\tsetNull: \"SetNull\",\n\tsetDefault: \"SetDefault\"\n};\nfunction inferRelations(tables, modelNameMap) {\n\tconst relationsByTable = /* @__PURE__ */ new Map();\n\tconst fkCountByPair = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst pairKey = `${table.name}→${fk.referencedTable}`;\n\t\tfkCountByPair.set(pairKey, (fkCountByPair.get(pairKey) ?? 0) + 1);\n\t}\n\tconst usedFieldNames = /* @__PURE__ */ new Map();\n\tfor (const table of Object.values(tables)) {\n\t\tconst names = /* @__PURE__ */ new Set();\n\t\tfor (const col of Object.values(table.columns)) names.add(col.name);\n\t\tusedFieldNames.set(table.name, names);\n\t}\n\tfor (const table of Object.values(tables)) for (const fk of table.foreignKeys) {\n\t\tconst childTableName = table.name;\n\t\tconst parentTableName = fk.referencedTable;\n\t\tconst childUsed = usedFieldNames.get(childTableName);\n\t\tif (childUsed === void 0) throw new InternalError(`Missing inferred field-name set for table \"${childTableName}\"`);\n\t\tconst childModelName = modelNameMap.get(childTableName) ?? childTableName;\n\t\tconst parentModelName = modelNameMap.get(parentTableName) ?? parentTableName;\n\t\tconst pairKey = `${childTableName}→${parentTableName}`;\n\t\tconst isSelfRelation = childTableName === parentTableName;\n\t\tconst needsRelationName = (fkCountByPair.get(pairKey) ?? 0) > 1 || isSelfRelation;\n\t\tconst isOneToOne = detectOneToOne(fk, table);\n\t\tconst childRelFieldName = resolveUniqueFieldName(deriveRelationFieldName(fk.columns, parentTableName), childUsed, parentModelName);\n\t\tconst relationName = needsRelationName ? deriveRelationName(fk, childRelFieldName, parentModelName, isSelfRelation) : void 0;\n\t\taddRelationField(relationsByTable, childTableName, buildChildRelationField(childRelFieldName, parentModelName, fk, fk.columns.some((columnName) => table.columns[columnName]?.nullable ?? false), relationName, table));\n\t\tchildUsed.add(childRelFieldName);\n\t\tconst parentUsed = usedFieldNames.get(parentTableName) ?? /* @__PURE__ */ new Set();\n\t\tusedFieldNames.set(parentTableName, parentUsed);\n\t\tconst backRelFieldName = resolveUniqueFieldName(deriveBackRelationFieldName(childModelName, isOneToOne), parentUsed, childModelName);\n\t\taddRelationField(relationsByTable, parentTableName, {\n\t\t\tfieldName: backRelFieldName,\n\t\t\ttypeName: childModelName,\n\t\t\toptional: isOneToOne,\n\t\t\tlist: !isOneToOne,\n\t\t\trelationName\n\t\t});\n\t\tparentUsed.add(backRelFieldName);\n\t}\n\treturn { relationsByTable };\n}\nfunction detectOneToOne(fk, table) {\n\tconst fkCols = [...fk.columns].sort();\n\tif (table.primaryKey) {\n\t\tconst pkCols = [...table.primaryKey.columns].sort();\n\t\tif (pkCols.length === fkCols.length && pkCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const unique of table.uniques) {\n\t\tconst uniqueCols = [...unique.columns].sort();\n\t\tif (uniqueCols.length === fkCols.length && uniqueCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\tfor (const index of table.indexes) {\n\t\tif (!index.unique || index.partial || index.columns === void 0) continue;\n\t\tconst indexCols = [...index.columns].sort();\n\t\tif (indexCols.length === fkCols.length && indexCols.every((c, i) => c === fkCols[i])) return true;\n\t}\n\treturn false;\n}\nfunction deriveRelationName(fk, childRelationFieldName, parentModelName, isSelfRelation) {\n\tif (fk.name) return fk.name;\n\tif (isSelfRelation) return `${childRelationFieldName.charAt(0).toUpperCase() + childRelationFieldName.slice(1)}${pluralize(parentModelName)}`;\n\treturn fk.columns.join(\"_\");\n}\n/**\n* Builds the child-side {@link RelationField} for a single foreign key:\n* `typeName` is the parent model name, `fields`/`references` are the FK's raw\n* columns, and `onDelete`/`onUpdate` are normalized to their PSL spelling.\n* Exported so a caller resolving a foreign key against a model outside\n* `tables` (e.g. a cross-space reference into another contract) can reuse the\n* same normalization instead of duplicating it.\n*\n* `hostTable` is the table the FK is declared on (i.e. `table`, not the\n* referenced parent) — its own indexes/uniques/primary key are what a\n* backing index for this FK would be. When none of them exactly match the\n* FK's source columns (in order), `index: false` is stamped so the emitted\n* `@relation` opts out of the framework's default derived backing-index\n* expectation, matching what `db verify` will find live. Passing the table\n* is optional so existing single-FK callers (e.g. cross-space resolution\n* before a host table reference is threaded through) can omit it and keep\n* the framework default.\n*/\nfunction buildChildRelationField(fieldName, parentModelName, fk, optional, relationName, hostTable) {\n\tconst onDelete = fk.onDelete && fk.onDelete !== DEFAULT_ON_DELETE ? fk.onDelete : void 0;\n\tconst onUpdate = fk.onUpdate && fk.onUpdate !== DEFAULT_ON_UPDATE ? fk.onUpdate : void 0;\n\tconst index = hostTable && !isBackedByColumnKeys(fk.columns, backingIndexColumnKeys({\n\t\tindexes: hostTable.indexes.filter((i) => i.where === void 0),\n\t\tuniques: hostTable.uniques,\n\t\tprimaryKey: hostTable.primaryKey\n\t})) ? false : void 0;\n\treturn {\n\t\tfieldName,\n\t\ttypeName: parentModelName,\n\t\treferencedTableName: fk.referencedTable,\n\t\toptional,\n\t\tlist: false,\n\t\trelationName,\n\t\tfkName: fk.name,\n\t\tfields: fk.columns,\n\t\treferences: fk.referencedColumns,\n\t\tonDelete: onDelete ? REFERENTIAL_ACTION_PSL[onDelete] : void 0,\n\t\tonUpdate: onUpdate ? REFERENTIAL_ACTION_PSL[onUpdate] : void 0,\n\t\tindex\n\t};\n}\nfunction resolveUniqueFieldName(desired, usedNames, fallbackSuffix) {\n\tif (!usedNames.has(desired)) return desired;\n\tconst withSuffix = `${desired}${fallbackSuffix}`;\n\tif (!usedNames.has(withSuffix)) return withSuffix;\n\tlet counter = 2;\n\twhile (usedNames.has(`${desired}${counter}`)) counter++;\n\treturn `${desired}${counter}`;\n}\nfunction addRelationField(map, tableName, field) {\n\tconst existing = map.get(tableName);\n\tif (existing) existing.push(field);\n\telse map.set(tableName, [field]);\n}\n//#endregion\nexport { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, mapDefault, pluralize, toEnumMemberName, toEnumName, toFieldName, toModelName };\n\n//# sourceMappingURL=psl-infer.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,8BAA8B;CACnC,mBAAmB;CACnB,SAAS;AACV;AACA,SAAS,WAAW,eAAe,SAAS;CAC3C,QAAQ,cAAc,MAAtB;EACC,KAAK,WAAW;GACf,MAAM,OAAO,oBAAoB,cAAc,OAAO,OAAO;GAC7D,OAAO,SAAS,KAAK,IAAI,EAAE,SAAS,uBAAuB,KAAK,UAAU,cAAc,KAAK,IAAI,IAAI,EAAE,WAAW,YAAY,KAAK,GAAG;EACvI;EACA,KAAK,YAAY;GAChB,MAAM,YAAY,SAAS,qBAAqB,cAAc,eAAe,4BAA4B,cAAc,eAAe,SAAS,4BAA4B,cAAc,UAAU;GACnM,OAAO,YAAY,EAAE,UAAU,IAAI,EAAE,SAAS,mBAAmB,cAAc,WAAW,QAAQ,YAAY,GAAG,IAAI;EACtH;CACD;AACD;AACA,SAAS,eAAe,SAAS;CAChC,MAAM,0BAA0B,IAAI,IAAI;CACxC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM,WAAW,CAAC;CAClB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,GAAG;EACnD,IAAI,wBAAwB,KAAK,GAAG;EACpC,MAAM,UAAU,MAAM;EACtB,IAAI,QAAQ,SAAS,OAAO;GAC3B,QAAQ,IAAI,KAAK,KAAK;GACtB,SAAS,KAAK,WAAW,GAAG,CAAC;GAC7B;EACD;EACA,IAAI,QAAQ,WAAW,UAAU;GAChC,WAAW,QAAQ;GACnB,KAAK,MAAM,QAAQ,QAAQ,OAAO,QAAQ,IAAI,MAAM,KAAK;GACzD;EACD;EACA,QAAQ,IAA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AI,GAAG,UAAU,SAAS,GAAG;CAC9C,OAAO,GAAG,UAAU;AACrB;AACA,SAAS,iBAAiB,KAAK,WAAW,OAAO;CAChD,MAAM,WAAW,IAAI,IAAI,SAAS;CAClC,IAAI,UAAU,SAAS,KAAK,KAAK;MAC5B,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC;AAChC"}
@@ -1,11 +1,24 @@
1
- import { d as SqlForeignKeyIR, y as SqlTableIR } from "./types-CHOgKgHg-DMlDrQz6.mjs";
2
- import "./types-D3XRY_cO.mjs";
1
+ import { d as SqlForeignKeyIR, y as SqlTableIR } from "./types-CHOgKgHg-BxgkL3GS.mjs";
2
+ import "./types-BijNazlM.mjs";
3
+ import { AuthoringDataTypeEntry } from "@prisma/orm-framework/components/authoring";
3
4
  import { ColumnDefault } from "@prisma/orm-framework/contract/types";
5
+ import { DataTypeId, DataTypeLookup } from "@prisma/orm-framework/components/codec";
4
6
  //#region ../../../2-sql/9-family/dist/psl-infer.d.mts
5
7
  //#region src/core/psl-contract-infer/default-mapping.d.ts
6
8
  interface DefaultMappingOptions {
7
9
  readonly functionAttributes?: Readonly<Record<string, string>>;
8
10
  readonly fallbackFunctionAttribute?: ((expression: string) => string | undefined) | undefined;
11
+ /** PSL support for the stack's data types, keyed by data type id. */
12
+ readonly dataTypeEntries?: Readonly<Record<string, AuthoringDataTypeEntry>> | undefined;
13
+ /** The stack's data types, whose casts say which other types' values each one takes. */
14
+ readonly dataTypes?: DataTypeLookup | undefined;
15
+ /** The data type of the column's codec. */
16
+ readonly columnDataType?: DataTypeId | undefined;
17
+ /**
18
+ * Whether the column is a list, whose elements each carry the column's own data type. A written
19
+ * list on a scalar column goes through that type's list cast instead.
20
+ */
21
+ readonly list?: boolean;
9
22
  }
10
23
  type DefaultMappingResult = {
11
24
  readonly attribute: string;
@@ -113,4 +126,4 @@ declare function inferRelations(tables: Record<string, SqlTableIR>, modelNameMap
113
126
  declare function buildChildRelationField(fieldName: string, parentModelName: string, fk: SqlForeignKeyIR, optional: boolean, relationName?: string, hostTable?: SqlTableIR): RelationField;
114
127
  //#endregion
115
128
  export { toEnumName as _, PslPrinterOptions as a, PslTypeResolution as c, deriveBackRelationFieldName as d, deriveRelationFieldName as f, toEnumMemberName as g, pluralize as h, InferredRelations as i, RelationField as l, mapDefault as m, DefaultMappingResult as n, PslTypeMap as o, inferRelations as p, EnumInfo as r, PslTypeReference as s, DefaultMappingOptions as t, buildChildRelationField as u, toFieldName as v, toModelName as y };
116
- //# sourceMappingURL=psl-infer-CLZsT2Hz.d.mts.map
129
+ //# sourceMappingURL=psl-infer-DQCWvJtk.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"psl-infer-DQCWvJtk.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-infer.d.mts"],"mappings":";;;;;;;UAKU;WACC,qBAAqB,SAAS;WAC9B,8BAA8B;;WAE9B,kBAAkB,SAAS,eAAe;;WAE1C,YAAY;;WAEZ,iBAAiB;;;;;WAKjB;;KAEN;WACM;;WAEA;;iBAEM,WAAW,eAAe,eAAe,UAAU,wBAAwB;;;KAGvF;WACM;WACA;;iBAEM,YAAY,oBAAoB;iBAChC,YAAY,qBAAqB;iBACjC,WAAW,qBAAqB;;;;;;;iBAOhC,iBAAiB;iBACjB,UAAU;iBACV,wBAAwB,8BAA8B;iBACtD,4BAA4B,wBAAwB;;;KAGhE;WACM;WACA;;KAEN;WACM,SAAS;WACT;WACA,aAAa;;WAEb;WACA;;UAED;EACR,QAAQ,oBAAoB,cAAc,0BAA0B;;UAE5D;WACC,WAAW;WACX,aAAa;;UAEd;WACC,SAAS;WACT,iBAAiB;WACjB,WAAW;WACX,mBAAmB,oBAAoB,wBAAwB;;KAErE;WACM;WACA;;;;;;WAMA;;;;;;WAMA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;;;KAIN;WACM,kBAAkB,6BAA6B;;iBAEzC,eAAe,QAAQ,eAAe,aAAa,cAAc,8BAA8B;;;;;;;;;;;;;;;;;;;iBAmB/F,wBAAwB,mBAAmB,yBAAyB,IAAI,iBAAiB,mBAAmB,uBAAuB,YAAY,aAAa"}
@@ -1,11 +1,11 @@
1
1
  import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
2
- import "./types-BmgtemBx.mjs";
3
- import { a as SqlOperationRegistry } from "./index-C6_--MKi.mjs";
4
- import { O as ContractCodecRegistry, s as AnyExpression } from "./types-BXSw7th1-pL1Iggyd.mjs";
2
+ import "./types-C36_3E6_.mjs";
3
+ import { a as SqlOperationRegistry } from "./index-CLAshwKN.mjs";
4
+ import { c as AnyExpression, k as ContractCodecRegistry } from "./types-YGX78yVc-BBy1pp_1.mjs";
5
5
  import { Contract } from "@prisma/orm-framework/contract/types";
6
- import { AggregateDescriptor, AggregateResultNullability } from "@prisma/orm-framework/components/components";
7
6
  import { CodecDescriptor, CodecRef } from "@prisma/orm-framework/components/codec";
8
- //#region ../../../2-sql/4-lanes/relational-core/dist/query-lane-context-QIUURgPP.d.mts
7
+ import { AggregateDescriptor, AggregateResultNullability } from "@prisma/orm-framework/components/components";
8
+ //#region ../../../2-sql/4-lanes/relational-core/dist/query-lane-context-BUNC86DS.d.mts
9
9
  //#region src/aggregate-descriptor.d.ts
10
10
  /**
11
11
  * What a lowering hook is handed: the expression being aggregated (absent for operations that consume no value) and the codec of that expression.
@@ -148,4 +148,4 @@ interface ExecutionContext<TContract extends Contract<SqlStorage> = Contract<Sql
148
148
  }
149
149
  //#endregion
150
150
  export { MutationDefaultsOptions as a, SqlAggregateDescriptorRegistry as c, TypeHelperRegistry as d, isSqlAggregateDescriptor as f, MutationDefaultsOp as i, SqlAggregateLowering as l, CodecDescriptorRegistry as n, ResolvedSqlAggregate as o, ExecutionContext as r, SqlAggregateDescriptor as s, AppliedMutationDefault as t, SqlAggregateLoweringContext as u };
151
- //# sourceMappingURL=query-lane-context-QIUURgPP-CvQ9jQRm.d.mts.map
151
+ //# sourceMappingURL=query-lane-context-BUNC86DS-C_hIrqaW.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-lane-context-QIUURgPP-CvQ9jQRm.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-QIUURgPP.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;KAOxC,uBAAuB;WACjB;WACA,QAAQ;WACR,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
1
+ {"version":3,"file":"query-lane-context-BUNC86DS-C_hIrqaW.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/relational-core/dist/query-lane-context-BUNC86DS.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC,MAAM;WACN,YAAY;;;;;;;KAOlB,wBAAwB,SAAS,gCAAgC;;;;;;;;KAQjE,yBAAyB;WACnB,QAAQ;;;iBAGF,yBAAyB,iBAAiB,SAAS;;;;;;UAM1D;;;;EAIR,cAAc,kBAAkB;;;;;;;;;;;;;;EAchC,kBAAkB,qBAAqB,eAAe,iBAAiB;;;;EAIvE,UAAU,iBAAiB;;;;EAI3B,aAAa,8BAA8B;;;;;;;KAOxC,uBAAuB;WACjB;WACA,QAAQ;WACR,OAAO;;;;;;;UAOR;;;;;;EAMR,QAAQ,mBAAmB,QAAQ,WAAW;;EAE9C,UAAU,iBAAiB;;;;;KAKxB,qBAAqB;KACrB;KACA;WACM;WACA;;KAEN;WACM,IAAI;WACJ;;;;;;;;WAQA;WACA,QAAQ;;;;;WAKR,oBAAoB;;;;;;;UAOrB,iBAAiB,kBAAkB,SAAS,cAAc,SAAS;WAClE,UAAU;;;;WAIV,gBAAgB;;;;WAIhB,kBAAkB;;;;WAIlB,sBAAsB;WACtB,iBAAiB;;;;WAIjB,OAAO;;;;EAIhB,sBAAsB,SAAS,0BAA0B,cAAc"}
@@ -0,0 +1 @@
1
+ import "./query-lane-context-BUNC86DS-C_hIrqaW.mjs";