@prisma/orm-family-sql 8.0.0-rc.18-dev.18 → 8.0.0-rc.18-dev.19
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-0Iv2zdwS-MFIpJ4fA.mjs → authoring-type-constructors-0Iv2zdwS-BJjO5EnA.mjs} +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map → authoring-type-constructors-0Iv2zdwS-BJjO5EnA.mjs.map} +1 -1
- package/dist/{config-types-ComQZUlA.mjs → config-types-DopEiXtk.mjs} +2 -2
- package/dist/{config-types-ComQZUlA.mjs.map → config-types-DopEiXtk.mjs.map} +1 -1
- package/dist/{contract-builder-fQ3gkIR5.mjs → contract-builder-C1X8KoEM.mjs} +3 -3
- package/dist/{contract-builder-fQ3gkIR5.mjs.map → contract-builder-C1X8KoEM.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.d.mts +3 -3
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +19 -47
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.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 +2 -2
- package/dist/contract.mjs +3 -3
- package/dist/contract__data-type.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +2 -2
- package/dist/contract__validators.mjs +1 -1
- package/dist/{control-mpACqp72.d.mts → control-BqS5MMDh.d.mts} +21 -12
- package/dist/control-BqS5MMDh.d.mts.map +1 -0
- package/dist/{control-ClahTAD-.mjs → control-C7MNvu5Q.mjs} +27 -13
- package/dist/control-C7MNvu5Q.mjs.map +1 -0
- package/dist/{control-adapter-BCopdpsT-DIHCWbq_.d.mts → control-adapter-BCopdpsT-Bou0wWLF.d.mts} +3 -3
- package/dist/{control-adapter-BCopdpsT-DIHCWbq_.d.mts.map → control-adapter-BCopdpsT-Bou0wWLF.d.mts.map} +1 -1
- package/dist/control-adapter-CUwBiImd.d.mts +1 -0
- package/dist/{data-type-B8N33s-_.d.mts → data-type-DuzmTpzK.d.mts} +3 -3
- package/dist/{data-type-B8N33s-_.d.mts.map → data-type-DuzmTpzK.d.mts.map} +1 -1
- package/dist/{derived-checks-CrvMQTJF-DlxFFtNM.mjs → derived-checks-sRZp_gTF-UGwFWkVX.mjs} +7 -20
- package/dist/derived-checks-sRZp_gTF-UGwFWkVX.mjs.map +1 -0
- package/dist/{diff-Bd9ILpZL.d.mts → diff-D6PbCUWL.d.mts} +5 -5
- package/dist/{diff-Bd9ILpZL.d.mts.map → diff-D6PbCUWL.d.mts.map} +1 -1
- package/dist/family.d.mts +10 -10
- package/dist/family.mjs +6 -6
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/{foreign-key-materialization-DfNPQL9G.mjs → foreign-key-materialization-BIvQTfz8.mjs} +2 -2
- package/dist/{foreign-key-materialization-DfNPQL9G.mjs.map → foreign-key-materialization-BIvQTfz8.mjs.map} +1 -1
- package/dist/{foreign-key-materialization-DCaDnUs-.d.mts → foreign-key-materialization-BiWTp2vi.d.mts} +3 -3
- package/dist/{foreign-key-materialization-DCaDnUs-.d.mts.map → foreign-key-materialization-BiWTp2vi.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-BsphajRC.mjs → index-equivalence-DswCiq5l-Cp2V5nhL.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-BsphajRC.mjs.map → index-equivalence-DswCiq5l-Cp2V5nhL.mjs.map} +1 -1
- package/dist/{interpreter-CFj2aTEP-BHL3TOqk.mjs → interpreter-B9wNACvu-CjrIm-Jo.mjs} +5 -5
- package/dist/{interpreter-CFj2aTEP-BHL3TOqk.mjs.map → interpreter-B9wNACvu-CjrIm-Jo.mjs.map} +1 -1
- package/dist/{migration-lg_VgP_F.d.mts → migration-CJ0xK_7n.d.mts} +2 -2
- package/dist/{migration-lg_VgP_F.d.mts.map → migration-CJ0xK_7n.d.mts.map} +1 -1
- package/dist/psl-build-ClY62mZM.d.mts +157 -0
- package/dist/psl-build-ClY62mZM.d.mts.map +1 -0
- package/dist/{psl-build-BsJ6eChh.mjs → psl-build-pU0gKdVI.mjs} +146 -7
- package/dist/psl-build-pU0gKdVI.mjs.map +1 -0
- package/dist/{psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs → psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs} +20 -14
- package/dist/{psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map → psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs.map} +1 -1
- package/dist/{psl-infer-B6iemK9i.d.mts → psl-infer-1C9FqGO2.d.mts} +3 -3
- package/dist/{psl-infer-B6iemK9i.d.mts.map → psl-infer-1C9FqGO2.d.mts.map} +1 -1
- package/dist/{psl-infer-HPi_YMeE.mjs → psl-infer-CvUWefHM.mjs} +2 -2
- package/dist/{psl-infer-HPi_YMeE.mjs.map → psl-infer-CvUWefHM.mjs.map} +1 -1
- package/dist/{schema-differ-DmP74bB8-BGA6fzOv.d.mts → schema-differ-DmP74bB8-GfOUaGGy.d.mts} +3 -3
- package/dist/{schema-differ-DmP74bB8-BGA6fzOv.d.mts.map → schema-differ-DmP74bB8-GfOUaGGy.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +2 -2
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.d.mts +3 -3
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs → sql-contract-serializer-sMY3prTx-BKQ4Yh-n.mjs} +2 -2
- package/dist/{sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs.map → sql-contract-serializer-sMY3prTx-BKQ4Yh-n.mjs.map} +1 -1
- package/dist/{types-c1iIhJep-DdMj6TNl.d.mts → types-Bqe0AXuw-xqQnkIj4.d.mts} +25 -6
- package/dist/types-Bqe0AXuw-xqQnkIj4.d.mts.map +1 -0
- package/dist/types-CTdsm45r.d.mts +1 -0
- package/dist/{types-CaVn_xxe-D9WdU3Iy.mjs → types-CfPB-Kz_-ByWDfwMj.mjs} +31 -6
- package/dist/types-CfPB-Kz_-ByWDfwMj.mjs.map +1 -0
- package/dist/{types-DaYtBAYT-B22gkh5z.d.mts → types-DaYtBAYT-DbsbDMTk.d.mts} +4 -4
- package/dist/{types-DaYtBAYT-B22gkh5z.d.mts.map → types-DaYtBAYT-DbsbDMTk.d.mts.map} +1 -1
- package/dist/{validators-Bvfk0aN7.mjs → validators-V8vN9R85.mjs} +2 -2
- package/dist/{validators-Bvfk0aN7.mjs.map → validators-V8vN9R85.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/control-ClahTAD-.mjs.map +0 -1
- package/dist/control-adapter-BsSf5pqM.d.mts +0 -1
- package/dist/control-mpACqp72.d.mts.map +0 -1
- package/dist/derived-checks-CrvMQTJF-DlxFFtNM.mjs.map +0 -1
- package/dist/psl-build-BHQfP1_C.d.mts +0 -73
- package/dist/psl-build-BHQfP1_C.d.mts.map +0 -1
- package/dist/psl-build-BsJ6eChh.mjs.map +0 -1
- package/dist/types-BLyhYk6B.d.mts +0 -1
- package/dist/types-CaVn_xxe-D9WdU3Iy.mjs.map +0 -1
- package/dist/types-c1iIhJep-DdMj6TNl.d.mts.map +0 -1
package/dist/contract-psl.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as interpretPslDocumentToSqlContract } from "./interpreter-
|
|
1
|
+
import { i as interpretPslDocumentToSqlContract } from "./interpreter-B9wNACvu-CjrIm-Jo.mjs";
|
|
2
2
|
export { interpretPslDocumentToSqlContract };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as describeUnsupportedSqlAttribute, v as sqlAttributeSpecs } from "./psl-field-resolution-
|
|
1
|
+
import { a as describeUnsupportedSqlAttribute, v as sqlAttributeSpecs } from "./psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs";
|
|
2
2
|
export { describeUnsupportedSqlAttribute, sqlAttributeSpecs };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
2
|
-
import { i as interpretPslDocumentToSqlContract } from "./interpreter-
|
|
1
|
+
import { t as applySqlSpecifierControlPolicy } from "./derived-checks-sRZp_gTF-UGwFWkVX.mjs";
|
|
2
|
+
import { i as interpretPslDocumentToSqlContract } from "./interpreter-B9wNACvu-CjrIm-Jo.mjs";
|
|
3
3
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
4
4
|
import { collectScalarTypeConstructors } from "@prisma/orm-framework/components/authoring";
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-
|
|
1
|
+
{"version":3,"file":"contract-psl__provider.mjs","names":[],"sources":["../../../../2-sql/2-authoring/contract-psl/dist/provider.mjs"],"sourcesContent":["import { n as interpretPslDocumentToSqlContract } from \"./interpreter-B9wNACvu.mjs\";\nimport { buildSymbolTable, createBinder, isPrismaNextSchema, mapPslDiagnostics } from \"@internal/psl-parser\";\nimport { applySqlSpecifierControlPolicy } from \"@internal/sql-contract-ts/contract-builder\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { collectScalarTypeConstructors } from \"@internal/framework-components/authoring\";\nimport { withSeedDiagnostics } from \"@internal/psl-parser/interpret\";\nimport { parse } from \"@internal/psl-parser/syntax\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { readFile } from \"node:fs/promises\";\nimport { basename, extname } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\n//#region src/provider.ts\n/**\n* The directory portion of `pattern` before its first glob-magic segment,\n* joined back with `/` (e.g. a `prisma` directory holding a recursive\n* `.prisma` glob derives `./prisma`). A rootless pattern with no static\n* segments yields `''`.\n*/\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\n/**\n* Derives the emit output path from the schema input path so artefacts land\n* colocated with the source (e.g. `src/contract/schema.prisma` →\n* `src/contract/contract.json`). A glob-shaped path derives from its static\n* prefix directory instead (a recursive glob under `prisma` derives\n* `./prisma/contract.json`). The provider owns this because it is the only\n* layer that knows the input path; the upstream `normalizeContractConfig`\n* default is a last-resort fallback for providers that don't carry one.\n*/\nfunction defaultOutputFromSchemaPath(schemaPath) {\n\tif (isDynamicPattern(schemaPath)) {\n\t\tconst prefix = staticPrefixDirectory(schemaPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst ext = extname(schemaPath);\n\tif (ext.length === 0) return `${schemaPath}.json`;\n\tconst base = schemaPath.slice(0, -ext.length);\n\tif (basename(base) === \"schema\") return `${base.slice(0, -6)}contract.json`;\n\treturn `${base}.json`;\n}\nfunction prismaContract(schemaPath, options) {\n\treturn {\n\t\tsource: {\n\t\t\tformat: \"psl\",\n\t\t\tinputs: [schemaPath],\n\t\t\tinterpret(input, context) {\n\t\t\t\tconst scalarColumnDescriptors = collectScalarTypeConstructors(context.authoringContributions.type);\n\t\t\t\treturn interpretPslDocumentToSqlContract({\n\t\t\t\t\tdocuments: input.documents,\n\t\t\t\t\tsymbolTable: input.symbolTable,\n\t\t\t\t\tsources: input.sources,\n\t\t\t\t\tbinder: input.binder,\n\t\t\t\t\tseedDiagnostics: [],\n\t\t\t\t\ttarget: options.target,\n\t\t\t\t\tauthoringContributions: context.authoringContributions,\n\t\t\t\t\tscalarColumnDescriptors,\n\t\t\t\t\t...ifDefined(\"composedExtensions\", context.composedExtensions.length > 0 ? [...context.composedExtensions] : void 0),\n\t\t\t\t\tcomposedExtensionContracts: context.composedExtensionContracts,\n\t\t\t\t\t...ifDefined(\"composedExtensionPackRefs\", options.composedExtensionPackRefs?.length ? options.composedExtensionPackRefs : void 0),\n\t\t\t\t\tcontrolMutationDefaults: context.controlMutationDefaults,\n\t\t\t\t\tcreateNamespace: options.createNamespace,\n\t\t\t\t\tcapabilities: context.capabilities,\n\t\t\t\t\tcodecLookup: context.codecLookup,\n\t\t\t\t\tdataTypes: context.dataTypes,\n\t\t\t\t\t...ifDefined(\"enumInferenceCodecs\", options.enumInferenceCodecs)\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync load(context) {\n\t\t\t\tconst candidates = [...new Set(context.resolvedInputs)].sort();\n\t\t\t\tif (candidates.length === 0) return notOk({\n\t\t\t\t\tsummary: \"No schema files matched the configured contract source\",\n\t\t\t\t\tdiagnostics: [{\n\t\t\t\t\t\tcode: \"PSL_NO_SCHEMA_FILES_MATCHED\",\n\t\t\t\t\t\tmessage: `No files matched the configured pattern \"${schemaPath}\"`,\n\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tconst readDiagnostics = [];\n\t\t\t\tconst members = [];\n\t\t\t\tconst undirected = [];\n\t\t\t\tfor (const path of candidates) {\n\t\t\t\t\tlet text;\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttext = await readFile(path, \"utf-8\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = String(error);\n\t\t\t\t\t\treadDiagnostics.push({\n\t\t\t\t\t\t\tcode: \"PSL_SCHEMA_READ_FAILED\",\n\t\t\t\t\t\t\tmessage,\n\t\t\t\t\t\t\tsourceId: path\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (isPrismaNextSchema(text)) members.push({\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\ttext\n\t\t\t\t\t});\n\t\t\t\t\telse undirected.push(path);\n\t\t\t\t}\n\t\t\t\tif (members.length === 0) {\n\t\t\t\t\tif (undirected.length === 0) return notOk({\n\t\t\t\t\t\tsummary: \"Failed to read Prisma schema files\",\n\t\t\t\t\t\tdiagnostics: readDiagnostics\n\t\t\t\t\t});\n\t\t\t\t\treturn notOk({\n\t\t\t\t\t\tsummary: \"No schema file carries the \\\"// use prisma-8\\\" directive\",\n\t\t\t\t\t\tdiagnostics: [...readDiagnostics, {\n\t\t\t\t\t\t\tcode: \"PSL_NO_OPTED_IN_SCHEMA_FILES\",\n\t\t\t\t\t\t\tmessage: `None of the matched files carry the \"// use prisma-8\" directive: ${undirected.join(\", \")}`,\n\t\t\t\t\t\t\tsourceId: schemaPath\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tconst parsed = members.map(({ path, text }) => parse(text, path));\n\t\t\t\tconst documents = parsed.map(({ document }) => document);\n\t\t\t\tconst [firstSources, ...restSources] = parsed.map(({ sources }) => sources);\n\t\t\t\tassertDefined(firstSources, \"prismaContract requires at least one parsed schema file\");\n\t\t\t\tconst sources = firstSources.merge(...restSources);\n\t\t\t\tconst seedDiagnostics = [...readDiagnostics, ...mapPslDiagnostics(parsed.flatMap(({ diagnostics }) => diagnostics), sources)];\n\t\t\t\tconst { symbolTable, diagnostics: symbolTableDiagnostics } = buildSymbolTable({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tdefaultNamespaceId: context.defaultNamespaceId\n\t\t\t\t});\n\t\t\t\tconst { binder, diagnostics: binderDiagnostics } = createBinder({\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tsources,\n\t\t\t\t\tcontext\n\t\t\t\t});\n\t\t\t\tconst interpreted = withSeedDiagnostics(this.interpret({\n\t\t\t\t\tdocuments,\n\t\t\t\t\tsources,\n\t\t\t\t\tsymbolTable,\n\t\t\t\t\tbinder\n\t\t\t\t}, context), [...seedDiagnostics, ...mapPslDiagnostics([...symbolTableDiagnostics, ...binderDiagnostics], sources)]);\n\t\t\t\tif (!interpreted.ok) return interpreted;\n\t\t\t\treturn ok(applySqlSpecifierControlPolicy(interpreted.value, options.defaultControlPolicy, options.createNamespace));\n\t\t\t}\n\t\t},\n\t\toutput: options.output ?? defaultOutputFromSchemaPath(schemaPath)\n\t};\n}\n//#endregion\nexport { prismaContract };\n\n//# sourceMappingURL=provider.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/D,IAAI,iBAAiB,OAAO,GAAG;EAC/B,eAAe,KAAK,OAAO;CAC5B;CACA,OAAO,eAAe,KAAK,GAAG;AAC/B;;;;;;;;;;AAUA,SAAS,4BAA4B,YAAY;CAChD,IAAI,iBAAiB,UAAU,GAAG;EACjC,MAAM,SAAS,sBAAsB,UAAU;EAC/C,OAAO,OAAO,WAAW,IAAI,kBAAkB,GAAG,OAAO;CAC1D;CACA,MAAM,MAAM,QAAQ,UAAU;CAC9B,IAAI,IAAI,WAAW,GAAG,OAAO,GAAG,WAAW;CAC3C,MAAM,OAAO,WAAW,MAAM,GAAG,CAAC,IAA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sBAAsB,QAAQ,eAAe,CAAC;GACnH;EACD;EACA,QAAQ,QAAQ,UAAU,4BAA4B,UAAU;CACjE;AACD"}
|
package/dist/contract-ts.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as sql } from "./sql-expression-BJCuy-WI.mjs";
|
|
2
|
-
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
3
|
-
import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-
|
|
4
|
-
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-
|
|
2
|
+
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-sRZp_gTF-UGwFWkVX.mjs";
|
|
3
|
+
import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-C1X8KoEM.mjs";
|
|
4
|
+
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-DopEiXtk.mjs";
|
|
5
5
|
export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, emptyContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn, typescriptContract, typescriptContractFromPath };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-
|
|
1
|
+
import { n as typescriptContract, r as typescriptContractFromPath, t as emptyContract } from "./config-types-DopEiXtk.mjs";
|
|
2
2
|
export { emptyContract, typescriptContract, typescriptContractFromPath };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { l as sql } from "./sql-expression-BJCuy-WI.mjs";
|
|
2
|
-
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
3
|
-
import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-
|
|
2
|
+
import { a as storedAsListColumn, i as isValueObjectMember, n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-sRZp_gTF-UGwFWkVX.mjs";
|
|
3
|
+
import { a as check, c as enumType, d as member, f as model, i as buildContractDefinition, l as extensionModel, m as rel, n as bindEnumType, o as createComposedAuthoringHelpers, p as now, r as buildBoundContract, s as defineContract, t as autoincrement, u as field } from "./contract-builder-C1X8KoEM.mjs";
|
|
4
4
|
export { applySqlSpecifierControlPolicy, autoincrement, bindEnumType, buildBoundContract, buildContractDefinition, buildSqlContractFromDefinition, check, createComposedAuthoringHelpers, defineContract, enumType, extensionModel, field, isValueObjectMember, member, model, now, rel, sql, storedAsListColumn };
|
package/dist/contract.d.mts
CHANGED
|
@@ -17,11 +17,11 @@ import { a as lowerAuthoredIndex, i as isAuthoredIndexInput, n as AuthoredIndexM
|
|
|
17
17
|
import { n as lowerAuthoredCheck, t as AuthoredCheckInput } from "./authored-check-naming-CK6T_Dfh.mjs";
|
|
18
18
|
import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-CYnW_sGn.mjs";
|
|
19
19
|
import { a as SqlSingleNamespaceView, i as SqlSingleNamespaceAccessors, n as SqlBuiltinKind, o as buildSqlSchemaQualifiedView, r as SqlSchemaQualifiedView, s as buildSqlSingleNamespaceView, t as SQL_BUILTIN_KINDS } from "./contract-view-BAbRgQMW.mjs";
|
|
20
|
-
import { C as unquotedSqlBaseNameOfCodec, S as unquotedSqlBaseName, _ as sqlDataType, a as SqlDataTypeSpec, b as sqlStorageTypeId, c as SqlTypeText, d as numeralText, f as renderSqlCatalogText, g as sqlBaseName, h as resolveWrittenSqlTypes, i as SqlDataTypeFacts, l as findSqlDataTypeCollision, m as resolveReportedSqlType, n as SqlDataType, o as SqlTypeLookups, p as renderSqlTypeName, r as SqlDataTypeCollision, s as SqlTypeParams, t as ResolvedSqlType, u as isSqlDataType, v as sqlDataTypeOfCodec, w as validateSqlTypeParams, x as sqlStorageTypeOfCodec, y as sqlStorageType } from "./data-type-
|
|
20
|
+
import { C as unquotedSqlBaseNameOfCodec, S as unquotedSqlBaseName, _ as sqlDataType, a as SqlDataTypeSpec, b as sqlStorageTypeId, c as SqlTypeText, d as numeralText, f as renderSqlCatalogText, g as sqlBaseName, h as resolveWrittenSqlTypes, i as SqlDataTypeFacts, l as findSqlDataTypeCollision, m as resolveReportedSqlType, n as SqlDataType, o as SqlTypeLookups, p as renderSqlTypeName, r as SqlDataTypeCollision, s as SqlTypeParams, t as ResolvedSqlType, u as isSqlDataType, v as sqlDataTypeOfCodec, w as validateSqlTypeParams, x as sqlStorageTypeOfCodec, y as sqlStorageType } from "./data-type-DuzmTpzK.mjs";
|
|
21
21
|
import { a as NumberClassifierSpec, c as escapePslString, d as printJsonText, f as signedRange, i as NumberClassification, l as isNumeralText, n as DateTimeStoredTextOptions, o as createNumberClassifier, p as storedNumeralText, r as IntegerStep, s as dateTimeStoredText, t as DateTimeShape, u as parseJsonText } from "./data-type-support-CBcYhSkD.mjs";
|
|
22
22
|
import { n as tableEntityKind, r as valueSetEntityKind, t as composeSqlEntityKinds } from "./entity-kinds-BCMNbwxO.mjs";
|
|
23
23
|
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-B4AMRt6O.mjs";
|
|
24
|
-
import { a as declaredBackingObjectName, c as derivedBackingIndexIsRedundant, i as MaterializedTableConstraints, l as leadingBackingObjectName, n as ForeignKeyAuthoringInput, o as declaredIndexesServeForeignKey, r as IndexCandidate, s as defaultForeignKeyIndex, t as FOREIGN_KEY_INDEX_UNRESOLVED, u as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-
|
|
24
|
+
import { a as declaredBackingObjectName, c as derivedBackingIndexIsRedundant, i as MaterializedTableConstraints, l as leadingBackingObjectName, n as ForeignKeyAuthoringInput, o as declaredIndexesServeForeignKey, r as IndexCandidate, s as defaultForeignKeyIndex, t as FOREIGN_KEY_INDEX_UNRESOLVED, u as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-BiWTp2vi.mjs";
|
|
25
25
|
import { n as validateIndexTypes, t as CodecTraitsLookup } from "./index-type-validation-Cz2T3FJn.mjs";
|
|
26
26
|
import { t as REFERENTIAL_ACTION_SQL } from "./referential-action-sql-Cw1Q0YSd.mjs";
|
|
27
27
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-8N2xelSh.mjs";
|
package/dist/contract.mjs
CHANGED
|
@@ -11,13 +11,13 @@ import { a as PrimaryKey, c as StorageTable, i as Index, l as UniqueConstraint,
|
|
|
11
11
|
import { i as isStorageValueSet, n as checkConstraintInputFromSerialized, r as indexInputFromSerialized, t as StorageValueSet } from "./serialized-index-52COq1yV-CUJ2F65u.mjs";
|
|
12
12
|
import { a as ForeignKeyReferenceSchema, c as IndexSchema, d as StorageValueSetSchema, f as composeSqlEntityKinds, i as ColumnDefaultSchema, l as ReferentialActionSchema, m as valueSetEntityKind, n as ColumnDefaultFunctionSchema, o as ForeignKeySchema, p as tableEntityKind, r as ColumnDefaultLiteralSchema, s as ForeignKeySourceSchema, t as CheckConstraintSchema, u as StorageTableSchema } from "./entity-kinds-CQ_jwgYv-DoOBWwvX.mjs";
|
|
13
13
|
import { a as pk, i as model, n as fk, o as table, r as index, s as unique, t as col } from "./factories-DkD3nMYt.mjs";
|
|
14
|
-
import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-
|
|
15
|
-
import { a as materializeForeignKeysAndIndexes, i as defaultForeignKeyIndex, n as declaredBackingObjectName, r as declaredIndexesServeForeignKey, t as FOREIGN_KEY_INDEX_UNRESOLVED } from "./foreign-key-materialization-
|
|
14
|
+
import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-Cp2V5nhL.mjs";
|
|
15
|
+
import { a as materializeForeignKeysAndIndexes, i as defaultForeignKeyIndex, n as declaredBackingObjectName, r as declaredIndexesServeForeignKey, t as FOREIGN_KEY_INDEX_UNRESOLVED } from "./foreign-key-materialization-BIvQTfz8.mjs";
|
|
16
16
|
import { t as validateIndexTypes } from "./index-type-validation-Bcme_Ust.mjs";
|
|
17
17
|
import { t as REFERENTIAL_ACTION_SQL } from "./referential-action-sql-DSqkrySN.mjs";
|
|
18
18
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
19
19
|
import { a as isSqlExpression, c as requireSqlExpression, d as sqlExpressionDataType, f as sqlExpressionRegistration, h as storedSqlText, i as assertNothingCastsFromSqlExpression, l as sql, m as sqlTextsReadBack, n as SQL_EXPRESSION_TAG, o as printSqlExpressionLiteral, p as sqlTextFromStored, r as SqlExpression, s as readSqlExpression, t as SQL_EXPRESSION_DATA_TYPE_ID, u as sqlExpressionAuthoringEntry } from "./sql-expression-BJCuy-WI.mjs";
|
|
20
20
|
import { a as SqlNamespaceBase, c as isMaterializedSqlNamespace, d as resolvedTypeParams, f as toStorageTypeInstance, i as RelationKeys, l as isSqlAuthoringContributions, n as DEFAULT_FK_CONSTRAINT, o as SqlStorage, r as DEFAULT_FK_INDEX, s as applyFkDefaults, t as CODEC_INSTANCE_KIND, u as isStorageTypeInstance } from "./types-M_FeBD9w.mjs";
|
|
21
|
-
import { a as createSqlStorageSchema, c as validateExecutionDefaultsTargetMappedColumns, d as validateRelationJoinFields, f as validateSqlContractFully, g as valueObjectStorageTypeMissingMessage, h as validateStorageSemantics, i as createSqlContractSchema, l as validateModel, m as validateStorage, n as checkSqlDefaultText, o as reservedSqlDefaultText, p as validateSqlStorageConsistency, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateModelStorageReferences } from "./validators-
|
|
21
|
+
import { a as createSqlStorageSchema, c as validateExecutionDefaultsTargetMappedColumns, d as validateRelationJoinFields, f as validateSqlContractFully, g as valueObjectStorageTypeMissingMessage, h as validateStorageSemantics, i as createSqlContractSchema, l as validateModel, m as validateStorage, n as checkSqlDefaultText, o as reservedSqlDefaultText, p as validateSqlStorageConsistency, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateModelStorageReferences } from "./validators-V8vN9R85.mjs";
|
|
22
22
|
import { n as providesValueSetDerivation, t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
23
23
|
export { CODEC_INSTANCE_KIND, CheckConstraint, CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, DEFAULT_FK_CONSTRAINT, DEFAULT_FK_INDEX, FOREIGN_KEY_INDEX_UNRESOLVED, ForeignKey, ForeignKeyReference, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, Index, IndexSchema, PrimaryKey, REFERENTIAL_ACTION_SQL, ReferentialActionSchema, RelationKeys, SQL_BUILTIN_KINDS, SQL_EXPRESSION_DATA_TYPE_ID, SQL_EXPRESSION_TAG, SqlExpression, SqlNamespaceBase, SqlNode, SqlStorage, StorageColumn, StorageTable, StorageTableSchema, StorageValueSet, StorageValueSetSchema, UniqueConstraint, accessMethodOf, applyFkDefaults, assertNothingCastsFromSqlExpression, buildSqlSchemaQualifiedView, buildSqlSingleNamespaceView, checkConstraintInputFromSerialized, checkSqlDefaultText, col, composeSqlEntityKinds, createIndexTypeRegistry, createNamespaceEntrySchema, createNumberClassifier, createSqlContractSchema, createSqlStorageSchema, dateTimeStoredText, declaredBackingObjectName, declaredIndexesServeForeignKey, defaultForeignKeyIndex, defineIndexTypes, deriveValueSetFromEntity, derivedBackingIndexIsRedundant, escapePslString, exactNameBodyWarning, findSqlDataTypeCollision, fk, index, indexInputFromSerialized, indexTypeRegistryOf, isAuthoredIndexInput, isMaterializedSqlNamespace, isNumeralText, isSqlAuthoringContributions, isSqlDataType, isSqlExpression, isStorageTypeInstance, isStorageValueSet, leadingBackingObjectName, lowerAuthoredCheck, lowerAuthoredIndex, materializeForeignKeysAndIndexes, model, numeralText, parseJsonText, pk, printJsonText, printSqlExpressionLiteral, providesEntityHandleLowering, providesPslEntityPlacement, providesValueSetDerivation, readSqlExpression, renderSqlCatalogText, renderSqlTypeName, rendersIndexBody, requireSqlExpression, reservedSqlDefaultText, resolveReportedSqlType, resolveSqlToOneRelationStorage, resolveStorageTable, resolveWrittenSqlTypes, resolvedTypeParams, signedRange, sql, sqlBaseName, sqlContractCanonicalizationHooks, sqlDataType, sqlDataTypeOfCodec, sqlExpressionAuthoringEntry, sqlExpressionDataType, sqlExpressionRegistration, sqlStorageType, sqlStorageTypeId, sqlStorageTypeOfCodec, sqlTextFromStored, sqlTextsReadBack, storedNumeralText, storedSqlText, table, tableEntityKind, toStorageTypeInstance, unique, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateExecutionDefaultsTargetMappedColumns, validateIndexTypes, validateModel, validateModelStorageReferences, validateRelationJoinFields, validateSqlContractFully, validateSqlStorageConsistency, validateSqlTypeParams, validateStorage, validateStorageSemantics, valueObjectStorageTypeMissingMessage, valueSetEntityKind };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as unquotedSqlBaseNameOfCodec, S as unquotedSqlBaseName, _ as sqlDataType, a as SqlDataTypeSpec, b as sqlStorageTypeId, c as SqlTypeText, d as numeralText, f as renderSqlCatalogText, g as sqlBaseName, h as resolveWrittenSqlTypes, i as SqlDataTypeFacts, l as findSqlDataTypeCollision, m as resolveReportedSqlType, n as SqlDataType, o as SqlTypeLookups, p as renderSqlTypeName, r as SqlDataTypeCollision, s as SqlTypeParams, t as ResolvedSqlType, u as isSqlDataType, v as sqlDataTypeOfCodec, w as validateSqlTypeParams, x as sqlStorageTypeOfCodec, y as sqlStorageType } from "./data-type-
|
|
1
|
+
import { C as unquotedSqlBaseNameOfCodec, S as unquotedSqlBaseName, _ as sqlDataType, a as SqlDataTypeSpec, b as sqlStorageTypeId, c as SqlTypeText, d as numeralText, f as renderSqlCatalogText, g as sqlBaseName, h as resolveWrittenSqlTypes, i as SqlDataTypeFacts, l as findSqlDataTypeCollision, m as resolveReportedSqlType, n as SqlDataType, o as SqlTypeLookups, p as renderSqlTypeName, r as SqlDataTypeCollision, s as SqlTypeParams, t as ResolvedSqlType, u as isSqlDataType, v as sqlDataTypeOfCodec, w as validateSqlTypeParams, x as sqlStorageTypeOfCodec, y as sqlStorageType } from "./data-type-DuzmTpzK.mjs";
|
|
2
2
|
export { type ResolvedSqlType, type SqlDataType, type SqlDataTypeCollision, type SqlDataTypeFacts, type SqlDataTypeSpec, type SqlTypeLookups, type SqlTypeParams, type SqlTypeText, findSqlDataTypeCollision, isSqlDataType, numeralText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, resolveWrittenSqlTypes, sqlBaseName, sqlDataType, sqlDataTypeOfCodec, sqlStorageType, sqlStorageTypeId, sqlStorageTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as declaredBackingObjectName, c as derivedBackingIndexIsRedundant, i as MaterializedTableConstraints, l as leadingBackingObjectName, n as ForeignKeyAuthoringInput, o as declaredIndexesServeForeignKey, r as IndexCandidate, s as defaultForeignKeyIndex, t as FOREIGN_KEY_INDEX_UNRESOLVED, u as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-
|
|
1
|
+
import { a as declaredBackingObjectName, c as derivedBackingIndexIsRedundant, i as MaterializedTableConstraints, l as leadingBackingObjectName, n as ForeignKeyAuthoringInput, o as declaredIndexesServeForeignKey, r as IndexCandidate, s as defaultForeignKeyIndex, t as FOREIGN_KEY_INDEX_UNRESOLVED, u as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-BiWTp2vi.mjs";
|
|
2
2
|
export { FOREIGN_KEY_INDEX_UNRESOLVED, type ForeignKeyAuthoringInput, type IndexCandidate, type MaterializedTableConstraints, declaredBackingObjectName, declaredIndexesServeForeignKey, defaultForeignKeyIndex, derivedBackingIndexIsRedundant, leadingBackingObjectName, materializeForeignKeysAndIndexes };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-
|
|
2
|
-
import { a as materializeForeignKeysAndIndexes, i as defaultForeignKeyIndex, n as declaredBackingObjectName, r as declaredIndexesServeForeignKey, t as FOREIGN_KEY_INDEX_UNRESOLVED } from "./foreign-key-materialization-
|
|
1
|
+
import { i as leadingBackingObjectName, t as derivedBackingIndexIsRedundant } from "./index-equivalence-DswCiq5l-Cp2V5nhL.mjs";
|
|
2
|
+
import { a as materializeForeignKeysAndIndexes, i as defaultForeignKeyIndex, n as declaredBackingObjectName, r as declaredIndexesServeForeignKey, t as FOREIGN_KEY_INDEX_UNRESOLVED } from "./foreign-key-materialization-BIvQTfz8.mjs";
|
|
3
3
|
export { FOREIGN_KEY_INDEX_UNRESOLVED, declaredBackingObjectName, declaredIndexesServeForeignKey, defaultForeignKeyIndex, derivedBackingIndexIsRedundant, leadingBackingObjectName, materializeForeignKeysAndIndexes };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as ForeignKeyReferenceSchema, c as IndexSchema, d as StorageValueSetSchema, i as ColumnDefaultSchema, l as ReferentialActionSchema, n as ColumnDefaultFunctionSchema, o as ForeignKeySchema, r as ColumnDefaultLiteralSchema, s as ForeignKeySourceSchema, t as CheckConstraintSchema, u as StorageTableSchema } from "./entity-kinds-CQ_jwgYv-DoOBWwvX.mjs";
|
|
2
|
-
import { a as createSqlStorageSchema, c as validateExecutionDefaultsTargetMappedColumns, d as validateRelationJoinFields, f as validateSqlContractFully, g as valueObjectStorageTypeMissingMessage, h as validateStorageSemantics, i as createSqlContractSchema, l as validateModel, m as validateStorage, n as checkSqlDefaultText, o as reservedSqlDefaultText, p as validateSqlStorageConsistency, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateModelStorageReferences } from "./validators-
|
|
2
|
+
import { a as createSqlStorageSchema, c as validateExecutionDefaultsTargetMappedColumns, d as validateRelationJoinFields, f as validateSqlContractFully, g as valueObjectStorageTypeMissingMessage, h as validateStorageSemantics, i as createSqlContractSchema, l as validateModel, m as validateStorage, n as checkSqlDefaultText, o as reservedSqlDefaultText, p as validateSqlStorageConsistency, r as createNamespaceEntrySchema, s as resolveSqlToOneRelationStorage, t as ContractEnumSchema, u as validateModelStorageReferences } from "./validators-V8vN9R85.mjs";
|
|
3
3
|
export { CheckConstraintSchema, ColumnDefaultFunctionSchema, ColumnDefaultLiteralSchema, ColumnDefaultSchema, ContractEnumSchema, ForeignKeyReferenceSchema, ForeignKeySchema, ForeignKeySourceSchema, IndexSchema, ReferentialActionSchema, StorageTableSchema, StorageValueSetSchema, checkSqlDefaultText, createNamespaceEntrySchema, createSqlContractSchema, createSqlStorageSchema, reservedSqlDefaultText, resolveSqlToOneRelationStorage, validateExecutionDefaultsTargetMappedColumns, validateModel, validateModelStorageReferences, validateRelationJoinFields, validateSqlContractFully, validateSqlStorageConsistency, validateStorage, validateStorageSemantics, valueObjectStorageTypeMissingMessage };
|
|
@@ -8,21 +8,21 @@ import { o as SqlExecuteRequest } from "./driver-types-DRsYeq3j-X_D6hNMZ.mjs";
|
|
|
8
8
|
import { a as DdlNode } from "./ddl-types-CoP6yAw9-BDp3W_5g.mjs";
|
|
9
9
|
import { p as LowererContext } from "./ast-Dzsat0Zb.mjs";
|
|
10
10
|
import { a as ParsedNullLiteral, i as EnumMemberListDefault, n as DefaultFunctionCall, r as EnumMemberDefault } from "./attribute-specs-2I2xuKEa.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import "./types-
|
|
13
|
-
import { o as SqlTypeLookups } from "./data-type-
|
|
11
|
+
import { f as SqlDefaultValue, x as SqlSchemaIRNode, y as SqlSchemaIR } from "./types-Bqe0AXuw-xqQnkIj4.mjs";
|
|
12
|
+
import "./types-CTdsm45r.mjs";
|
|
13
|
+
import { o as SqlTypeLookups } from "./data-type-DuzmTpzK.mjs";
|
|
14
14
|
import "./validators-CTZ-hU2l.mjs";
|
|
15
|
-
import { r as SqlControlAdapter } from "./control-adapter-BCopdpsT-
|
|
15
|
+
import { r as SqlControlAdapter } from "./control-adapter-BCopdpsT-Bou0wWLF.mjs";
|
|
16
16
|
import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-BpyuSxbj.mjs";
|
|
17
|
-
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-DaYtBAYT-
|
|
18
|
-
import { t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-
|
|
17
|
+
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-DaYtBAYT-DbsbDMTk.mjs";
|
|
18
|
+
import { t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-GfOUaGGy.mjs";
|
|
19
19
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
20
|
-
import { DataTypeSupport, PresetStorageTemplate, TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
|
|
20
|
+
import { DataTypeSupport, FieldPresetsByCodecAndGenerator, PresetStorageTemplate, TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
|
|
21
21
|
import { Codec, CodecLookupWithDescriptors, CodecRef, DataType, DataTypeLookup } from "@prisma/orm-framework/components/codec";
|
|
22
22
|
import { ColumnDefault, Contract, ContractWithDomain, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
23
23
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
24
24
|
import { NotOk, Ok, Result } from "@prisma/orm-framework/utils/result";
|
|
25
|
-
import { AppliedMigrationStatement, AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DiffSubjectGranularity, FailedCheck, FailedTypeChange, FieldCoordinate, ImportRequirement, MigratableTargetDescriptor, MigrationDataLossKind, MigrationOperationClass, MigrationOperationClass as MigrationOperationClass$1, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanSubjects, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MigrationSubject, ModelCoordinate, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, ResolvedFieldRenameStatement, ResolvedMigrationStatement, ResolvedModelRenameStatement, ResolvedRenameStatement, RowsWithoutValue, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
25
|
+
import { AppliedMigrationStatement, AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DefaultFunctionPrinter, DiffSubjectGranularity, FailedCheck, FailedTypeChange, FieldCoordinate, ImportRequirement, MigratableTargetDescriptor, MigrationDataLossKind, MigrationOperationClass, MigrationOperationClass as MigrationOperationClass$1, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanSubjects, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MigrationSubject, ModelCoordinate, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, ResolvedFieldRenameStatement, ResolvedMigrationStatement, ResolvedModelRenameStatement, ResolvedRenameStatement, RowsWithoutValue, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
26
26
|
import { EmissionSpi, TypesImportSpec } from "@prisma/orm-framework/components/emission";
|
|
27
27
|
import { PslDocumentAst } from "@prisma/orm-framework/components/psl-ast";
|
|
28
28
|
//#region ../../../2-sql/9-family/dist/control.d.mts
|
|
@@ -465,12 +465,18 @@ interface SqlDescribedContractSpace {
|
|
|
465
465
|
readonly contract: Contract<SqlStorage>;
|
|
466
466
|
}
|
|
467
467
|
/**
|
|
468
|
-
* The parts of the composed stack a target builds a PSL document with. The PSL contract source reads the document with the same parts, so the target writes a column type as a type constructor the stack contributes,
|
|
468
|
+
* The parts of the composed stack a target builds a PSL document with. The PSL contract source reads the document with the same parts, so the target writes a column type as a type constructor the stack contributes, a literal default through the data type of the column's codec, and a generated value as a default function or field preset the stack contributes, and all of them read back.
|
|
469
469
|
*/
|
|
470
470
|
interface SqlPslBuildContext {
|
|
471
|
-
readonly authoringContributions: Pick<AssembledAuthoringContributions, 'type'>;
|
|
471
|
+
readonly authoringContributions: Pick<AssembledAuthoringContributions, 'type' | 'field'>;
|
|
472
472
|
readonly codecLookup: CodecLookupWithDescriptors;
|
|
473
473
|
readonly dataTypes: DataTypeSupport;
|
|
474
|
+
/** For each generator id, the default function in the stack whose PSL call produces it. */
|
|
475
|
+
readonly defaultFunctionPrintersByGenerator: ReadonlyMap<string, DefaultFunctionPrinter>;
|
|
476
|
+
/** For each generator id the stack registers, the id of the component that registers it, when that component has one. */
|
|
477
|
+
readonly componentIdsByGenerator: ReadonlyMap<string, string | undefined>;
|
|
478
|
+
/** For each codec, the field preset in the stack that writes a column of it with each generator. */
|
|
479
|
+
readonly fieldPresetsByCodecAndGenerator: FieldPresetsByCodecAndGenerator;
|
|
474
480
|
}
|
|
475
481
|
interface SqlControlTargetDescriptor<TTargetId extends string, TTargetDetails, TContract extends Contract<SqlStorage> = Contract<SqlStorage>> extends MigratableTargetDescriptor<'sql', TTargetId, SqlControlFamilyInstance> {
|
|
476
482
|
readonly queryOperations?: () => SqlOperationDescriptors;
|
|
@@ -1354,11 +1360,14 @@ declare function temporalStringAuthoringPresets<const Storage extends PresetStor
|
|
|
1354
1360
|
*
|
|
1355
1361
|
* All three arguments are optional: omitting `precision` omits `typeParams`
|
|
1356
1362
|
* entirely, and omitting a phase omits that phase (both omitted omits
|
|
1357
|
-
* `executionDefaults`).
|
|
1363
|
+
* `executionDefaults`). With `nowTakesPrecision`, the generator a `now` selects
|
|
1364
|
+
* also receives the precision as its `precision` param, so it can write a value
|
|
1365
|
+
* the column stores without rounding.
|
|
1358
1366
|
*/
|
|
1359
1367
|
declare function temporalCodecPresetWithPrecision<const CodecId extends string, const GeneratorId extends string = typeof TIMESTAMP_NOW_GENERATOR_ID>(input: {
|
|
1360
1368
|
readonly codecId: CodecId;
|
|
1361
1369
|
readonly generatorId?: GeneratorId;
|
|
1370
|
+
readonly nowTakesPrecision?: true;
|
|
1362
1371
|
}): {
|
|
1363
1372
|
readonly kind: "fieldPreset";
|
|
1364
1373
|
readonly args: readonly [{
|
|
@@ -1414,4 +1423,4 @@ declare function temporalCodecPresetWithPrecision<const CodecId extends string,
|
|
|
1414
1423
|
declare const _default: SqlFamilyDescriptor;
|
|
1415
1424
|
//#endregion
|
|
1416
1425
|
export { TableRenameRequest as $, ReadReportedDefault as A, plannerSuccess as At, SqlPslBuildContext as B, runnerFailure as Bt, MigrationPlannerResult as C, modelRenameStorageEffect as Ct, PlanFieldEventOperationsOptions as D, planFieldEventOperations as Dt, NoTable as E, planFieldEventCalls as Et, SchemaTables as F, requiredColumnsOfMigration as Ft, StatementColumn as G, storageNameOfOperation as Gt, SqlQuotingRules as H, slotSource as Ht, SingleOperationCall as I, resolveColumnRenameAgainst as It, SuppressionRecord as J, temporalStringAuthoringPresets as Jt, StatementPlanningTarget as K, subjectsOfCalls as Kt, SqlControlFamilyInstance as L, resolveTableRenameAgainst as Lt, ReportedLiteralDefault as M, readReportedDefault as Mt, RequiredColumn as N, requiredColumnMeta as Nt, PlannedStatements as O, planStatements as Ot, RequiredColumnMark as P, requiredColumnOf as Pt, TableRenameByHand as Q, unmatchedTableRename as Qt, SqlControlTargetDescriptor as R, rowsWithoutValueFailure as Rt, MigrationPlannerConflict$1 as S, isUnfilledSlot as St, ModelTable as T, partitionIssuesByControlPolicy as Tt, SqlSlot as U, sqlOfSlot as Ut, SqlQuote as V, runnerSuccess as Vt, SqlTextSources as W, sqlTypeLookupsOf as Wt, TableNameCaseGuardTable as X, unknownCallNames as Xt, TABLE_NAME_CASE_CHANGED_CODE as Y, unconvertedFieldOf as Yt, TableRename as Z, unmatchedColumnRename as Zt, MigrationOperationClass$1 as _, extractCodecControlHooks as _t, ColumnRename as a, checkSqlExpressionText as at, MigrationPlanOperation$1 as b, fieldRenameStorageEffect as bt, ContractColumns as c, contractNamespaceToSchemaIR as ct, ConvertedColumn as d, convertedColumnMeta as dt, TargetMigrationsCapability as et, DefaultResolver as f, convertedColumnOf as ft, INIT_ADDITIVE_POLICY as g, detectTableNameCaseChanges as gt, FieldStorageEffect as h, detectDestructiveChanges as ht, ColumnOnOneSide as i, backfillOfDefaultedField as it, ReportedBody as j, readColumnDefault as jt, ReadColumnDefault as k, plannerFailure as kt, ContractToSchemaIROptions as l, contractToSchemaIR as lt, FieldStatementColumns as m, createSqlTextSources as mt, CallSubjects as n, appliedStatementsInOrder as nt, ColumnRenameRequest as o, columnTakesTemporaryValue as ot, FieldEventCall as p, createMigrationPlan as pt, SubjectStorage as q, temporalCodecPresetWithPrecision as qt, CallWithCompanions as r, assembleAuthoringContributions as rt, ContractColumn as s, contractColumns as st, COLUMN_RENAME_UNMATCHED_CODE as t, _default as tt, ControlPolicySubject as u, controlPolicyForCall as ut, MigrationOperationPolicy$1 as v, fieldEventStorage as vt, ModelStorageEffect as w, partitionCallsByControlPolicy as wt, MigrationPlanner as x, fieldStatementColumns as xt, MigrationPlan$1 as y, fieldOfColumn as yt, SqlDescribedContractSpace as z, rowsWithoutValueSummary as zt };
|
|
1417
|
-
//# sourceMappingURL=control-
|
|
1426
|
+
//# sourceMappingURL=control-BqS5MMDh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BqS5MMDh.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAoBU;WACC,kBAAkB,cAAc;WAChC,cAAc;;UAEf,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,wBAAwB,SAAS,cAAc,yBAAyB;;;;;;;;;EAS9O,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB,QAAQ;EACrD,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;EACrE,cAAc,WAAW;;;;cAIb,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV,oBAAoB;WACpB;aACE;eACE;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;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qB;;;;eAI3B;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;cAS5B,UAAU"}
|
|
@@ -2,21 +2,21 @@ import { u as namingOf } from "./naming-bM5qm5PY-DdginUhA.mjs";
|
|
|
2
2
|
import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-dmXkOR4a.mjs";
|
|
3
3
|
import { d as sqlStorageTypeId, h as validateSqlTypeParams, i as renderSqlTypeName, l as sqlDataTypeOfCodec, n as isSqlDataType, p as unquotedSqlBaseName, u as sqlStorageType } from "./sql-data-type-Dabuwxet-BljsNjBu.mjs";
|
|
4
4
|
import { c as StorageTable } from "./storage-table-DN36E2yE-0ncS821l.mjs";
|
|
5
|
-
import { c as SqlSchemaIR, n as RelationalSchemaNodeKind, u as SqlTableIR } from "./types-
|
|
6
|
-
import { f as sqlExpressionRegistration } from "./sql-expression-BJCuy-WI.mjs";
|
|
5
|
+
import { c as SqlSchemaIR, n as RelationalSchemaNodeKind, u as SqlTableIR } from "./types-CfPB-Kz_-ByWDfwMj.mjs";
|
|
6
|
+
import { f as sqlExpressionRegistration, m as sqlTextsReadBack, o as printSqlExpressionLiteral } from "./sql-expression-BJCuy-WI.mjs";
|
|
7
7
|
import { d as resolvedTypeParams, u as isStorageTypeInstance } from "./types-M_FeBD9w.mjs";
|
|
8
|
-
import { g as valueObjectStorageTypeMissingMessage } from "./validators-
|
|
9
|
-
import { a as describeUnsupportedSqlAttribute, v as sqlAttributeSpecs } from "./psl-field-resolution-
|
|
8
|
+
import { g as valueObjectStorageTypeMissingMessage } from "./validators-V8vN9R85.mjs";
|
|
9
|
+
import { a as describeUnsupportedSqlAttribute, v as sqlAttributeSpecs } from "./psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs";
|
|
10
10
|
import { t as describeUnresolvedSqlType } from "./diagnostics-C8YevjSU.mjs";
|
|
11
11
|
import { t as sqlEmission } from "./dist-DAHIT4AS.mjs";
|
|
12
|
-
import { i as sqlFamilyPslBlockDescriptors, n as sqlFamilyAuthoringTypes, r as sqlFamilyEntityTypes, t as sqlFamilyAuthoringFieldPresets } from "./authoring-type-constructors-0Iv2zdwS-
|
|
12
|
+
import { i as sqlFamilyPslBlockDescriptors, n as sqlFamilyAuthoringTypes, r as sqlFamilyEntityTypes, t as sqlFamilyAuthoringFieldPresets } from "./authoring-type-constructors-0Iv2zdwS-BJjO5EnA.mjs";
|
|
13
13
|
import { c as verifySqlSchemaByDiff, n as classifyDiffSubjectGranularity, o as enforceSqlDataTypeInvariants, t as classifyDiffEntityKind } from "./schema-verify-BwRdzbHb-B9vFrm3T.mjs";
|
|
14
14
|
import { t as sqlFamilyError } from "./errors-B5g0xWro-mWH2C07F.mjs";
|
|
15
|
-
import { t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-
|
|
15
|
+
import { t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-BKQ4Yh-n.mjs";
|
|
16
16
|
import { t as collectSupportedCodecTypeIds } from "./verify-BVk5bjdH-dq5M4iIh.mjs";
|
|
17
17
|
import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
18
18
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
19
|
-
import { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, collectScalarTypeConstructors, temporalAuthoringPresets, temporalPhaseTemplate, tsTaggedTemplateSource } from "@prisma/orm-framework/components/authoring";
|
|
19
|
+
import { TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, collectScalarTypeConstructors, temporalAuthoringPresets, temporalPhaseTemplate, temporalPhaseTemplateWithParams, tsTaggedTemplateSource } from "@prisma/orm-framework/components/authoring";
|
|
20
20
|
import { ContractValidationError } from "@prisma/orm-framework/contract/contract-validation-error";
|
|
21
21
|
import { UNBOUND_NAMESPACE_ID, isPlainRecord } from "@prisma/orm-framework/components/ir";
|
|
22
22
|
import { assembleDataTypes, codecForRef, dataTypeParams } from "@prisma/orm-framework/components/codec";
|
|
@@ -372,7 +372,10 @@ function createSqlFamilyInstance(stack) {
|
|
|
372
372
|
const pslBuildContext = {
|
|
373
373
|
authoringContributions: stack.authoringContributions,
|
|
374
374
|
codecLookup: stack.codecLookup,
|
|
375
|
-
dataTypes: stack.dataTypes
|
|
375
|
+
dataTypes: stack.dataTypes,
|
|
376
|
+
defaultFunctionPrintersByGenerator: stack.controlMutationDefaults.defaultFunctionPrintersByGenerator,
|
|
377
|
+
componentIdsByGenerator: stack.controlMutationDefaults.componentIdsByGenerator,
|
|
378
|
+
fieldPresetsByCodecAndGenerator: stack.fieldPresetsByCodecAndGenerator
|
|
376
379
|
};
|
|
377
380
|
const targetBuildPslContract = blindCast(target).buildPslContract;
|
|
378
381
|
const diffSchema = blindCast(target).diffSchema;
|
|
@@ -790,9 +793,13 @@ function convertColumn(name, column, storageTypes, types, hooks) {
|
|
|
790
793
|
codecRef: buildColumnCodecRef(resolved, many ? true : void 0),
|
|
791
794
|
codecBaseNativeType: baseTypeName,
|
|
792
795
|
dataType,
|
|
793
|
-
...ifDefined("defaultValue", rawColumnDefault?.kind === "literal" && rawColumnDefault.value instanceof Date ? dateDefaultValue(rawColumnDefault.value, codecForRef(types.codecLookup, buildColumnCodecRef(resolved, void 0))) : contractDefaultValue(rawColumnDefault, dataType, dataTypeParams(dataType, resolved.typeParams), many))
|
|
796
|
+
...ifDefined("defaultValue", rawColumnDefault?.kind === "literal" && rawColumnDefault.value instanceof Date ? dateDefaultValue(rawColumnDefault.value, codecForRef(types.codecLookup, buildColumnCodecRef(resolved, void 0))) : contractDefaultValue(rawColumnDefault, dataType, dataTypeParams(dataType, resolved.typeParams), many)),
|
|
797
|
+
sqlExpressionLiteralFor
|
|
794
798
|
};
|
|
795
799
|
}
|
|
800
|
+
function sqlExpressionLiteralFor(text) {
|
|
801
|
+
return sqlTextsReadBack([text]) ? printSqlExpressionLiteral(text) : void 0;
|
|
802
|
+
}
|
|
796
803
|
/**
|
|
797
804
|
* A `Date` default, which an in-memory contract can hold, as the value of the column's type the column's codec reads it as. `undefined` when the codec refuses it or no codec is registered, and the default then compares unequal to any other.
|
|
798
805
|
*/
|
|
@@ -2597,6 +2604,10 @@ const TEMPORAL_PRECISION_ARG = {
|
|
|
2597
2604
|
optional: true,
|
|
2598
2605
|
integer: true
|
|
2599
2606
|
};
|
|
2607
|
+
const PRECISION_PARAMS = { precision: {
|
|
2608
|
+
kind: "arg",
|
|
2609
|
+
index: 0
|
|
2610
|
+
} };
|
|
2600
2611
|
/**
|
|
2601
2612
|
* Builds a `temporal.<codec>` field preset for a codec that takes a precision
|
|
2602
2613
|
* parameter (`pg/timestamp-temporal@1`, `pg/timestamptz-temporal@1`). Arguments change field
|
|
@@ -2604,11 +2615,14 @@ const TEMPORAL_PRECISION_ARG = {
|
|
|
2604
2615
|
*
|
|
2605
2616
|
* All three arguments are optional: omitting `precision` omits `typeParams`
|
|
2606
2617
|
* entirely, and omitting a phase omits that phase (both omitted omits
|
|
2607
|
-
* `executionDefaults`).
|
|
2618
|
+
* `executionDefaults`). With `nowTakesPrecision`, the generator a `now` selects
|
|
2619
|
+
* also receives the precision as its `precision` param, so it can write a value
|
|
2620
|
+
* the column stores without rounding.
|
|
2608
2621
|
*/
|
|
2609
2622
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2610
2623
|
function temporalCodecPresetWithPrecision(input) {
|
|
2611
2624
|
const generatorId = input.generatorId ?? TIMESTAMP_NOW_GENERATOR_ID;
|
|
2625
|
+
const phase = (index) => input.nowTakesPrecision === true ? temporalPhaseTemplateWithParams(index, generatorId, PRECISION_PARAMS) : temporalPhaseTemplate(index, generatorId);
|
|
2612
2626
|
return {
|
|
2613
2627
|
kind: "fieldPreset",
|
|
2614
2628
|
args: [
|
|
@@ -2623,8 +2637,8 @@ function temporalCodecPresetWithPrecision(input) {
|
|
|
2623
2637
|
index: 0
|
|
2624
2638
|
} },
|
|
2625
2639
|
executionDefaults: {
|
|
2626
|
-
onCreate:
|
|
2627
|
-
onUpdate:
|
|
2640
|
+
onCreate: phase(1),
|
|
2641
|
+
onUpdate: phase(2)
|
|
2628
2642
|
}
|
|
2629
2643
|
}
|
|
2630
2644
|
};
|
|
@@ -2633,4 +2647,4 @@ var control_default = new SqlFamilyDescriptor();
|
|
|
2633
2647
|
//#endregion
|
|
2634
2648
|
export { unmatchedColumnRename as $, planStatements as A, rowsWithoutValueFailure as B, fieldStatementColumns as C, partitionIssuesByControlPolicy as D, partitionCallsByControlPolicy as E, requiredColumnMeta as F, sqlOfSlot as G, runnerFailure as H, requiredColumnOf as I, subjectsOfCalls as J, sqlTypeLookupsOf as K, requiredColumnsOfMigration as L, plannerSuccess as M, readColumnDefault as N, planFieldEventCalls as O, readReportedDefault as P, unknownCallNames as Q, resolveColumnRenameAgainst as R, fieldRenameStorageEffect as S, modelRenameStorageEffect as T, runnerSuccess as U, rowsWithoutValueSummary as V, slotSource as W, temporalStringAuthoringPresets as X, temporalCodecPresetWithPrecision as Y, unconvertedFieldOf as Z, createSqlTextSources as _, assembleAuthoringContributions as a, fieldEventStorage as b, columnTakesTemporaryValue as c, contractToSchemaIR as d, unmatchedTableRename as et, controlPolicyForCall as f, createMigrationPlan as g, convertedColumnOf as h, appliedStatementsInOrder as i, plannerFailure as j, planFieldEventOperations as k, contractColumns as l, convertedColumnMeta as m, INIT_ADDITIVE_POLICY as n, backfillOfDefaultedField as o, control_default as p, storageNameOfOperation as q, TABLE_NAME_CASE_CHANGED_CODE as r, checkSqlExpressionText as s, COLUMN_RENAME_UNMATCHED_CODE as t, contractNamespaceToSchemaIR as u, detectDestructiveChanges as v, isUnfilledSlot as w, fieldOfColumn as x, detectTableNameCaseChanges as y, resolveTableRenameAgainst as z };
|
|
2635
2649
|
|
|
2636
|
-
//# sourceMappingURL=control-
|
|
2650
|
+
//# sourceMappingURL=control-C7MNvu5Q.mjs.map
|