@prisma/orm-family-sql 8.0.0-rc.15-dev.1 → 8.0.0-rc.15-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authoring-type-constructors-dihiQslc-DqtjQyqj.mjs → authoring-type-constructors-dihiQslc-B5nYi7p2.mjs} +2 -2
- package/dist/{authoring-type-constructors-dihiQslc-DqtjQyqj.mjs.map → authoring-type-constructors-dihiQslc-B5nYi7p2.mjs.map} +1 -1
- package/dist/{config-types-CPTtyHK8.mjs → config-types-BMRDvgSW.mjs} +2 -2
- package/dist/{config-types-CPTtyHK8.mjs.map → config-types-BMRDvgSW.mjs.map} +1 -1
- package/dist/{contract-builder-Dy172HD2.mjs → contract-builder-83EIkQrg.mjs} +8 -8
- package/dist/{contract-builder-Dy172HD2.mjs.map → contract-builder-83EIkQrg.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.mjs +23 -17
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +6 -6
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -3
- package/dist/contract-psl__attribute-specs.d.mts.map +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +3 -3
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +3 -3
- package/dist/contract.mjs +3 -3
- package/dist/contract__data-type-support.d.mts +2 -2
- package/dist/contract__data-type-support.mjs +2 -2
- package/dist/contract__validators.d.mts +2 -2
- package/dist/contract__validators.mjs +2 -2
- package/dist/{control-D18L8cFa.d.mts → control-Bi2JsNep.d.mts} +6 -6
- package/dist/control-Bi2JsNep.d.mts.map +1 -0
- package/dist/{control-CMe5ABYI.mjs → control-ihau09EM.mjs} +6 -6
- package/dist/control-ihau09EM.mjs.map +1 -0
- package/dist/{data-type-support-DoxtCfXq.d.mts → data-type-support-4TcZuD7d.d.mts} +6 -6
- package/dist/{data-type-support-DoxtCfXq.d.mts.map → data-type-support-4TcZuD7d.d.mts.map} +1 -1
- package/dist/{data-type-support-DeL6iJt8.mjs → data-type-support-Bu-VpT7z.mjs} +7 -7
- package/dist/data-type-support-Bu-VpT7z.mjs.map +1 -0
- package/dist/{derived-checks-DAbro9yn-DtEowq-J.mjs → derived-checks-DAbro9yn-BgBbql-q.mjs} +2 -2
- package/dist/{derived-checks-DAbro9yn-DtEowq-J.mjs.map → derived-checks-DAbro9yn-BgBbql-q.mjs.map} +1 -1
- package/dist/family.d.mts +6 -6
- package/dist/family.mjs +5 -5
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +3 -3
- package/dist/family__ir.mjs +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +1 -1
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/{interpreter-D50jf6Dd-BW-Bj8Qr.mjs → interpreter-BF5Xrf3W-DK928Clg.mjs} +14 -20
- package/dist/interpreter-BF5Xrf3W-DK928Clg.mjs.map +1 -0
- package/dist/{psl-build-C1P-sV0c.mjs → psl-build-B_fRV6lN.mjs} +34 -33
- package/dist/psl-build-B_fRV6lN.mjs.map +1 -0
- package/dist/{psl-build-ClK2AyY1.d.mts → psl-build-C_n5uPZH.d.mts} +2 -2
- package/dist/psl-build-C_n5uPZH.d.mts.map +1 -0
- package/dist/{psl-column-resolution-BegCa1-t-1XiYCC7t.d.mts → psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts} +5 -7
- package/dist/psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts.map +1 -0
- package/dist/{psl-field-resolution-Bi-CSeoQ-Do_5hZ8Z.mjs → psl-field-resolution-DUCrDnuq-BXwISml1.mjs} +222 -279
- package/dist/psl-field-resolution-DUCrDnuq-BXwISml1.mjs.map +1 -0
- package/dist/{psl-infer-B91bSSdN.d.mts → psl-infer-Cm7eDSA-.d.mts} +2 -2
- package/dist/{psl-infer-B91bSSdN.d.mts.map → psl-infer-Cm7eDSA-.d.mts.map} +1 -1
- package/dist/{sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs → sql-contract-serializer-DDaAVCQr-D40NltYi.mjs} +2 -2
- package/dist/{sql-contract-serializer-DDaAVCQr-h_U10PEJ.mjs.map → sql-contract-serializer-DDaAVCQr-D40NltYi.mjs.map} +1 -1
- package/dist/{type-map-dnvRKl9o-avUb9OLv.d.mts → type-map-3w0ieDAb-DiMpKEc2.d.mts} +6 -8
- package/dist/type-map-3w0ieDAb-DiMpKEc2.d.mts.map +1 -0
- package/dist/{validators-BLkHaNpd.d.mts → validators-BAa0JKuB.d.mts} +7 -7
- package/dist/{validators-BLkHaNpd.d.mts.map → validators-BAa0JKuB.d.mts.map} +1 -1
- package/dist/{validators-BF_JSK38.mjs → validators-Ddcw8nHL.mjs} +9 -9
- package/dist/validators-Ddcw8nHL.mjs.map +1 -0
- package/package.json +18 -18
- package/dist/control-CMe5ABYI.mjs.map +0 -1
- package/dist/control-D18L8cFa.d.mts.map +0 -1
- package/dist/data-type-support-DeL6iJt8.mjs.map +0 -1
- package/dist/interpreter-D50jf6Dd-BW-Bj8Qr.mjs.map +0 -1
- package/dist/psl-build-C1P-sV0c.mjs.map +0 -1
- package/dist/psl-build-ClK2AyY1.d.mts.map +0 -1
- package/dist/psl-column-resolution-BegCa1-t-1XiYCC7t.d.mts.map +0 -1
- package/dist/psl-field-resolution-Bi-CSeoQ-Do_5hZ8Z.mjs.map +0 -1
- package/dist/type-map-dnvRKl9o-avUb9OLv.d.mts.map +0 -1
- package/dist/validators-BF_JSK38.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as numeralText } from "./numeral-text-Cqu87pVe-DJCqBaSC.mjs";
|
|
2
|
-
import { i as escapePslString } from "./data-type-support-
|
|
2
|
+
import { i as escapePslString } from "./data-type-support-Bu-VpT7z.mjs";
|
|
3
3
|
import { i as printSqlExpressionLiteral } from "./sql-expression-D7GsLgDM.mjs";
|
|
4
4
|
import { m as defaultInCanonicalForm } from "./types-D_7dH1ie-CN5Dgmgh.mjs";
|
|
5
5
|
import { authoringEntryType, printTaggedLiteral } from "@prisma/orm-framework/components/authoring";
|
|
@@ -83,9 +83,9 @@ function classifications(value, surface) {
|
|
|
83
83
|
return found;
|
|
84
84
|
}
|
|
85
85
|
/** The stored form the column takes this value as, or `undefined` when its type takes no such value. */
|
|
86
|
-
function admitted(candidate, columnDataType,
|
|
86
|
+
function admitted(candidate, columnDataType, lookup) {
|
|
87
87
|
if (candidate.type === columnDataType) return candidate.value;
|
|
88
|
-
const cast =
|
|
88
|
+
const cast = lookup.get(columnDataType)?.casts[candidate.type];
|
|
89
89
|
if (cast === void 0) return void 0;
|
|
90
90
|
try {
|
|
91
91
|
return cast(candidate.value);
|
|
@@ -93,48 +93,48 @@ function admitted(candidate, columnDataType, dataTypeLookup) {
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
/** The
|
|
97
|
-
function
|
|
96
|
+
/** The text of the literal: what the entry prints, before the syntax that fences it. */
|
|
97
|
+
function printedText(entry, value) {
|
|
98
98
|
try {
|
|
99
99
|
return entry.print(value);
|
|
100
100
|
} catch {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
/** What the entry reads the printed
|
|
105
|
-
function readBack(entry, type,
|
|
104
|
+
/** What the entry reads the printed text back as, which for a number is the classifier's answer. */
|
|
105
|
+
function readBack(entry, type, text) {
|
|
106
106
|
const written = entry.written;
|
|
107
107
|
try {
|
|
108
|
-
return written.kind === "plain" && written.syntax === "number" ? written.classify(
|
|
108
|
+
return written.kind === "plain" && written.syntax === "number" ? written.classify(text) : {
|
|
109
109
|
type,
|
|
110
|
-
value: written.parse(
|
|
110
|
+
value: written.parse(text)
|
|
111
111
|
};
|
|
112
112
|
} catch {
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function literalText(entry,
|
|
116
|
+
function literalText(entry, text) {
|
|
117
117
|
const written = entry.written;
|
|
118
|
-
if (written.kind === "tag") return printTaggedLiteral(written.tag,
|
|
119
|
-
return written.syntax === "string" ? `"${escapePslString(
|
|
118
|
+
if (written.kind === "tag") return printTaggedLiteral(written.tag, text);
|
|
119
|
+
return written.syntax === "string" ? `"${escapePslString(text)}"` : text;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* The value written as the literal of one of its types, proven by reading the text straight back:
|
|
123
123
|
* the same entry, the same cast, and the stored form again.
|
|
124
124
|
*/
|
|
125
|
-
function writeScalar(value, columnDataType,
|
|
125
|
+
function writeScalar(value, columnDataType, lookup, surface) {
|
|
126
126
|
for (const candidate of classifications(value, surface)) {
|
|
127
127
|
const entry = surface.entryOf.get(candidate.type);
|
|
128
128
|
if (entry === void 0) continue;
|
|
129
|
-
const stored = admitted(candidate, columnDataType,
|
|
129
|
+
const stored = admitted(candidate, columnDataType, lookup);
|
|
130
130
|
if (stored === void 0 || !sameForm(stored, value)) continue;
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
133
|
-
const reread = readBack(entry, candidate.type,
|
|
131
|
+
const text = printedText(entry, candidate.value);
|
|
132
|
+
if (text === void 0) continue;
|
|
133
|
+
const reread = readBack(entry, candidate.type, text);
|
|
134
134
|
if (reread === void 0) continue;
|
|
135
|
-
const restored = admitted(reread, columnDataType,
|
|
135
|
+
const restored = admitted(reread, columnDataType, lookup);
|
|
136
136
|
if (restored === void 0 || !sameForm(restored, value)) continue;
|
|
137
|
-
return literalText(entry,
|
|
137
|
+
return literalText(entry, text);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
/** One written element of a list, printed as a value of any type, with no column type to admit it. */
|
|
@@ -143,12 +143,12 @@ function writeElement(value, of, surface) {
|
|
|
143
143
|
if (!of.includes(candidate.type)) continue;
|
|
144
144
|
const entry = surface.entryOf.get(candidate.type);
|
|
145
145
|
if (entry === void 0) continue;
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const reread = readBack(entry, candidate.type,
|
|
146
|
+
const text = printedText(entry, candidate.value);
|
|
147
|
+
if (text === void 0) continue;
|
|
148
|
+
const reread = readBack(entry, candidate.type, text);
|
|
149
149
|
if (reread === void 0 || !of.includes(reread.type)) continue;
|
|
150
150
|
return {
|
|
151
|
-
text: literalText(entry,
|
|
151
|
+
text: literalText(entry, text),
|
|
152
152
|
value: reread.value
|
|
153
153
|
};
|
|
154
154
|
}
|
|
@@ -157,8 +157,8 @@ function writeElement(value, of, surface) {
|
|
|
157
157
|
* A written list on a scalar column, which the column type's list cast turns into its one value.
|
|
158
158
|
* Each element is classified on its own and must be of a type the cast takes.
|
|
159
159
|
*/
|
|
160
|
-
function writeListCast(value, columnDataType,
|
|
161
|
-
const listCast =
|
|
160
|
+
function writeListCast(value, columnDataType, lookup, surface) {
|
|
161
|
+
const listCast = lookup.get(columnDataType)?.listCast;
|
|
162
162
|
if (listCast === void 0) return void 0;
|
|
163
163
|
const parts = [];
|
|
164
164
|
const elements = [];
|
|
@@ -177,25 +177,26 @@ function writeListCast(value, columnDataType, dataTypeLookup, surface) {
|
|
|
177
177
|
}
|
|
178
178
|
function writeDefaultLiteral(stored, options) {
|
|
179
179
|
if (stored instanceof Date) return void 0;
|
|
180
|
-
const {
|
|
181
|
-
if (
|
|
180
|
+
const { dataTypes, columnCodec } = options ?? {};
|
|
181
|
+
if (dataTypes === void 0 || columnCodec === void 0) return void 0;
|
|
182
|
+
const { entries, lookup } = dataTypes;
|
|
182
183
|
const columnDataType = columnCodec.dataType;
|
|
183
|
-
const { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec,
|
|
184
|
+
const { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec, lookup), options?.list === true);
|
|
184
185
|
if (value instanceof Date) return void 0;
|
|
185
|
-
const surface = writingSurface(
|
|
186
|
+
const surface = writingSurface(entries);
|
|
186
187
|
if (options?.list === true) {
|
|
187
188
|
if (!Array.isArray(value)) return void 0;
|
|
188
189
|
const parts = [];
|
|
189
190
|
for (const element of value) {
|
|
190
|
-
const written = writeScalar(element, columnDataType,
|
|
191
|
+
const written = writeScalar(element, columnDataType, lookup, surface);
|
|
191
192
|
if (written === void 0) return void 0;
|
|
192
193
|
parts.push(written);
|
|
193
194
|
}
|
|
194
195
|
return `[${parts.join(", ")}]`;
|
|
195
196
|
}
|
|
196
|
-
const written = writeScalar(value, columnDataType,
|
|
197
|
+
const written = writeScalar(value, columnDataType, lookup, surface);
|
|
197
198
|
if (written !== void 0) return written;
|
|
198
|
-
return Array.isArray(value) ? writeListCast(value, columnDataType,
|
|
199
|
+
return Array.isArray(value) ? writeListCast(value, columnDataType, lookup, surface) : void 0;
|
|
199
200
|
}
|
|
200
201
|
/** Whether two canonical forms are the same JSON value, member by member and element by element. */
|
|
201
202
|
function sameForm(left, right) {
|
|
@@ -212,4 +213,4 @@ function sameForm(left, right) {
|
|
|
212
213
|
//#endregion
|
|
213
214
|
export { mapDefault as t };
|
|
214
215
|
|
|
215
|
-
//# sourceMappingURL=psl-build-
|
|
216
|
+
//# sourceMappingURL=psl-build-B_fRV6lN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-build-B_fRV6lN.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/psl-build.mjs"],"sourcesContent":["import { s as toEnumMemberName } from \"./psl-names-C3cwe0rg.mjs\";\nimport { printSqlExpressionLiteral } from \"@internal/sql-contract/sql-expression\";\nimport { authoringEntryType, printTaggedLiteral } from \"@internal/framework-components/authoring\";\nimport { canonicalFormOf, dataTypeId } from \"@internal/framework-components/codec\";\nimport { numeralText } from \"@internal/sql-contract/data-type\";\nimport { defaultInCanonicalForm } from \"@internal/sql-schema-ir/types\";\nimport { escapePslString } from \"@internal/sql-contract/data-type-support\";\n//#region src/core/psl-build/default-mapping.ts\nconst DEFAULT_FUNCTION_ATTRIBUTES = {\n\t\"autoincrement()\": \"@default(autoincrement())\",\n\t\"now()\": \"@default(now())\"\n};\n/**\n* The attribute a stored default prints as: a named function, a literal the column takes, or any\n* other expression as a `sql` literal. `undefined` when a literal has no written form.\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 ? void 0 : { attribute: `@default(${text})` };\n\t\t}\n\t\tcase \"function\": return { attribute: options?.functionAttributes?.[columnDefault.expression] ?? DEFAULT_FUNCTION_ATTRIBUTES[columnDefault.expression] ?? `@default(${printSqlExpressionLiteral(columnDefault.expression)})` };\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\tconst written = entry.written;\n\t\tif (written.kind === \"tag\") {\n\t\t\tconst type = dataTypeId(authoringEntryType(key, entry));\n\t\t\tif (!entryOf.has(type)) entryOf.set(type, entry);\n\t\t\ttagTypes.push(type);\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, lookup) {\n\tif (candidate.type === columnDataType) return candidate.value;\n\tconst cast = lookup.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 text of the literal: what the entry prints, before the syntax that fences it. */\nfunction printedText(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 text back as, which for a number is the classifier's answer. */\nfunction readBack(entry, type, text) {\n\tconst written = entry.written;\n\ttry {\n\t\treturn written.kind === \"plain\" && written.syntax === \"number\" ? written.classify(text) : {\n\t\t\ttype,\n\t\t\tvalue: written.parse(text)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction literalText(entry, text) {\n\tconst written = entry.written;\n\tif (written.kind === \"tag\") return printTaggedLiteral(written.tag, text);\n\treturn written.syntax === \"string\" ? `\"${escapePslString(text)}\"` : text;\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, lookup, 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, lookup);\n\t\tif (stored === void 0 || !sameForm(stored, value)) continue;\n\t\tconst text = printedText(entry, candidate.value);\n\t\tif (text === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, text);\n\t\tif (reread === void 0) continue;\n\t\tconst restored = admitted(reread, columnDataType, lookup);\n\t\tif (restored === void 0 || !sameForm(restored, value)) continue;\n\t\treturn literalText(entry, text);\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 text = printedText(entry, candidate.value);\n\t\tif (text === void 0) continue;\n\t\tconst reread = readBack(entry, candidate.type, text);\n\t\tif (reread === void 0 || !of.includes(reread.type)) continue;\n\t\treturn {\n\t\t\ttext: literalText(entry, text),\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, lookup, surface) {\n\tconst listCast = lookup.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(stored, options) {\n\tif (stored instanceof Date) return void 0;\n\tconst { dataTypes, columnCodec } = options ?? {};\n\tif (dataTypes === void 0 || columnCodec === void 0) return void 0;\n\tconst { entries, lookup } = dataTypes;\n\tconst columnDataType = columnCodec.dataType;\n\tconst { value } = defaultInCanonicalForm(stored, canonicalFormOf(columnCodec, lookup), options?.list === true);\n\tif (value instanceof Date) return void 0;\n\tconst surface = writingSurface(entries);\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, lookup, 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, lookup, surface);\n\tif (written !== void 0) return written;\n\treturn Array.isArray(value) ? writeListCast(value, columnDataType, lookup, 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\nexport { mapDefault, toEnumMemberName };\n\n//# sourceMappingURL=psl-build.mjs.map"],"mappings":";;;;;;;AAQA,MAAM,8BAA8B;CACnC,mBAAmB;CACnB,SAAS;AACV;;;;;AAKA,SAAS,WAAW,eAAe,SAAS;CAC3C,QAAQ,cAAc,MAAtB;EACC,KAAK,WAAW;GACf,MAAM,OAAO,oBAAoB,cAAc,OAAO,OAAO;GAC7D,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,EAAE,WAAW,YAAY,KAAK,GAAG;EACpE;EACA,KAAK,YAAY,OAAO,EAAE,WAAW,SAAS,qBAAqB,cAAc,eAAe,4BAA4B,cAAc,eAAe,YAAY,0BAA0B,cAAc,UAAU,EAAE,GAAG;CAC7N;AACD;AACA,SAAS,eAAe,SAAS;CAChC,MAAM,0BAA0B,I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U,KAAK,KAAK,SAAS,QAAQ,KAAK;CAClD,CAAC;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./type-map-
|
|
1
|
+
import "./type-map-3w0ieDAb-DiMpKEc2.mjs";
|
|
2
2
|
//#region ../../../2-sql/9-family/dist/psl-build.d.mts
|
|
3
3
|
//#region src/core/psl-build/psl-names.d.ts
|
|
4
4
|
/**
|
|
@@ -10,4 +10,4 @@ import "./type-map-dnvRKl9o-avUb9OLv.mjs";
|
|
|
10
10
|
declare function toEnumMemberName(value: string): string;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { toEnumMemberName as t };
|
|
13
|
-
//# sourceMappingURL=psl-build-
|
|
13
|
+
//# sourceMappingURL=psl-build-C_n5uPZH.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-build-C_n5uPZH.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/psl-build.d.mts"],"mappings":";;;;;;;;;iBAQiB,iBAAiB"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import "./contract-builder-BaJMQFAc.mjs";
|
|
2
|
-
import { AuthoringTypeConstructorDescriptor
|
|
3
|
-
import { CodecLookupWithDescriptors
|
|
4
|
-
import { ColumnDefault, ExecutionMutationDefaultPhases,
|
|
2
|
+
import { AuthoringTypeConstructorDescriptor } from "@prisma/orm-framework/components/authoring";
|
|
3
|
+
import { CodecLookupWithDescriptors } from "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { ColumnDefault, ExecutionMutationDefaultPhases, ValueSetRef } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import "@prisma/orm-framework/components/control";
|
|
6
6
|
import "@prisma/orm-framework/psl-parser";
|
|
7
|
-
|
|
8
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-BegCa1-t.d.mts
|
|
9
|
-
//#endregion
|
|
7
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-CNtNJ7g7.d.mts
|
|
10
8
|
//#region src/psl-column-resolution.d.ts
|
|
11
9
|
type ColumnDescriptor = {
|
|
12
10
|
readonly codecId: string;
|
|
@@ -24,4 +22,4 @@ type ColumnDescriptor = {
|
|
|
24
22
|
};
|
|
25
23
|
//#endregion
|
|
26
24
|
export { ColumnDescriptor as t };
|
|
27
|
-
//# sourceMappingURL=psl-column-resolution-
|
|
25
|
+
//# sourceMappingURL=psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"psl-column-resolution-CNtNJ7g7-CR_auHUV.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/psl-column-resolution-CNtNJ7g7.d.mts"],"mappings":";;;;;;;;KAQK;WACM;WACA;WACA,aAAa;;;;;;;;;WASb,WAAW"}
|