@prisma/orm-family-sql 8.0.0-rc.18-dev.29 → 8.0.0-rc.18-dev.31

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 (164) hide show
  1. package/dist/{ast-CBO3PEJF.mjs → ast-BJs2669T.mjs} +47 -12
  2. package/dist/ast-BJs2669T.mjs.map +1 -0
  3. package/dist/{ast-Cq7uhA86.d.mts → ast-DB7g9Mh2.d.mts} +29 -2
  4. package/dist/ast-DB7g9Mh2.d.mts.map +1 -0
  5. package/dist/{attribute-specs-D9QcPJpj.d.mts → attribute-specs-BzBk62Jx.d.mts} +10 -4
  6. package/dist/{attribute-specs-D9QcPJpj.d.mts.map → attribute-specs-BzBk62Jx.d.mts.map} +1 -1
  7. package/dist/{authoring-entity-types-CZ-vdwYS-CSU65LVs.d.mts → authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts} +2 -2
  8. package/dist/{authoring-entity-types-CZ-vdwYS-CSU65LVs.d.mts.map → authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts.map} +1 -1
  9. package/dist/builder.d.mts +1 -1
  10. package/dist/builder__runtime.d.mts +1 -1
  11. package/dist/builder__runtime.mjs +1 -1
  12. package/dist/builder__types.d.mts +1 -1
  13. package/dist/{config-types-BJxHMPGt.mjs → config-types-BkcCqeAg.mjs} +2 -2
  14. package/dist/{config-types-BJxHMPGt.mjs.map → config-types-BkcCqeAg.mjs.map} +1 -1
  15. package/dist/{contract-builder-CrWbrtE4.mjs → contract-builder-D3XaKpyw.mjs} +96 -11
  16. package/dist/contract-builder-D3XaKpyw.mjs.map +1 -0
  17. package/dist/{contract-builder-D-RSOsnc.d.mts → contract-builder-GH-eCIpl.d.mts} +18 -2
  18. package/dist/contract-builder-GH-eCIpl.d.mts.map +1 -0
  19. package/dist/contract-prisma7__provider.d.mts +1 -3
  20. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  21. package/dist/contract-prisma7__provider.mjs +41 -12
  22. package/dist/contract-prisma7__provider.mjs.map +1 -1
  23. package/dist/contract-psl.d.mts +5 -3
  24. package/dist/contract-psl.d.mts.map +1 -1
  25. package/dist/contract-psl.mjs +1 -1
  26. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  27. package/dist/contract-psl__attribute-specs.mjs +1 -1
  28. package/dist/contract-psl__diagnostics.mjs +1 -1
  29. package/dist/contract-psl__provider.mjs +3 -2
  30. package/dist/contract-psl__provider.mjs.map +1 -1
  31. package/dist/contract-ts.d.mts +1 -1
  32. package/dist/contract-ts.mjs +3 -3
  33. package/dist/contract-ts__config-types.mjs +1 -1
  34. package/dist/contract-ts__contract-builder.d.mts +1 -1
  35. package/dist/contract-ts__contract-builder.mjs +2 -2
  36. package/dist/contract.d.mts +3 -3
  37. package/dist/contract.mjs +6 -6
  38. package/dist/contract__data-type.d.mts +2 -2
  39. package/dist/contract__data-type.mjs +3 -3
  40. package/dist/contract__foreign-key-materialization.d.mts +1 -1
  41. package/dist/contract__foreign-key-materialization.mjs +2 -2
  42. package/dist/contract__validators.mjs +1 -1
  43. package/dist/{control-C56VTBHJ.d.mts → control-Db07JiRl.d.mts} +93 -16
  44. package/dist/control-Db07JiRl.d.mts.map +1 -0
  45. package/dist/{control-CnKhMUQJ.mjs → control-DbHnaxDE.mjs} +17 -12
  46. package/dist/control-DbHnaxDE.mjs.map +1 -0
  47. package/dist/{control-adapter-DhX77V61.mjs → control-adapter-BX5COBWO.mjs} +2 -2
  48. package/dist/{control-adapter-DhX77V61.mjs.map → control-adapter-BX5COBWO.mjs.map} +1 -1
  49. package/dist/{control-adapter-BCopdpsT-BPHa2Frw.d.mts → control-adapter-Bn0uhplA-BnsQY8_q.d.mts} +5 -5
  50. package/dist/{control-adapter-BCopdpsT-BPHa2Frw.d.mts.map → control-adapter-Bn0uhplA-BnsQY8_q.d.mts.map} +1 -1
  51. package/dist/{control-adapter-ChJhp5vV.d.mts → control-adapter-DgxEVzhZ.d.mts} +4 -4
  52. package/dist/{control-adapter-ChJhp5vV.d.mts.map → control-adapter-DgxEVzhZ.d.mts.map} +1 -1
  53. package/dist/{data-type-C84xngfv.d.mts → data-type-DMk-fLAZ.d.mts} +38 -8
  54. package/dist/data-type-DMk-fLAZ.d.mts.map +1 -0
  55. package/dist/data-type-HNhSslwG.mjs +67 -0
  56. package/dist/data-type-HNhSslwG.mjs.map +1 -0
  57. package/dist/{db-BmrN9nRS-BzK96yVh.d.mts → db-BmrN9nRS-BGnRxI7X.d.mts} +2 -2
  58. package/dist/{db-BmrN9nRS-BzK96yVh.d.mts.map → db-BmrN9nRS-BGnRxI7X.d.mts.map} +1 -1
  59. package/dist/{derived-checks-sRZp_gTF-ermwhVGQ.mjs → derived-checks-B1qNxwBL-DFoGexId.mjs} +17 -5
  60. package/dist/derived-checks-B1qNxwBL-DFoGexId.mjs.map +1 -0
  61. package/dist/{diagnostics-C8YevjSU.mjs → diagnostics-xqFRhSin.mjs} +2 -2
  62. package/dist/{diagnostics-C8YevjSU.mjs.map → diagnostics-xqFRhSin.mjs.map} +1 -1
  63. package/dist/{diff-ClZvIVOl.d.mts → diff-BN_3K9lv.d.mts} +5 -5
  64. package/dist/{diff-ClZvIVOl.d.mts.map → diff-BN_3K9lv.d.mts.map} +1 -1
  65. package/dist/family.d.mts +11 -11
  66. package/dist/family.mjs +9 -8
  67. package/dist/family__control-adapter.d.mts +2 -2
  68. package/dist/family__control-adapter.mjs +1 -1
  69. package/dist/family__control.d.mts +3 -3
  70. package/dist/family__control.mjs +3 -3
  71. package/dist/family__diff.d.mts +1 -1
  72. package/dist/family__diff.mjs +1 -1
  73. package/dist/family__ir.mjs +1 -1
  74. package/dist/family__migration.d.mts +1 -1
  75. package/dist/family__pack.d.mts +2 -2
  76. package/dist/family__pack.mjs +8 -3
  77. package/dist/family__pack.mjs.map +1 -1
  78. package/dist/family__psl-build.d.mts +2 -2
  79. package/dist/family__psl-build.mjs +2 -2
  80. package/dist/family__psl-infer.d.mts +1 -1
  81. package/dist/family__psl-infer.mjs +1 -1
  82. package/dist/{foreign-key-materialization-C_FPLzj3.mjs → foreign-key-materialization-BPQqd0qF.mjs} +2 -2
  83. package/dist/{foreign-key-materialization-C_FPLzj3.mjs.map → foreign-key-materialization-BPQqd0qF.mjs.map} +1 -1
  84. package/dist/{foreign-key-materialization-3vQnPT_D.d.mts → foreign-key-materialization-bL-t2oPB.d.mts} +3 -3
  85. package/dist/{foreign-key-materialization-3vQnPT_D.d.mts.map → foreign-key-materialization-bL-t2oPB.d.mts.map} +1 -1
  86. package/dist/generator-functions-BoE7Lc9d-MgcgdnPZ.mjs +483 -0
  87. package/dist/generator-functions-BoE7Lc9d-MgcgdnPZ.mjs.map +1 -0
  88. package/dist/{index-B0hZw3uT.d.mts → index-Bw9Y19Js.d.mts} +3 -3
  89. package/dist/{index-B0hZw3uT.d.mts.map → index-Bw9Y19Js.d.mts.map} +1 -1
  90. package/dist/{index-equivalence-DswCiq5l-C6SAs-Yz.mjs → index-equivalence-DswCiq5l-D5VK0qTy.mjs} +2 -2
  91. package/dist/{index-equivalence-DswCiq5l-C6SAs-Yz.mjs.map → index-equivalence-DswCiq5l-D5VK0qTy.mjs.map} +1 -1
  92. package/dist/{interpreter-kQuqdyeP-B-rzJDWE.mjs → interpreter-Bk0xpelv-4laiO5dH.mjs} +10 -10
  93. package/dist/interpreter-Bk0xpelv-4laiO5dH.mjs.map +1 -0
  94. package/dist/{migration-RrhpTP1o.d.mts → migration-go6YP7-v.d.mts} +2 -2
  95. package/dist/{migration-RrhpTP1o.d.mts.map → migration-go6YP7-v.d.mts.map} +1 -1
  96. package/dist/orm-client.d.mts +3 -3
  97. package/dist/orm-client.mjs +1 -1
  98. package/dist/{pack-DNdZwm5w.d.mts → pack-DXEOdHaM.d.mts} +91 -4
  99. package/dist/pack-DXEOdHaM.d.mts.map +1 -0
  100. package/dist/{psl-build-BT8Ue6gd.mjs → psl-build-BYqCjsqi.mjs} +47 -138
  101. package/dist/psl-build-BYqCjsqi.mjs.map +1 -0
  102. package/dist/psl-build-C41KHJL_.d.mts +108 -0
  103. package/dist/psl-build-C41KHJL_.d.mts.map +1 -0
  104. package/dist/{psl-column-resolution-BCkhNzOK-DyfXnB-9.d.mts → psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts} +3 -3
  105. package/dist/psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts.map +1 -0
  106. package/dist/{psl-field-resolution-C1E-_fQq-VUYD8cnS.mjs → psl-field-resolution-BET6wtHZ-C_hO6YE1.mjs} +111 -47
  107. package/dist/psl-field-resolution-BET6wtHZ-C_hO6YE1.mjs.map +1 -0
  108. package/dist/{psl-infer-I75woGr4.d.mts → psl-infer-CALmBIqX.d.mts} +3 -3
  109. package/dist/{psl-infer-I75woGr4.d.mts.map → psl-infer-CALmBIqX.d.mts.map} +1 -1
  110. package/dist/{psl-infer-Bz34csvN.mjs → psl-infer-CaEnF_x3.mjs} +2 -2
  111. package/dist/{psl-infer-Bz34csvN.mjs.map → psl-infer-CaEnF_x3.mjs.map} +1 -1
  112. package/dist/relational-core.d.mts +2 -2
  113. package/dist/relational-core.mjs +2 -2
  114. package/dist/relational-core__ast.d.mts +2 -2
  115. package/dist/relational-core__ast.mjs +2 -2
  116. package/dist/runtime.d.mts +3 -3
  117. package/dist/runtime__internal__prepared-query.d.mts +1 -1
  118. package/dist/{schema-differ-DmP74bB8-CIQ17HTk.d.mts → schema-differ-DmP74bB8-BfEQ_9cY.d.mts} +3 -3
  119. package/dist/{schema-differ-DmP74bB8-CIQ17HTk.d.mts.map → schema-differ-DmP74bB8-BfEQ_9cY.d.mts.map} +1 -1
  120. package/dist/schema-ir.d.mts +1 -1
  121. package/dist/schema-ir.mjs +1 -1
  122. package/dist/schema-ir__types.d.mts +2 -2
  123. package/dist/schema-ir__types.mjs +1 -1
  124. package/dist/{schema-verify-BwRdzbHb-nDeE75xa.mjs → schema-verify-BwRdzbHb-BzdgK4xv.mjs} +2 -2
  125. package/dist/{schema-verify-BwRdzbHb-nDeE75xa.mjs.map → schema-verify-BwRdzbHb-BzdgK4xv.mjs.map} +1 -1
  126. package/dist/{sql-contract-serializer-sMY3prTx-BT6HdXAE.mjs → sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs} +2 -2
  127. package/dist/{sql-contract-serializer-sMY3prTx-BT6HdXAE.mjs.map → sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs.map} +1 -1
  128. package/dist/{sql-data-type-BSi0X331-OXbBFXDh.mjs → sql-data-type-D5cI3M07-DIcPP8s1.mjs} +26 -9
  129. package/dist/sql-data-type-D5cI3M07-DIcPP8s1.mjs.map +1 -0
  130. package/dist/{transaction-state-DR3nKTmH-DbyhuL-z.d.mts → transaction-state-DR3nKTmH-D_pb9QgR.d.mts} +2 -2
  131. package/dist/{transaction-state-DR3nKTmH-DbyhuL-z.d.mts.map → transaction-state-DR3nKTmH-D_pb9QgR.d.mts.map} +1 -1
  132. package/dist/types-D_nlUp-1.d.mts +1 -0
  133. package/dist/{types-B3AHHPDh-BHh-89fY.d.mts → types-DiD6BqoN-ZF53hwPp.d.mts} +11 -3
  134. package/dist/types-DiD6BqoN-ZF53hwPp.d.mts.map +1 -0
  135. package/dist/{types-DKU4GeqD-CUClXCme.d.mts → types-DlFdMaDJ-BEDwj-Qv.d.mts} +5 -5
  136. package/dist/{types-DKU4GeqD-CUClXCme.d.mts.map → types-DlFdMaDJ-BEDwj-Qv.d.mts.map} +1 -1
  137. package/dist/{types-egs_vme1-DRhYFwIT.mjs → types-DoyiTsjg-DDTmYyNY.mjs} +22 -2
  138. package/dist/types-DoyiTsjg-DDTmYyNY.mjs.map +1 -0
  139. package/dist/{validators-BCRydDG7.mjs → validators-BlONfdFH.mjs} +3 -3
  140. package/dist/{validators-BCRydDG7.mjs.map → validators-BlONfdFH.mjs.map} +1 -1
  141. package/package.json +18 -18
  142. package/dist/ast-CBO3PEJF.mjs.map +0 -1
  143. package/dist/ast-Cq7uhA86.d.mts.map +0 -1
  144. package/dist/authoring-type-constructors-0Iv2zdwS-D4LlP1q2.mjs +0 -266
  145. package/dist/authoring-type-constructors-0Iv2zdwS-D4LlP1q2.mjs.map +0 -1
  146. package/dist/contract-builder-CrWbrtE4.mjs.map +0 -1
  147. package/dist/contract-builder-D-RSOsnc.d.mts.map +0 -1
  148. package/dist/control-C56VTBHJ.d.mts.map +0 -1
  149. package/dist/control-CnKhMUQJ.mjs.map +0 -1
  150. package/dist/data-type-C84xngfv.d.mts.map +0 -1
  151. package/dist/data-type-DKk8Unnz.mjs +0 -20
  152. package/dist/data-type-DKk8Unnz.mjs.map +0 -1
  153. package/dist/derived-checks-sRZp_gTF-ermwhVGQ.mjs.map +0 -1
  154. package/dist/interpreter-kQuqdyeP-B-rzJDWE.mjs.map +0 -1
  155. package/dist/pack-DNdZwm5w.d.mts.map +0 -1
  156. package/dist/psl-build-BT8Ue6gd.mjs.map +0 -1
  157. package/dist/psl-build-DU55bjfu.d.mts +0 -157
  158. package/dist/psl-build-DU55bjfu.d.mts.map +0 -1
  159. package/dist/psl-column-resolution-BCkhNzOK-DyfXnB-9.d.mts.map +0 -1
  160. package/dist/psl-field-resolution-C1E-_fQq-VUYD8cnS.mjs.map +0 -1
  161. package/dist/sql-data-type-BSi0X331-OXbBFXDh.mjs.map +0 -1
  162. package/dist/types-B3AHHPDh-BHh-89fY.d.mts.map +0 -1
  163. package/dist/types-BGERR8XF.d.mts +0 -1
  164. package/dist/types-egs_vme1-DRhYFwIT.mjs.map +0 -1
@@ -0,0 +1,483 @@
1
+ import { c as enumType } from "./contract-builder-D3XaKpyw.mjs";
2
+ import { c as SQL_TEXT_CODEC_ID, i as SQL_CHAR_CODEC_ID, l as SQL_VARCHAR_CODEC_ID } from "./ast-BJs2669T.mjs";
3
+ import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
4
+ import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
5
+ import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
6
+ import { blockAttribute, int, jsonValue, mapBlock, num, oneOf, optional, str } from "@prisma/orm-framework/psl-parser";
7
+ //#region ../../../2-sql/9-family/dist/generator-functions-BoE7Lc9d.mjs
8
+ function sqlFamilyEnumSpec() {
9
+ return mapBlock({
10
+ value: {
11
+ type: jsonValue(),
12
+ documentation: "The stored member value; a bare member stores its own name."
13
+ },
14
+ allowBare: true
15
+ });
16
+ }
17
+ const sqlFamilyEntityTypes = { enum: {
18
+ kind: "entity",
19
+ discriminator: "enum",
20
+ output: { factory: (block, ctx) => {
21
+ const sourceId = ctx.sourceId ?? "unknown";
22
+ const diagnostics = ctx.diagnostics;
23
+ const resolved = resolveEnumCodecId(block, ctx);
24
+ if (resolved === void 0) return;
25
+ const { codecId, codecSpan } = resolved;
26
+ const descriptor = ctx.codecLookup.descriptorFor(codecId);
27
+ const codec = ctx.codecLookup.get(codecId);
28
+ if (descriptor === void 0 || codec === void 0) {
29
+ diagnostics?.push({
30
+ code: "PSL_EXTENSION_INVALID_VALUE",
31
+ message: `enum "${block.name}" @@type references unknown codec "${codecId}"`,
32
+ sourceId,
33
+ span: codecSpan
34
+ });
35
+ return;
36
+ }
37
+ const enumRefusal = enumRefusalOf(descriptor);
38
+ if (enumRefusal !== void 0) {
39
+ diagnostics?.push({
40
+ code: "PSL_EXTENSION_INVALID_VALUE",
41
+ message: `enum "${block.name}" cannot use the codec "${codecId}". ${enumRefusal}`,
42
+ sourceId,
43
+ span: codecSpan
44
+ });
45
+ return;
46
+ }
47
+ const dataType = ctx.dataTypeLookup.get(descriptor.dataType);
48
+ if (dataType === void 0) {
49
+ diagnostics?.push({
50
+ code: "PSL_EXTENSION_INVALID_VALUE",
51
+ message: `enum "${block.name}" @@type codec "${codecId}" represents data type "${descriptor.dataType}", which no component registers`,
52
+ sourceId,
53
+ span: codecSpan
54
+ });
55
+ return;
56
+ }
57
+ const [requiredParam] = requiredParamKeys(dataType);
58
+ if (requiredParam !== void 0) {
59
+ diagnostics?.push({
60
+ code: "PSL_ENUM_TYPE_NEEDS_PARAMETERS",
61
+ message: `enum "${block.name}" @@type codec "${codecId}" represents data type "${dataType.id}", which requires the parameter "${requiredParam}"; an enum block gives it none`,
62
+ sourceId,
63
+ span: codecSpan
64
+ });
65
+ return;
66
+ }
67
+ const members = readEnumBlockMembers(block, codecId, codec, ctx);
68
+ if (members === void 0) return void 0;
69
+ return enumType(block.name, { codecId }, ...members);
70
+ } }
71
+ } };
72
+ const enumTypeBlockAttribute = blockAttribute("type", {
73
+ documentation: "Selects the storage codec for this enum.",
74
+ positional: [{
75
+ key: "codecId",
76
+ type: str(),
77
+ documentation: "The fully qualified codec identifier used to store enum values."
78
+ }]
79
+ });
80
+ const sqlFamilyPslBlockDescriptors = { enum: {
81
+ kind: "pslBlock",
82
+ keyword: "enum",
83
+ documentation: "Defines an enum with named values and an inferred or explicitly selected storage codec.",
84
+ discriminator: "enum",
85
+ name: { required: true },
86
+ spec: sqlFamilyEnumSpec,
87
+ attributes: { type: () => enumTypeBlockAttribute }
88
+ } };
89
+ /**
90
+ * Family-level SQL authoring field presets.
91
+ *
92
+ * Only presets whose codec IDs align with the ID generator metadata live here
93
+ * (see `@internal/ids`). These presets are target-agnostic because the
94
+ * generator metadata fixes their codec/native-type to `sql/char@1`
95
+ * (`character`) regardless of target, and the PSL interpreter lets the
96
+ * generator override the scalar descriptor.
97
+ *
98
+ * The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID
99
+ * values as `character(36)` — portable across all SQL targets. For a native
100
+ * Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /
101
+ * `id.uuidv7Native` from `@internal/target-postgres`.
102
+ *
103
+ * Scalar presets that map to target-specific codecs (e.g. `text`, `int`,
104
+ * `boolean`, `dateTime`) are contributed by the target pack (see
105
+ * `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the
106
+ * TS callback surface and the PSL scalar surface lower to byte-identical
107
+ * contracts for the active target.
108
+ */
109
+ const CHARACTER_CODEC_ID = "sql/char@1";
110
+ const nanoidOptionsArgument = {
111
+ kind: "object",
112
+ optional: true,
113
+ properties: { size: {
114
+ kind: "number",
115
+ optional: true,
116
+ integer: true,
117
+ minimum: 2,
118
+ maximum: 255
119
+ } }
120
+ };
121
+ const sqlFamilyAuthoringFieldPresets = {
122
+ uuidString: {
123
+ kind: "fieldPreset",
124
+ output: {
125
+ codecId: CHARACTER_CODEC_ID,
126
+ typeParams: { length: 36 }
127
+ }
128
+ },
129
+ ulid: {
130
+ kind: "fieldPreset",
131
+ output: {
132
+ codecId: CHARACTER_CODEC_ID,
133
+ typeParams: { length: 26 }
134
+ }
135
+ },
136
+ nanoid: {
137
+ kind: "fieldPreset",
138
+ args: [nanoidOptionsArgument],
139
+ output: {
140
+ codecId: CHARACTER_CODEC_ID,
141
+ typeParams: { length: {
142
+ kind: "arg",
143
+ index: 0,
144
+ path: ["size"],
145
+ default: 21
146
+ } }
147
+ }
148
+ },
149
+ cuid2: {
150
+ kind: "fieldPreset",
151
+ output: {
152
+ codecId: CHARACTER_CODEC_ID,
153
+ typeParams: { length: 24 }
154
+ }
155
+ },
156
+ ksuid: {
157
+ kind: "fieldPreset",
158
+ output: {
159
+ codecId: CHARACTER_CODEC_ID,
160
+ typeParams: { length: 27 }
161
+ }
162
+ },
163
+ id: {
164
+ uuidv4String: {
165
+ kind: "fieldPreset",
166
+ output: {
167
+ codecId: CHARACTER_CODEC_ID,
168
+ typeParams: { length: 36 },
169
+ executionDefaults: { onCreate: {
170
+ kind: "generator",
171
+ id: "uuidv4"
172
+ } },
173
+ id: true
174
+ }
175
+ },
176
+ uuidv7String: {
177
+ kind: "fieldPreset",
178
+ output: {
179
+ codecId: CHARACTER_CODEC_ID,
180
+ typeParams: { length: 36 },
181
+ executionDefaults: { onCreate: {
182
+ kind: "generator",
183
+ id: "uuidv7"
184
+ } },
185
+ id: true
186
+ }
187
+ },
188
+ ulid: {
189
+ kind: "fieldPreset",
190
+ output: {
191
+ codecId: CHARACTER_CODEC_ID,
192
+ typeParams: { length: 26 },
193
+ executionDefaults: { onCreate: {
194
+ kind: "generator",
195
+ id: "ulid"
196
+ } },
197
+ id: true
198
+ }
199
+ },
200
+ nanoid: {
201
+ kind: "fieldPreset",
202
+ args: [nanoidOptionsArgument],
203
+ output: {
204
+ codecId: CHARACTER_CODEC_ID,
205
+ typeParams: { length: {
206
+ kind: "arg",
207
+ index: 0,
208
+ path: ["size"],
209
+ default: 21
210
+ } },
211
+ executionDefaults: { onCreate: {
212
+ kind: "generator",
213
+ id: "nanoid",
214
+ params: { size: {
215
+ kind: "arg",
216
+ index: 0,
217
+ path: ["size"]
218
+ } }
219
+ } },
220
+ id: true
221
+ }
222
+ },
223
+ cuid2: {
224
+ kind: "fieldPreset",
225
+ output: {
226
+ codecId: CHARACTER_CODEC_ID,
227
+ typeParams: { length: 24 },
228
+ executionDefaults: { onCreate: {
229
+ kind: "generator",
230
+ id: "cuid2"
231
+ } },
232
+ id: true
233
+ }
234
+ },
235
+ ksuid: {
236
+ kind: "fieldPreset",
237
+ output: {
238
+ codecId: CHARACTER_CODEC_ID,
239
+ typeParams: { length: 27 },
240
+ executionDefaults: { onCreate: {
241
+ kind: "generator",
242
+ id: "ksuid"
243
+ } },
244
+ id: true
245
+ }
246
+ }
247
+ }
248
+ };
249
+ const sqlFamilyAuthoringTypes = {
250
+ Raw: {
251
+ kind: "typeConstructor",
252
+ documentation: "A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(\"tsvector\"). Its values are typed unknown, and its default is a sql expression.",
253
+ args: [{
254
+ kind: "string",
255
+ name: "sql"
256
+ }],
257
+ output: {
258
+ codecId: "sql/raw@1",
259
+ typeParams: { sql: {
260
+ kind: "arg",
261
+ index: 0
262
+ } }
263
+ }
264
+ },
265
+ sql: { String: {
266
+ kind: "typeConstructor",
267
+ documentation: "Variable-length text with a required maximum character length.",
268
+ args: [{
269
+ kind: "number",
270
+ name: "length",
271
+ integer: true
272
+ }],
273
+ output: {
274
+ codecId: "sql/varchar@1",
275
+ typeParams: { length: {
276
+ kind: "arg",
277
+ index: 0
278
+ } }
279
+ }
280
+ } }
281
+ };
282
+ const NANOID_DEFAULT_SIZE = 21;
283
+ const NANOID_MIN_SIZE = 2;
284
+ const NANOID_MAX_SIZE = 255;
285
+ const nowSignature = { documentation: "Writes the current time, as the column's codec represents it." };
286
+ const uuidSignature = {
287
+ documentation: "Generates a UUID when a value is not supplied.",
288
+ positional: [{
289
+ key: "version",
290
+ type: optional(oneOf(num(4), num(7))),
291
+ documentation: "The UUID version: `4` or `7`. Defaults to `4`."
292
+ }]
293
+ };
294
+ const cuidSignature = {
295
+ documentation: "Generates a CUID2 identifier when a value is not supplied.",
296
+ positional: [{
297
+ key: "version",
298
+ type: num(2),
299
+ documentation: "The CUID version. Only `2` is supported."
300
+ }]
301
+ };
302
+ const ulidSignature = { documentation: "Generates a ULID when a value is not supplied." };
303
+ const nanoidSignature = {
304
+ documentation: "Generates a Nano ID when a value is not supplied.",
305
+ positional: [{
306
+ key: "size",
307
+ type: optional(int({
308
+ min: NANOID_MIN_SIZE,
309
+ max: NANOID_MAX_SIZE
310
+ })),
311
+ documentation: "The identifier length, from `2` through `255`. Defaults to 21."
312
+ }]
313
+ };
314
+ const ksuidSignature = { documentation: "Generates a KSUID when a value is not supplied." };
315
+ function refused(message) {
316
+ return {
317
+ ok: false,
318
+ message
319
+ };
320
+ }
321
+ function generated(id, params) {
322
+ return {
323
+ ok: true,
324
+ generator: params === void 0 ? {
325
+ kind: "generator",
326
+ id
327
+ } : {
328
+ kind: "generator",
329
+ id,
330
+ params
331
+ }
332
+ };
333
+ }
334
+ function uuidBinding(codecIds) {
335
+ return {
336
+ codecIds,
337
+ generatorIds: ["uuidv4", "uuidv7"],
338
+ resolve: ({ args }) => {
339
+ const version = args["version"];
340
+ if (version === void 0 || version === 4) return generated("uuidv4");
341
+ if (version === 7) return generated("uuidv7");
342
+ return refused(`uuid takes version 4 or 7, not ${String(version)}.`);
343
+ },
344
+ printArguments: (generator) => {
345
+ if (generator.id === "uuidv4") return {
346
+ args: {},
347
+ text: ""
348
+ };
349
+ if (generator.id === "uuidv7") return {
350
+ args: { version: 7 },
351
+ text: "7"
352
+ };
353
+ }
354
+ };
355
+ }
356
+ function cuidBinding(codecIds) {
357
+ return {
358
+ codecIds,
359
+ generatorIds: ["cuid2"],
360
+ resolve: ({ args }) => {
361
+ const version = args["version"];
362
+ return version === 2 ? generated("cuid2") : refused(`cuid takes version 2, not ${String(version)}.`);
363
+ },
364
+ printArguments: (generator) => generator.id === "cuid2" ? {
365
+ args: { version: 2 },
366
+ text: "2"
367
+ } : void 0
368
+ };
369
+ }
370
+ function columnLength(field) {
371
+ const length = field.typeParams?.["length"];
372
+ return typeof length === "number" ? length : void 0;
373
+ }
374
+ function isNanoidSize(size) {
375
+ return typeof size === "number" && Number.isInteger(size) && size >= NANOID_MIN_SIZE && size <= NANOID_MAX_SIZE;
376
+ }
377
+ /**
378
+ * A Nano ID has the size the call gives, or 21; the column's length never sets it. A size larger than the column's length is refused, since the identifier would not fit. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.
379
+ */
380
+ function nanoidBinding(codecIds) {
381
+ return {
382
+ codecIds,
383
+ generatorIds: ["nanoid"],
384
+ resolve: ({ args, field }) => {
385
+ const explicit = args["size"];
386
+ if (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid takes a size from ${NANOID_MIN_SIZE} through ${NANOID_MAX_SIZE}, not ${String(explicit)}.`);
387
+ const size = explicit ?? NANOID_DEFAULT_SIZE;
388
+ const length = columnLength(field);
389
+ if (length !== void 0 && size > length) return refused(`${explicit === void 0 ? "nanoid()" : `nanoid(${size})`} writes ${size} characters, which does not fit a column of ${length} characters.`);
390
+ return explicit === void 0 ? generated("nanoid") : generated("nanoid", { size });
391
+ },
392
+ printArguments: (generator) => {
393
+ if (generator.id !== "nanoid") return void 0;
394
+ const size = generator.params?.["size"];
395
+ return typeof size === "number" ? {
396
+ args: { size },
397
+ text: String(size)
398
+ } : {
399
+ args: {},
400
+ text: ""
401
+ };
402
+ }
403
+ };
404
+ }
405
+ /** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. */
406
+ function idGeneratorFunctionBindings(codecs) {
407
+ const { text } = codecs;
408
+ return [
409
+ {
410
+ name: "uuid",
411
+ bindings: [uuidBinding([...text, ...codecs.uuid ?? []])]
412
+ },
413
+ {
414
+ name: "cuid",
415
+ bindings: [cuidBinding(text)]
416
+ },
417
+ {
418
+ name: "ulid",
419
+ bindings: [singleGeneratorBinding({
420
+ codecIds: text,
421
+ generatorId: "ulid"
422
+ })]
423
+ },
424
+ {
425
+ name: "ksuid",
426
+ bindings: [singleGeneratorBinding({
427
+ codecIds: text,
428
+ generatorId: "ksuid"
429
+ })]
430
+ },
431
+ {
432
+ name: "nanoid",
433
+ bindings: [nanoidBinding(text)]
434
+ }
435
+ ];
436
+ }
437
+ const familyIdBindings = idGeneratorFunctionBindings({ text: [
438
+ SQL_CHAR_CODEC_ID,
439
+ SQL_VARCHAR_CODEC_ID,
440
+ SQL_TEXT_CODEC_ID
441
+ ] });
442
+ function familyBindingsOf(name) {
443
+ return familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];
444
+ }
445
+ /** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */
446
+ const sqlFamilyGeneratorFunctions = [
447
+ {
448
+ name: "now",
449
+ signature: nowSignature,
450
+ bindings: []
451
+ },
452
+ {
453
+ name: "uuid",
454
+ signature: uuidSignature,
455
+ bindings: familyBindingsOf("uuid")
456
+ },
457
+ {
458
+ name: "cuid",
459
+ signature: cuidSignature,
460
+ bindings: familyBindingsOf("cuid")
461
+ },
462
+ {
463
+ name: "ulid",
464
+ signature: ulidSignature,
465
+ bindings: familyBindingsOf("ulid")
466
+ },
467
+ {
468
+ name: "nanoid",
469
+ signature: nanoidSignature,
470
+ bindings: familyBindingsOf("nanoid")
471
+ },
472
+ {
473
+ name: "ksuid",
474
+ signature: ksuidSignature,
475
+ bindings: familyBindingsOf("ksuid")
476
+ }
477
+ ];
478
+ /** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */
479
+ const sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));
480
+ //#endregion
481
+ export { sqlFamilyGeneratorDescriptors as a, sqlFamilyEntityTypes as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
482
+
483
+ //# sourceMappingURL=generator-functions-BoE7Lc9d-MgcgdnPZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator-functions-BoE7Lc9d-MgcgdnPZ.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/generator-functions-BoE7Lc9d.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, int, jsonValue, mapBlock, num, oneOf, optional, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { SQL_CHAR_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = {\n\tRaw: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(\\\"tsvector\\\"). Its values are typed unknown, and its default is a sql expression.\",\n\t\targs: [{\n\t\t\tkind: \"string\",\n\t\t\tname: \"sql\"\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/raw@1\",\n\t\t\ttypeParams: { sql: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t},\n\tsql: { String: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"number\",\n\t\t\tname: \"length\",\n\t\t\tinteger: true\n\t\t}],\n\t\toutput: {\n\t\t\tcodecId: \"sql/varchar@1\",\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t} }\n};\n//#endregion\n//#region src/core/generator-functions.ts\nconst NANOID_DEFAULT_SIZE = 21;\nconst NANOID_MIN_SIZE = 2;\nconst NANOID_MAX_SIZE = 255;\nconst nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst uuidSignature = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSignature = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst nanoidSignature = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: NANOID_MIN_SIZE,\n\t\t\tmax: NANOID_MAX_SIZE\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Defaults to 21.\"\n\t}]\n};\nconst ksuidSignature = { documentation: \"Generates a KSUID when a value is not supplied.\" };\nfunction refused(message) {\n\treturn {\n\t\tok: false,\n\t\tmessage\n\t};\n}\nfunction generated(id, params) {\n\treturn {\n\t\tok: true,\n\t\tgenerator: params === void 0 ? {\n\t\t\tkind: \"generator\",\n\t\t\tid\n\t\t} : {\n\t\t\tkind: \"generator\",\n\t\t\tid,\n\t\t\tparams\n\t\t}\n\t};\n}\nfunction uuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"uuidv4\", \"uuidv7\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\tif (version === void 0 || version === 4) return generated(\"uuidv4\");\n\t\t\tif (version === 7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid takes version 4 or 7, not ${String(version)}.`);\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id === \"uuidv4\") return {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tif (generator.id === \"uuidv7\") return {\n\t\t\t\targs: { version: 7 },\n\t\t\t\ttext: \"7\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction cuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"cuid2\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\treturn version === 2 ? generated(\"cuid2\") : refused(`cuid takes version 2, not ${String(version)}.`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: 2 },\n\t\t\ttext: \"2\"\n\t\t} : void 0\n\t};\n}\nfunction columnLength(field) {\n\tconst length = field.typeParams?.[\"length\"];\n\treturn typeof length === \"number\" ? length : void 0;\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_MIN_SIZE && size <= NANOID_MAX_SIZE;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. A size larger than the column's length is refused, since the identifier would not fit. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.\n*/\nfunction nanoidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"nanoid\"],\n\t\tresolve: ({ args, field }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid takes a size from ${NANOID_MIN_SIZE} through ${NANOID_MAX_SIZE}, not ${String(explicit)}.`);\n\t\t\tconst size = explicit ?? NANOID_DEFAULT_SIZE;\n\t\t\tconst length = columnLength(field);\n\t\t\tif (length !== void 0 && size > length) return refused(`${explicit === void 0 ? \"nanoid()\" : `nanoid(${size})`} writes ${size} characters, which does not fit a column of ${length} characters.`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size });\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id !== \"nanoid\") return void 0;\n\t\t\tconst size = generator.params?.[\"size\"];\n\t\t\treturn typeof size === \"number\" ? {\n\t\t\t\targs: { size },\n\t\t\t\ttext: String(size)\n\t\t\t} : {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [uuidBinding([...text, ...codecs.uuid ?? []])]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [cuidBinding(text)]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ulid\"\n\t\t\t})]\n\t\t},\n\t\t{\n\t\t\tname: \"ksuid\",\n\t\t\tbindings: [singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ksuid\"\n\t\t\t})]\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tbindings: [nanoidBinding(text)]\n\t\t}\n\t];\n}\nconst familyIdBindings = idGeneratorFunctionBindings({ text: [\n\tSQL_CHAR_CODEC_ID,\n\tSQL_VARCHAR_CODEC_ID,\n\tSQL_TEXT_CODEC_ID\n] });\nfunction familyBindingsOf(name) {\n\treturn familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];\n}\n/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */\nconst sqlFamilyGeneratorFunctions = [\n\t{\n\t\tname: \"now\",\n\t\tsignature: nowSignature,\n\t\tbindings: []\n\t},\n\t{\n\t\tname: \"uuid\",\n\t\tsignature: uuidSignature,\n\t\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\n\t\tsignature: cuidSignature,\n\t\tbindings: familyBindingsOf(\"cuid\")\n\t},\n\t{\n\t\tname: \"ulid\",\n\t\tsignature: ulidSignature,\n\t\tbindings: familyBindingsOf(\"ulid\")\n\t},\n\t{\n\t\tname: \"nanoid\",\n\t\tsignature: nanoidSignature,\n\t\tbindings: familyBindingsOf(\"nanoid\")\n\t},\n\t{\n\t\tname: \"ksuid\",\n\t\tsignature: ksuidSignature,\n\t\tbindings: familyBindingsOf(\"ksuid\")\n\t}\n];\n/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */\nconst sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));\n//#endregion\nexport { sqlFamilyAuthoringFieldPresets as a, sqlFamilyAuthoringTypes as i, sqlFamilyGeneratorDescriptors as n, sqlFamilyEntityTypes as o, sqlFamilyGeneratorFunctions as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-BoE7Lc9d.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,UAAU;GAChB,eAAe;EAChB;EACA,WAAW;CACZ,CAAC;AACF;AACA,MAAM,uBAAuB,EAAE,MAAM;CACpC,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,UAAU,OAAO,QAAQ;EAClC,MAAM,WAAW,IAAI,YAAY;EACjC,MAAM,cAAc,IAAI;EACxB,MAAM,WAAW,mBAAmB,OAAO,GAAG;EAC9C,IAAI,aAAa,KAAK,GAAG;EACzB,MAAM,EAAE,SAAS,cAAc;EAC/B,MAAM,aAAa,IAAI,YAAY,cAAc,OAAO;EACxD,MAAM,QAAQ,IAAI,YAAY,IAAI,OAAO;EACzC,IAAI,eAAe,KAAK,KAAK,UAAU,KAAK,GAAG;GAC9C,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,qCAAqC,QAAQ;IAC1E;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,cAAc,cAAc,UAAU;EAC5C,IAAI,gBAAgB,KAAK,GAAG;GAC3B,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,0BAA0B,QAAQ,KAAK;IACpE;IACA,MAAM;GACP,CAAC;GACD;EACD;EACA,MAAM,WAAW,IAAI,eAAe,IAAI,WAAW,QAAQ;EAC3D,IAAI,aAAa,KAAK,GAAG;GACxB,aAAa,KAAK;IACjB,MAAM;IACN,SAAS,SAAS,MAAM,KAAK,kBAAkB,QAAQ,0BAA0B,WAAW,SAAS;IACrG;IACA,MAA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,CAAC;AAC1F;;AAEA,MAAM,8BAA8B;CACnC;EACC,MAAM;EACN,WAAW;EACX,UAAU,CAAC;CACZ;CACA;EACC,MAAM;EACN,WAAW;EACX,UAAU,iBAAiB,MAAM;CAClC;CACA;EACC,MAAM;EACN,WAAW;EACX,UAAU,iBAAiB,MAAM;CAClC;CACA;EACC,MAAM;EACN,WAAW;EACX,UAAU,iBAAiB,MAAM;CAClC;CACA;EACC,MAAM;EACN,WAAW;EACX,UAAU,iBAAiB,QAAQ;CACpC;CACA;EACC,MAAM;EACN,WAAW;EACX,UAAU,iBAAiB,OAAO;CACnC;AACD;;AAEA,MAAM,gCAAgC,CAAC,GAAG,IAAI,IAAI,4BAA4B,SAAS,EAAE,eAAe,SAAS,SAAS,EAAE,mBAAmB,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,GAAG,EAAE"}
@@ -6,7 +6,7 @@ import { c as SqlQueryable, i as SqlDriver, l as SqlStatementStats, r as SqlConn
6
6
  import { n as SqlQueryPlan } from "./plan-Cbed2eDu-3c5s1Aq5.mjs";
7
7
  import { i as CodecTypesBase, l as RawCodecInferer } from "./expression-BzrfOiPC-CXjjRKqc.mjs";
8
8
  import "./expression-CIBqCwC1.mjs";
9
- import { m as MarkerReadResult, t as Adapter } from "./ast-Cq7uhA86.mjs";
9
+ import { m as MarkerReadResult, t as Adapter } from "./ast-DB7g9Mh2.mjs";
10
10
  import { t as SqlExecutionPlan } from "./sql-execution-plan-Dam5yMZg-bDl_0qHQ.mjs";
11
11
  import "./plan-BOyVvttx.mjs";
12
12
  import { n as CollectionMethodContribution } from "./collection-methods-B-tM7OPZ-DzXedZdV.mjs";
@@ -14,7 +14,7 @@ import { n as ExecutionContext, t as CodecDescriptorRegistry } from "./query-lan
14
14
  import "./query-lane-context-BPJrXopg.mjs";
15
15
  import { _ as SqlOrmPlan, h as RuntimeScope } from "./types-Cv5t6_Ly-BaGc023t.mjs";
16
16
  import "./types-VUCzaDbp.mjs";
17
- import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-DR3nKTmH-DbyhuL-z.mjs";
17
+ import { c as PreparedExecution, g as TransactionStartTarget, l as PreparedFor, n as Declaration, o as ParamsFromDeclaration, s as PrepareCallback, u as PreparedStatement, v as preparedStatementExecute, y as preparedStatementQuery } from "./transaction-state-DR3nKTmH-D_pb9QgR.mjs";
18
18
  import { i as SqlParamRefMutator } from "./middleware-oCT0RWkt-DGav7C8b.mjs";
19
19
  import "./middleware-MgGkjEXt.mjs";
20
20
  import "./collection-methods-BNAu8vHk.mjs";
@@ -578,4 +578,4 @@ interface LintsOptions {
578
578
  declare function lints(options?: LintsOptions): SqlMiddleware;
579
579
  //#endregion
580
580
  export { SqlRuntimeAdapterDescriptor as $, ActivityRoute as A, PreparedStatementInternals as B, extractCodecIds as C, validateContractCodecMappings as D, validateCodecRegistryCompleteness as E, ConnectionProvider as F, RuntimeParameterizedCodecDescriptor as G, RuntimeConnection as H, HashablePlan as I, RuntimeTransaction as J, RuntimeQueryable as K, MarkerReader as L, ActivitySourceTarget as M, BoundPreparedStatement as N, ActivityExecuteOptions as O, CloseRefusal as P, SqlMiddlewareContext as Q, PreparedExecutionImpl as R, createAstCodecRegistry as S, lowerSqlPlan as T, RuntimeFamilyAdapter as U, Runtime as V, RuntimeOptions as W, SqlExecutionStackWithDriver as X, SqlExecutionStack as Y, SqlMiddleware as Z, StatementActivity as _, planContentHashOn as _t, ActivityParent$1 as a, SqlRuntimeTargetDescriptor as at, TransactionEnded as b, ClientActivityEnd$1 as c, TransactionContext as ct, ClientActivityResult$1 as d, createExecutionContext as dt, SqlRuntimeAdapterInstance as et, ExecuteInterceptResult$1 as f, createSqlExecutionStack as ft, StartActivity$1 as g, findActivitySource as gt, QueryInterceptResult$1 as h, encodeParamsWithMetadata as ht, ActivityInterceptResult$1 as i, SqlRuntimeExtensionInstance as it, ActivitySource as j, ActivityHandle as k, ClientActivityEnded as l, VerifyMarkerOption as lt, Log as m, deriveParamMetadata as mt, ActivityEndedResult$1 as n, SqlRuntimeDriverInstance as nt, BudgetsOptions as o, SqlStaticContributions as ot, LintsOptions as p, delegatingActivitySource as pt, RuntimeTelemetryEvent as q, ActivityFinalizedResult$1 as r, SqlRuntimeExtensionDescriptor as rt, ClientActivity$1 as s, TelemetryOutcome as st, Activity$1 as t, SqlRuntimeBase as tt, ClientActivityKind$1 as u, activitySource as ut, StatementEnded as v, startActivityOn as vt, lints as w, budgets as x, TransactionActivity as y, withTransaction as yt, PreparedStatementImpl as z };
581
- //# sourceMappingURL=index-B0hZw3uT.d.mts.map
581
+ //# sourceMappingURL=index-Bw9Y19Js.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B0hZw3uT.d.mts","names":[],"sources":["../../../../2-sql/5-runtime/dist/activity-handle-C3LzuzLW.d.mts","../../../../2-sql/5-runtime/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KAeK;EACH;EACA;;KAEG,eAAe,oBAAoB,gBAAgB,mBAAmB,qBAAqB;UAEtF;WACC,SAAS;WACT,QAAQ,oBAAoB;WAC5B,YAAY,oBAAoB;WAChC,gBAAgB;WAChB,aAAa;;;;;;;WAOb;;;;UAeD,6BAA6B;WAC5B,UAAU,SAAS;;;;;;UAMpB;WACC,KAAK;WACL,MAAM;;UAEP,cAAc,kBAAkB,0BAA0B,iCAAiC,kBAAkB,kBAAkB,mBAAmB;WACjJ;EACT,iBAAiB,UAAU,UAAU,KAAK,uBAAuB;EACjE,eAAe,UAAU,UAAU,QAAQ,qBAAqB,KAAK,uBAAuB;EAC5F,mBAAmB,UAAU,UAAU,QAAQ,yBAAyB,KAAK,uBAAuB;;;;;;;;;;;;;;;;;;;EAmBpG,eAAe,OAAO,WAAW,KAAK,uBAAuB,QAAQ;;;;;;EAMrE,cAAc,MAAM,kBAAkB,KA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;;;;;;;;;;;;iBC1e7D,uBAAuB,aAAa,0BAA0B;;;iBAG9D,gBAAgB,UAAU,SAAS,cAAc;iBACjD,8BAA8B,UAAU,yBAAyB,UAAU,SAAS;iBACpF,kCAAkC,UAAU,yBAAyB,UAAU,SAAS;;;;;;;;;;;;iBAYxF,aAAa,KAAK,SAAS,QAAQ,aAAa,SAAS,aAAa,mBAAmB,UAAU,SAAS,aAAa,WAAW,aAAa,OAAO,iBAAiB;;;UAGhL;WACC;WACA;WACA,YAAY;WACZ;WACA;aACE;aACA;;;iBAGI,QAAQ,UAAU,iBAAiB;;;UAG1C;WACC;aACE;aACA;aACA;aACA;aACA;;WAEF;;;;;;;;;;;;;;;;iBAgBM,MAAM,UAAU,eAAe"}
@@ -1,4 +1,4 @@
1
- import { s as SqlIndexIR } from "./types-egs_vme1-DRhYFwIT.mjs";
1
+ import { s as SqlIndexIR } from "./types-DoyiTsjg-DDTmYyNY.mjs";
2
2
  //#region ../../../2-sql/1-core/contract/dist/index-equivalence-DswCiq5l.mjs
3
3
  /** The schema node the planner builds for an index the contract states, which is what it compares. */
4
4
  function indexNodeOf(index) {
@@ -106,4 +106,4 @@ function leadingBackingObjectName(columns, table) {
106
106
  //#endregion
107
107
  export { sameColumns as a, leadingBackingObjectName as i, identicalIndexes as n, servingKey as o, indexNodeOf as r, startsWithColumns as s, derivedBackingIndexIsRedundant as t };
108
108
 
109
- //# sourceMappingURL=index-equivalence-DswCiq5l-C6SAs-Yz.mjs.map
109
+ //# sourceMappingURL=index-equivalence-DswCiq5l-D5VK0qTy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-equivalence-DswCiq5l-C6SAs-Yz.mjs","names":[],"sources":["../../../../2-sql/1-core/contract/dist/index-equivalence-DswCiq5l.mjs"],"sourcesContent":["import { SqlIndexIR } from \"@internal/sql-schema-ir/types\";\n//#region src/index-equivalence.ts\n/** The schema node the planner builds for an index the contract states, which is what it compares. */\nfunction indexNodeOf(index) {\n\treturn new SqlIndexIR({\n\t\t...index,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: index.where !== void 0\n\t});\n}\n/** Whether the planner sees two indexes as the same index apart from their names. */\nfunction identicalIndexes(a, b) {\n\treturn a.contentEquals(b, {\n\t\tcolumnPresence: \"matching\",\n\t\tbodies: \"verbatim\"\n\t});\n}\n/** The index the contract build derives to back a foreign key on `columns`, as the planner sees it. */\nfunction derivedBackingIndexNode(columns) {\n\treturn new SqlIndexIR({\n\t\tnaming: {\n\t\t\tkind: \"exact\",\n\t\t\tname: \"derived backing index\"\n\t\t},\n\t\tcolumns,\n\t\twhere: void 0,\n\t\tunique: false,\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: false\n\t});\n}\nfunction sameColumns(a, b) {\n\treturn a.length === b.length && startsWithColumns(a, b);\n}\n/** Whether `columns` begins with `leading`, in order: an index or key on such columns serves lookups on `leading`. */\nfunction startsWithColumns(columns, leading) {\n\treturn leading.length <= columns.length && leading.every((column, position) => column === columns[position]);\n}\n/**\n* The key that serves every lookup of `index`, when `index` is a plain non-unique index: one the planner sees as identical to an index derived on its columns. A unique index serves only when it has no predicate.\n*/\nfunction servingKey(index, table) {\n\tconst { columns } = index;\n\tif (columns === void 0 || !identicalIndexes(index, derivedBackingIndexNode(columns))) return;\n\tif (table.primaryKey !== void 0 && sameColumns(table.primaryKey.columns, columns)) return {\n\t\tkind: \"primaryKey\",\n\t\tprimaryKey: table.primaryKey\n\t};\n\tconst unique = table.uniques.find((constraint) => sameColumns(constraint.columns, columns));\n\tif (unique !== void 0) return {\n\t\tkind: \"uniqueConstraint\",\n\t\tunique\n\t};\n\tconst uniqueIndex = table.indexes.find((candidate) => {\n\t\tconst node = table.nodeOf(candidate);\n\t\treturn node.unique && node.where === void 0 && node.columns !== void 0 && sameColumns(node.columns, columns);\n\t});\n\treturn uniqueIndex === void 0 ? void 0 : {\n\t\tkind: \"index\",\n\t\tindex: uniqueIndex\n\t};\n}\n/**\n* Whether the contract build would drop the backing index it derives for a foreign key on `columns`, because the table already has an identical index or a key serving its lookups. `contract infer` asks this of a live table to decide whether a relation needs `index: false`.\n*/\nfunction derivedBackingIndexIsRedundant(columns, table) {\n\tconst derived = derivedBackingIndexNode(columns);\n\treturn table.indexes.some((index) => identicalIndexes(table.nodeOf(index), derived)) || servingKey(derived, table) !== void 0;\n}\n/** Whether the planner sees `index` as a plain index: its columns, uniqueness and nothing else. */\nfunction isPlainIndexNode(index) {\n\tif (index.columns === void 0) return false;\n\treturn identicalIndexes(index, new SqlIndexIR({\n\t\tnaming: {\n\t\t\tkind: \"exact\",\n\t\t\tname: \"plain index\"\n\t\t},\n\t\tcolumns: index.columns,\n\t\twhere: void 0,\n\t\tunique: index.unique,\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: false\n\t}));\n}\n/**\n* The name of an object of the table that serves lookups on `columns` although the build would keep a derived backing index beside it: a named primary key or unique constraint, or a plain index, whose first columns are `columns`. A source that derives no backing index of its own names it on the relation instead of writing `index: false`.\n*/\nfunction leadingBackingObjectName(columns, table) {\n\tconst { primaryKey } = table;\n\tif (primaryKey?.name !== void 0 && startsWithColumns(primaryKey.columns, columns)) return primaryKey.name;\n\tconst unique = table.uniques.find((constraint) => constraint.name !== void 0 && startsWithColumns(constraint.columns, columns));\n\tif (unique?.name !== void 0) return unique.name;\n\tconst index = table.indexes.find((candidate) => {\n\t\tconst node = table.nodeOf(candidate);\n\t\treturn node.columns !== void 0 && startsWithColumns(node.columns, columns) && isPlainIndexNode(node);\n\t});\n\treturn index === void 0 ? void 0 : table.nameOf(index);\n}\n//#endregion\nexport { sameColumns as a, leadingBackingObjectName as i, identicalIndexes as n, servingKey as o, indexNodeOf as r, startsWithColumns as s, derivedBackingIndexIsRedundant as t };\n\n//# sourceMappingURL=index-equivalence-DswCiq5l.mjs.map"],"mappings":";;;AAGA,SAAS,Y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js"],"sourcesContent":["import { SqlIndexIR } from \"@internal/sql-schema-ir/types\";\n//#region src/index-equivalence.ts\n/** The schema node the planner builds for an index the contract states, which is what it compares. */\nfunction indexNodeOf(index) {\n\treturn new SqlIndexIR({\n\t\t...index,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: index.where !== void 0\n\t});\n}\n/** Whether the planner sees two indexes as the same index apart from their names. */\nfunction identicalIndexes(a, b) {\n\treturn a.contentEquals(b, {\n\t\tcolumnPresence: \"matching\",\n\t\tbodies: \"verbatim\"\n\t});\n}\n/** The index the contract build derives to back a foreign key on `columns`, as the planner sees it. */\nfunction derivedBackingIndexNode(columns) {\n\treturn new SqlIndexIR({\n\t\tnaming: {\n\t\t\tkind: \"exact\",\n\t\t\tname: \"derived backing index\"\n\t\t},\n\t\tcolumns,\n\t\twhere: void 0,\n\t\tunique: false,\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: false\n\t});\n}\nfunction sameColumns(a, b) {\n\treturn a.length === b.length && startsWithColumns(a, b);\n}\n/** Whether `columns` begins with `leading`, in order: an index or key on such columns serves lookups on `leading`. */\nfunction startsWithColumns(columns, leading) {\n\treturn leading.length <= columns.length && leading.every((column, position) => column === columns[position]);\n}\n/**\n* The key that serves every lookup of `index`, when `index` is a plain non-unique index: one the planner sees as identical to an index derived on its columns. A unique index serves only when it has no predicate.\n*/\nfunction servingKey(index, table) {\n\tconst { columns } = index;\n\tif (columns === void 0 || !identicalIndexes(index, derivedBackingIndexNode(columns))) return;\n\tif (table.primaryKey !== void 0 && sameColumns(table.primaryKey.columns, columns)) return {\n\t\tkind: \"primaryKey\",\n\t\tprimaryKey: table.primaryKey\n\t};\n\tconst unique = table.uniques.find((constraint) => sameColumns(constraint.columns, columns));\n\tif (unique !== void 0) return {\n\t\tkind: \"uniqueConstraint\",\n\t\tunique\n\t};\n\tconst uniqueIndex = table.indexes.find((candidate) => {\n\t\tconst node = table.nodeOf(candidate);\n\t\treturn node.unique && node.where === void 0 && node.columns !== void 0 && sameColumns(node.columns, columns);\n\t});\n\treturn uniqueIndex === void 0 ? void 0 : {\n\t\tkind: \"index\",\n\t\tindex: uniqueIndex\n\t};\n}\n/**\n* Whether the contract build would drop the backing index it derives for a foreign key on `columns`, because the table already has an identical index or a key serving its lookups. `contract infer` asks this of a live table to decide whether a relation needs `index: false`.\n*/\nfunction derivedBackingIndexIsRedundant(columns, table) {\n\tconst derived = derivedBackingIndexNode(columns);\n\treturn table.indexes.some((index) => identicalIndexes(table.nodeOf(index), derived)) || servingKey(derived, table) !== void 0;\n}\n/** Whether the planner sees `index` as a plain index: its columns, uniqueness and nothing else. */\nfunction isPlainIndexNode(index) {\n\tif (index.columns === void 0) return false;\n\treturn identicalIndexes(index, new SqlIndexIR({\n\t\tnaming: {\n\t\t\tkind: \"exact\",\n\t\t\tname: \"plain index\"\n\t\t},\n\t\tcolumns: index.columns,\n\t\twhere: void 0,\n\t\tunique: index.unique,\n\t\ttype: void 0,\n\t\toptions: void 0,\n\t\tannotations: void 0,\n\t\tdependsOn: void 0,\n\t\tpartial: false\n\t}));\n}\n/**\n* The name of an object of the table that serves lookups on `columns` although the build would keep a derived backing index beside it: a named primary key or unique constraint, or a plain index, whose first columns are `columns`. A source that derives no backing index of its own names it on the relation instead of writing `index: false`.\n*/\nfunction leadingBackingObjectName(columns, table) {\n\tconst { primaryKey } = table;\n\tif (primaryKey?.name !== void 0 && startsWithColumns(primaryKey.columns, columns)) return primaryKey.name;\n\tconst unique = table.uniques.find((constraint) => constraint.name !== void 0 && startsWithColumns(constraint.columns, columns));\n\tif (unique?.name !== void 0) return unique.name;\n\tconst index = table.indexes.find((candidate) => {\n\t\tconst node = table.nodeOf(candidate);\n\t\treturn node.columns !== void 0 && startsWithColumns(node.columns, columns) && isPlainIndexNode(node);\n\t});\n\treturn index === void 0 ? void 0 : table.nameOf(index);\n}\n//#endregion\nexport { sameColumns as a, leadingBackingObjectName as i, identicalIndexes as n, servingKey as o, indexNodeOf as r, startsWithColumns as s, derivedBackingIndexIsRedundant as t };\n\n//# sourceMappingURL=index-equivalence-DswCiq5l.mjs.map"],"mappings":";;;AAGA,SAAS,YAAY,OAAO;CAC3B,OAAO,IAAI,WAAW;EACrB,GAAG;EACH,aAAa,KAAK;EAClB,WAAW,KAAK;EAChB,SAAS,MAAM,UAAU,KAAK;CAC/B,CAAC;AACF;;AAEA,SAAS,iBAAiB,GAAG,GAAG;CAC/B,OAAO,EAAE,cAAc,GAAG;EACzB,gBAAgB;EAChB,QAAQ;CACT,CAAC;AACF;;AAEA,SAAS,wBAAwB,SAAS;CACzC,OAAO,IAAI,WAAW;EACrB,QAAQ;GACP,MAAM;GACN,MAAM;EACP;EACA;EACA,OAAO,KAAK;EACZ,QAAQ;EACR,MAAM,KAAK;EACX,SAAS,KAAK;EACd,aAAa,KAAK;EAClB,WAAW,KAAK;EAChB,SAAS;CACV,CAAC;AACF;AACA,SAAS,YAAY,GAAG,GAAG;CAC1B,OAAO,EAAE,WAAW,EAAE,UAAU,kBAAkB,GAAG,CAAC;AACvD;;AAEA,SAAS,kBAAkB,SAAS,SAAS;CAC5C,OAAO,QAAQ,UAAU,QAAQ,UAAU,QAAQ,OAAO,QAAQ,aAAa,WAAW,QAAQ,SAAS;AAC5G;;;;AAIA,SAAS,WAAW,OAAO,OAAO;CACjC,MAAM,EAAE,YAAY;CACpB,IAAI,YAAY,KAAK,KAAK,CAAC,iBAAiB,OAAO,wBAAwB,OAAO,CAAC,GAAG;CACtF,IAAI,MAAM,eAAe,KAAK,KAAK,YAAY,MAAM,WAAW,SAAS,OAAO,GAAG,OAAO;EACzF,MAAM;EACN,YAAY,MAAM;CACnB;CACA,MAAM,SAAS,MAAM,QAAQ,MAAM,eAAe,YAAY,WAAW,SAAS,OAAO,CAAC;CAC1F,IAAI,WAAW,KAAK,GAAG,OAAO;EAC7B,MAAM;EACN;CACD;CACA,MAAM,cAAc,MAAM,QAAQ,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