@prisma/orm-family-sql 8.0.0-rc.18-dev.41 → 8.0.0-rc.18-dev.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attribute-specs-D_fUYNiw.d.mts → attribute-specs-cHzMPvMl.d.mts} +3 -3
- package/dist/{attribute-specs-D_fUYNiw.d.mts.map → attribute-specs-cHzMPvMl.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts → authoring-entity-types-DUQLeBf_-nuhFC6jJ.d.mts} +2 -2
- package/dist/{authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts.map → authoring-entity-types-DUQLeBf_-nuhFC6jJ.d.mts.map} +1 -1
- package/dist/{config-types-CUWdUm6B.mjs → config-types-DY37pCIx.mjs} +2 -2
- package/dist/{config-types-CUWdUm6B.mjs.map → config-types-DY37pCIx.mjs.map} +1 -1
- package/dist/{contract-builder-DzzgwCZd.mjs → contract-builder-DT689tII.mjs} +61 -12
- package/dist/contract-builder-DT689tII.mjs.map +1 -0
- package/dist/{contract-builder-Di-2-fFO.d.mts → contract-builder-DZSUqbp0.d.mts} +21 -18
- package/dist/contract-builder-DZSUqbp0.d.mts.map +1 -0
- package/dist/contract-prisma7__provider.d.mts +4 -2
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +74 -73
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +2 -2
- package/dist/contract-psl.d.mts.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__diagnostics.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.d.mts +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.d.mts +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/{control-d-Dlrhh4.mjs → control-CF-KJYTH.mjs} +6 -58
- package/dist/control-CF-KJYTH.mjs.map +1 -0
- package/dist/{control-LkQLqHHL.d.mts → control-YFLg-7Gn.d.mts} +8 -128
- package/dist/control-YFLg-7Gn.d.mts.map +1 -0
- package/dist/{default-mapping-CP8q4TfH-CF6eJMej.d.mts → default-mapping-CAOONlKQ-v7GTIkjE.d.mts} +9 -5
- package/dist/default-mapping-CAOONlKQ-v7GTIkjE.d.mts.map +1 -0
- package/dist/{derived-checks-CwbSfZ8d-B91zqK6B.mjs → derived-checks-CXW9ytkb-B_zxX1-8.mjs} +2 -2
- package/dist/{derived-checks-CwbSfZ8d-B91zqK6B.mjs.map → derived-checks-CXW9ytkb-B_zxX1-8.mjs.map} +1 -1
- package/dist/{diagnostics-xqFRhSin.mjs → diagnostics-IM48vCjC.mjs} +4 -2
- package/dist/diagnostics-IM48vCjC.mjs.map +1 -0
- package/dist/family.d.mts +6 -6
- package/dist/family.mjs +5 -4
- package/dist/family__control.d.mts +2 -2
- package/dist/family__control.mjs +2 -2
- package/dist/family__pack.d.mts +2 -2
- package/dist/family__pack.mjs +3 -25
- package/dist/family__psl-build.d.mts +3 -3
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/{generator-functions-DErXcNG5-nKYm5qLY.mjs → generator-functions-DuDZSQHE-BbKhsXck.mjs} +30 -26
- package/dist/generator-functions-DuDZSQHE-BbKhsXck.mjs.map +1 -0
- package/dist/{interpreter-MPFufRkd-D0QvlLTq.mjs → interpreter-DTwRm0sl-DHX1SdeJ.mjs} +11 -7
- package/dist/interpreter-DTwRm0sl-DHX1SdeJ.mjs.map +1 -0
- package/dist/{pack-74uFuOgh.d.mts → pack-AyeYizq-.d.mts} +152 -28
- package/dist/pack-AyeYizq-.d.mts.map +1 -0
- package/dist/pack-NM8AYiUp.mjs +80 -0
- package/dist/pack-NM8AYiUp.mjs.map +1 -0
- package/dist/{psl-build-BkNvqSMz.d.mts → psl-build-C4ia2uM6.d.mts} +10 -8
- package/dist/psl-build-C4ia2uM6.d.mts.map +1 -0
- package/dist/{psl-build-BSZQ8lC1.mjs → psl-build-D5VG40ej.mjs} +122 -107
- package/dist/psl-build-D5VG40ej.mjs.map +1 -0
- package/dist/{psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts → psl-column-resolution-BgThghdu-BWaFlWYV.d.mts} +4 -4
- package/dist/psl-column-resolution-BgThghdu-BWaFlWYV.d.mts.map +1 -0
- package/dist/{psl-field-resolution-BLtSah2i-BuuJ5H70.mjs → psl-field-resolution-DpGsATq3-BREG9FbU.mjs} +11 -7
- package/dist/psl-field-resolution-DpGsATq3-BREG9FbU.mjs.map +1 -0
- package/dist/{psl-infer-C-RcAyUr.d.mts → psl-infer-B_n-rSCj.d.mts} +2 -2
- package/dist/{psl-infer-C-RcAyUr.d.mts.map → psl-infer-B_n-rSCj.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/contract-builder-Di-2-fFO.d.mts.map +0 -1
- package/dist/contract-builder-DzzgwCZd.mjs.map +0 -1
- package/dist/control-LkQLqHHL.d.mts.map +0 -1
- package/dist/control-d-Dlrhh4.mjs.map +0 -1
- package/dist/default-mapping-CP8q4TfH-CF6eJMej.d.mts.map +0 -1
- package/dist/diagnostics-xqFRhSin.mjs.map +0 -1
- package/dist/family__pack.mjs.map +0 -1
- package/dist/generator-functions-DErXcNG5-nKYm5qLY.mjs.map +0 -1
- package/dist/interpreter-MPFufRkd-D0QvlLTq.mjs.map +0 -1
- package/dist/pack-74uFuOgh.d.mts.map +0 -1
- package/dist/psl-build-BSZQ8lC1.mjs.map +0 -1
- package/dist/psl-build-BkNvqSMz.d.mts.map +0 -1
- package/dist/psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts.map +0 -1
- package/dist/psl-field-resolution-BLtSah2i-BuuJ5H70.mjs.map +0 -1
package/dist/family.d.mts
CHANGED
|
@@ -3,15 +3,15 @@ import { h as checkSqlDefaultText } from "./validators-CTZ-hU2l.mjs";
|
|
|
3
3
|
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-Bn0uhplA-BBax-2PG.mjs";
|
|
4
4
|
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-CI5lled6-CDV4aYNB.mjs";
|
|
5
5
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BfEQ_9cY.mjs";
|
|
6
|
-
import { $ as TableRename,
|
|
6
|
+
import { $ as TableRename, A as ReadColumnDefault, At as plannerFailure, B as SqlDefaultFunctionName, Bt as rowsWithoutValueSummary, C as MigrationPlannerConflict, Ct as isUnfilledSlot, D as NoTable, Dt as planFieldEventCalls, E as ModelTable, Et as partitionIssuesByControlPolicy, F as RequiredColumnMark, Ft as requiredColumnOf, G as SqlSlot, Gt as sqlOfSlot, H as SqlPslBuildContext, Ht as runnerSuccess, I as SchemaTables, It as requiredColumnsOfMigration, J as StatementPlanningTarget, Jt as subjectsOfCalls, K as SqlTextSources, Kt as sqlTypeLookupsOf, L as SingleOperationCall, Lt as resolveColumnRenameAgainst, M as ReportedBody, Mt as readColumnDefault, N as ReportedLiteralDefault, Nt as readReportedDefault, O as PlanFieldEventOperationsOptions, Ot as planFieldEventOperations, P as RequiredColumn, Pt as requiredColumnMeta, Q as TableNameCaseGuardTable, Qt as unmatchedTableRename, R as SqlControlFamilyInstance, Rt as resolveTableRenameAgainst, S as MigrationPlanner, St as fieldStatementColumns, T as ModelStorageEffect, Tt as partitionCallsByControlPolicy, U as SqlQuote, Ut as slotSource, V as SqlDescribedContractSpace, Vt as runnerFailure, W as SqlQuotingRules, Wt as sqlDefaultFunctions, X as SuppressionRecord, Xt as unknownCallNames, Y as SubjectStorage, Yt as unconvertedFieldOf, Z as TABLE_NAME_CASE_CHANGED_CODE, Zt as unmatchedColumnRename, _ as INIT_ADDITIVE_POLICY, _t as detectTableNameCaseChanges, a as ColumnRename, at as assembleAuthoringContributions, b as MigrationPlan, bt as fieldOfColumn, c as ContractColumns, ct as columnTakesTemporaryValue, d as ConvertedColumn, dt as contractToSchemaIR, et as TableRenameByHand, f as DefaultResolver, ft as convertedColumnMeta, g as FieldStorageEffect, gt as detectDestructiveChanges, h as FieldStatementColumns, ht as createSqlTextSources, i as ColumnOnOneSide, it as appliedStatementsInOrder, j as ReadReportedDefault, jt as plannerSuccess, k as PlannedStatements, kt as planStatements, l as ContractToSchemaIROptions, lt as contractColumns, m as FieldEventCall, mt as createMigrationPlan, n as CallSubjects, nt as TargetMigrationsCapability, o as ColumnRenameRequest, ot as backfillOfDefaultedField, p as DefaultResolverColumn, pt as convertedColumnOf, q as StatementColumn, qt as storageNameOfOperation, r as CallWithCompanions, s as ContractColumn, st as checkSqlExpressionText, t as COLUMN_RENAME_UNMATCHED_CODE, tt as TableRenameRequest, u as ControlPolicySubject, ut as contractNamespaceToSchemaIR, v as MigrationOperationClass, vt as extractCodecControlHooks, w as MigrationPlannerResult, wt as modelRenameStorageEffect, x as MigrationPlanOperation, xt as fieldRenameStorageEffect, y as MigrationOperationPolicy, yt as fieldEventStorage, z as SqlControlTargetDescriptor, zt as rowsWithoutValueFailure } from "./control-YFLg-7Gn.mjs";
|
|
7
7
|
import { t as resolveIntrospectedColumnType } from "./control-adapter-QzlyTp1z.mjs";
|
|
8
8
|
import { a as VerifySqlSchemaByDiffInput, c as classifySqlDiffIssue, d as verifySqlSchemaByDiff, i as StorageTypeVerdictInput, l as computeSqlDiffVerdict, n as SqlDiffVerdictInput, o as arraysEqual, r as StorageTypeVerdict, s as classifyDiffSubjectGranularity, t as SqlDiffVerdict, u as computeStorageTypeVerdict } from "./diff-CzUyZmJi.mjs";
|
|
9
9
|
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-qK4wX3D3.mjs";
|
|
10
10
|
import { t as SqlMigration } from "./migration-tfMTDejH.mjs";
|
|
11
|
-
import { r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-
|
|
12
|
-
import {
|
|
13
|
-
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as
|
|
14
|
-
import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-
|
|
11
|
+
import { a as temporalCodecPresetWithPrecision, i as sqlTargetTypeConstructors, o as temporalStringAuthoringPresets, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-AyeYizq-.mjs";
|
|
12
|
+
import { a as writeDefaultLiteral, i as writeDataTypeValue, n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CAOONlKQ-v7GTIkjE.mjs";
|
|
13
|
+
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as writtenTypeArguments, n as GeneratorCallRefusal, o as IntrospectedTable, p as toEnumMemberName, r as GeneratorCallsResult, s as PhaseCallText, t as ColumnTypeOf, u as generatorCallsFor } from "./psl-build-C4ia2uM6.mjs";
|
|
14
|
+
import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-B_n-rSCj.mjs";
|
|
15
15
|
import { a as timestampNowRuntimeGenerator, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-BlUQqGCH.mjs";
|
|
16
16
|
import { n as parseContractMarkerRow, t as ContractMarkerRow } from "./verify-zDRnw0Rn.mjs";
|
|
17
|
-
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ColumnTypeOf, type ContractColumn, type ContractColumns, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultResolver, type DefaultResolverColumn, type EnumInfo, type ExecuteRequestLowerer, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, type GeneratorCallRefusal, type GeneratorCallsResult, INIT_ADDITIVE_POLICY, type InferredRelations, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type Lowerer, SqlMigration as Migration, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PhaseCallText, type PlanFieldEventOperationsOptions, type PlannedStatements, type PslPrinterOptions, type PslTypeCall, type ReadColumnDefault, type ReadReportedDefault, type RelationField, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, type SchemaTables, type SingleOperationCall, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, SqlSchemaVerifierBase, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementPlanningTarget, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, UNBOUND_DOMAIN_NAMESPACE_ID, type VerifySqlSchemaByDiffInput, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize,
|
|
17
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ColumnTypeOf, type ContractColumn, type ContractColumns, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultResolver, type DefaultResolverColumn, type EnumInfo, type ExecuteRequestLowerer, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, type GeneratorCallRefusal, type GeneratorCallsResult, INIT_ADDITIVE_POLICY, type InferredRelations, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type Lowerer, SqlMigration as Migration, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PhaseCallText, type PlanFieldEventOperationsOptions, type PlannedStatements, type PslPrinterOptions, type PslTypeCall, type ReadColumnDefault, type ReadReportedDefault, type RelationField, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, type SchemaTables, type SingleOperationCall, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, SqlSchemaVerifierBase, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementPlanningTarget, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, UNBOUND_DOMAIN_NAMESPACE_ID, type VerifySqlSchemaByDiffInput, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff, writeDataTypeValue, writeDefaultLiteral, writtenTypeArguments };
|
package/dist/family.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
2
|
import { n as checkSqlDefaultText } from "./validators-Cfy0jmZ2.mjs";
|
|
3
|
-
import { c as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-
|
|
3
|
+
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-DuDZSQHE-BbKhsXck.mjs";
|
|
4
4
|
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue, s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-DfFAS0EC.mjs";
|
|
5
5
|
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs";
|
|
6
6
|
import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-dq5M4iIh.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { A as plannerFailure, B as rowsWithoutValueSummary, C as isUnfilledSlot, D as planFieldEventCalls, E as partitionIssuesByControlPolicy, F as requiredColumnOf, G as sqlOfSlot, H as runnerSuccess, I as requiredColumnsOfMigration, J as subjectsOfCalls, K as sqlTypeLookupsOf, L as resolveColumnRenameAgainst, M as readColumnDefault, N as readReportedDefault, O as planFieldEventOperations, P as requiredColumnMeta, Q as unmatchedTableRename, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlDefaultFunctions, X as unknownCallNames, Y as unconvertedFieldOf, Z as unmatchedColumnRename, _ as detectDestructiveChanges, a as assembleAuthoringContributions, b as fieldOfColumn, c as columnTakesTemporaryValue, d as contractToSchemaIR, g as createSqlTextSources, h as createMigrationPlan, i as appliedStatementsInOrder, j as plannerSuccess, k as planStatements, l as contractColumns, m as convertedColumnOf, n as INIT_ADDITIVE_POLICY, o as backfillOfDefaultedField, p as convertedColumnMeta, q as storageNameOfOperation, r as TABLE_NAME_CASE_CHANGED_CODE, s as checkSqlExpressionText, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractNamespaceToSchemaIR, v as detectTableNameCaseChanges, w as modelRenameStorageEffect, x as fieldRenameStorageEffect, y as fieldEventStorage, z as rowsWithoutValueFailure } from "./control-CF-KJYTH.mjs";
|
|
8
8
|
import { t as resolveIntrospectedColumnType } from "./control-adapter-DRlEXxsv.mjs";
|
|
9
9
|
import { t as arraysEqual } from "./diff-DZ82XaGR.mjs";
|
|
10
10
|
import { t as SqlSchemaVerifierBase } from "./ir-I-xciGUH.mjs";
|
|
11
11
|
import { t as SqlMigration } from "./migration-Dy_4Wmiy.mjs";
|
|
12
|
+
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets } from "./pack-NM8AYiUp.mjs";
|
|
12
13
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
13
|
-
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as
|
|
14
|
+
import { a as mapDefault, c as writtenTypeArguments, i as inferredTypeConstructors, n as generatorCallsFor, o as writeDataTypeValue, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-D5VG40ej.mjs";
|
|
14
15
|
import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-CaEnF_x3.mjs";
|
|
15
16
|
import { i as timestampNowRuntimeGenerator, n as resolveDomainModel, t as UNBOUND_DOMAIN_NAMESPACE_ID } from "./runtime-Z3nD7ix1.mjs";
|
|
16
|
-
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, SqlMigration as Migration, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize,
|
|
17
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, SqlMigration as Migration, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID, appliedStatementsInOrder, arraysEqual, assembleAuthoringContributions, backfillOfDefaultedField, buildChildRelationField, checkSqlDefaultText, checkSqlExpressionText, classifyDiffSubjectGranularity, classifySqlDiffIssue, columnTakesTemporaryValue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fewestArgumentsCall, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, generatorCallsFor, idGeneratorFunctionBindings, inferColumnTypes, inferRelations, inferredTypeConstructors, isUnfilledSlot, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTargetTypeConstructors, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff, writeDataTypeValue, writeDefaultLiteral, writtenTypeArguments };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as checkSqlDefaultText } from "./validators-CTZ-hU2l.mjs";
|
|
2
2
|
import { C as SqlPlannerConflict, D as SqlPlannerResult, E as SqlPlannerFailureResult, O as SqlPlannerSuccessResult, S as SqlPlanTargetDetails, T as SqlPlannerConflictLocation, _ as SqlMigrationRunnerExecuteCallbacks, a as ResolveIdentityValueInput, b as SqlMigrationRunnerResult, c as SqlMigrationPlan, d as SqlMigrationPlanOperationStep, f as SqlMigrationPlanOperationTarget, g as SqlMigrationRunnerErrorCode, h as SqlMigrationRunner, i as FieldEventContext, k as StorageTypePlanResult, l as SqlMigrationPlanContractInfo, m as SqlMigrationPlannerPlanOptions, n as CreateSqlMigrationPlanOptions, o as SqlControlAdapterDescriptor, p as SqlMigrationPlanner, r as FieldEvent, s as SqlControlExtensionDescriptor, t as CodecControlHooks, u as SqlMigrationPlanOperation, v as SqlMigrationRunnerExecuteOptions, w as SqlPlannerConflictKind, x as SqlMigrationRunnerSuccessValue, y as SqlMigrationRunnerFailure } from "./types-CI5lled6-CDV4aYNB.mjs";
|
|
3
3
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-BfEQ_9cY.mjs";
|
|
4
|
-
import { $ as TableRename,
|
|
5
|
-
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractColumn, type ContractColumns, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultResolver, type DefaultResolverColumn, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, INIT_ADDITIVE_POLICY, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatements, type ReadColumnDefault, type ReadReportedDefault, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type SchemaTables, type SingleOperationCall, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementPlanningTarget, type StorageTypePlanResult, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls,
|
|
4
|
+
import { $ as TableRename, A as ReadColumnDefault, At as plannerFailure, B as SqlDefaultFunctionName, Bt as rowsWithoutValueSummary, C as MigrationPlannerConflict, Ct as isUnfilledSlot, D as NoTable, Dt as planFieldEventCalls, E as ModelTable, Et as partitionIssuesByControlPolicy, F as RequiredColumnMark, Ft as requiredColumnOf, G as SqlSlot, Gt as sqlOfSlot, H as SqlPslBuildContext, Ht as runnerSuccess, I as SchemaTables, It as requiredColumnsOfMigration, J as StatementPlanningTarget, Jt as subjectsOfCalls, K as SqlTextSources, Kt as sqlTypeLookupsOf, L as SingleOperationCall, Lt as resolveColumnRenameAgainst, M as ReportedBody, Mt as readColumnDefault, N as ReportedLiteralDefault, Nt as readReportedDefault, O as PlanFieldEventOperationsOptions, Ot as planFieldEventOperations, P as RequiredColumn, Pt as requiredColumnMeta, Q as TableNameCaseGuardTable, Qt as unmatchedTableRename, R as SqlControlFamilyInstance, Rt as resolveTableRenameAgainst, S as MigrationPlanner, St as fieldStatementColumns, T as ModelStorageEffect, Tt as partitionCallsByControlPolicy, U as SqlQuote, Ut as slotSource, V as SqlDescribedContractSpace, Vt as runnerFailure, W as SqlQuotingRules, Wt as sqlDefaultFunctions, X as SuppressionRecord, Xt as unknownCallNames, Y as SubjectStorage, Yt as unconvertedFieldOf, Z as TABLE_NAME_CASE_CHANGED_CODE, Zt as unmatchedColumnRename, _ as INIT_ADDITIVE_POLICY, _t as detectTableNameCaseChanges, a as ColumnRename, at as assembleAuthoringContributions, b as MigrationPlan, bt as fieldOfColumn, c as ContractColumns, ct as columnTakesTemporaryValue, d as ConvertedColumn, dt as contractToSchemaIR, et as TableRenameByHand, f as DefaultResolver, ft as convertedColumnMeta, g as FieldStorageEffect, gt as detectDestructiveChanges, h as FieldStatementColumns, ht as createSqlTextSources, i as ColumnOnOneSide, it as appliedStatementsInOrder, j as ReadReportedDefault, jt as plannerSuccess, k as PlannedStatements, kt as planStatements, l as ContractToSchemaIROptions, lt as contractColumns, m as FieldEventCall, mt as createMigrationPlan, n as CallSubjects, nt as TargetMigrationsCapability, o as ColumnRenameRequest, ot as backfillOfDefaultedField, p as DefaultResolverColumn, pt as convertedColumnOf, q as StatementColumn, qt as storageNameOfOperation, r as CallWithCompanions, rt as _default, s as ContractColumn, st as checkSqlExpressionText, t as COLUMN_RENAME_UNMATCHED_CODE, tt as TableRenameRequest, u as ControlPolicySubject, ut as contractNamespaceToSchemaIR, v as MigrationOperationClass, vt as extractCodecControlHooks, w as MigrationPlannerResult, wt as modelRenameStorageEffect, x as MigrationPlanOperation, xt as fieldRenameStorageEffect, y as MigrationOperationPolicy, yt as fieldEventStorage, z as SqlControlTargetDescriptor, zt as rowsWithoutValueFailure } from "./control-YFLg-7Gn.mjs";
|
|
5
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractColumn, type ContractColumns, type ContractToSchemaIROptions, type ControlPolicySubject, type ConvertedColumn, type CreateSqlMigrationPlanOptions, type DefaultResolver, type DefaultResolverColumn, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStatementColumns, type FieldStorageEffect, INIT_ADDITIVE_POLICY, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatements, type ReadColumnDefault, type ReadReportedDefault, type ReportedBody, type ReportedLiteralDefault, type RequiredColumn, type RequiredColumnMark, type ResolveIdentityValueInput, type SchemaTables, type SingleOperationCall, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDefaultFunctionName, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlQuote, type SqlQuotingRules, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type SqlSlot, type SqlTextSources, type StatementColumn, type StatementPlanningTarget, type StorageTypePlanResult, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameByHand, type TableRenameRequest, type TargetMigrationsCapability, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as checkSqlDefaultText } from "./validators-Cfy0jmZ2.mjs";
|
|
2
2
|
import { s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-DfFAS0EC.mjs";
|
|
3
|
-
import {
|
|
4
|
-
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls,
|
|
3
|
+
import { A as plannerFailure, B as rowsWithoutValueSummary, C as isUnfilledSlot, D as planFieldEventCalls, E as partitionIssuesByControlPolicy, F as requiredColumnOf, G as sqlOfSlot, H as runnerSuccess, I as requiredColumnsOfMigration, J as subjectsOfCalls, K as sqlTypeLookupsOf, L as resolveColumnRenameAgainst, M as readColumnDefault, N as readReportedDefault, O as planFieldEventOperations, P as requiredColumnMeta, Q as unmatchedTableRename, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlDefaultFunctions, X as unknownCallNames, Y as unconvertedFieldOf, Z as unmatchedColumnRename, _ as detectDestructiveChanges, a as assembleAuthoringContributions, b as fieldOfColumn, c as columnTakesTemporaryValue, d as contractToSchemaIR, f as control_default, g as createSqlTextSources, h as createMigrationPlan, i as appliedStatementsInOrder, j as plannerSuccess, k as planStatements, l as contractColumns, m as convertedColumnOf, n as INIT_ADDITIVE_POLICY, o as backfillOfDefaultedField, p as convertedColumnMeta, q as storageNameOfOperation, r as TABLE_NAME_CASE_CHANGED_CODE, s as checkSqlExpressionText, t as COLUMN_RENAME_UNMATCHED_CODE, u as contractNamespaceToSchemaIR, v as detectTableNameCaseChanges, w as modelRenameStorageEffect, x as fieldRenameStorageEffect, y as fieldEventStorage, z as rowsWithoutValueFailure } from "./control-CF-KJYTH.mjs";
|
|
4
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as sqlFamilyPack, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-
|
|
2
|
-
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions };
|
|
1
|
+
import { a as temporalCodecPresetWithPrecision, i as sqlTargetTypeConstructors, n as sqlFamilyPack, o as temporalStringAuthoringPresets, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-AyeYizq-.mjs";
|
|
2
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const sqlFamilyPack = {
|
|
5
|
-
kind: "family",
|
|
6
|
-
id: "sql",
|
|
7
|
-
familyId: "sql",
|
|
8
|
-
version: "0.0.1",
|
|
9
|
-
authoring: {
|
|
10
|
-
field: sqlFamilyAuthoringFieldPresets,
|
|
11
|
-
type: sqlFamilyAuthoringTypes,
|
|
12
|
-
entityTypes: sqlFamilyEntityTypes,
|
|
13
|
-
pslBlockDescriptors: sqlFamilyPslBlockDescriptors,
|
|
14
|
-
attributeSpecs: sqlAttributeSpecs
|
|
15
|
-
},
|
|
16
|
-
generatorFunctions: sqlFamilyGeneratorFunctions,
|
|
17
|
-
controlMutationDefaults: {
|
|
18
|
-
defaultFunctionRegistry: /* @__PURE__ */ new Map(),
|
|
19
|
-
generatorDescriptors: sqlFamilyGeneratorDescriptors
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=family__pack.mjs.map
|
|
1
|
+
import { c as sqlIntegerArgumentGeneratorFunctions, l as sqlTargetTypeConstructors, t as idGeneratorFunctionBindings } from "./generator-functions-DuDZSQHE-BbKhsXck.mjs";
|
|
2
|
+
import { n as temporalCodecPresetWithPrecision, r as temporalStringAuthoringPresets, t as sqlFamilyPack } from "./pack-NM8AYiUp.mjs";
|
|
3
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as
|
|
3
|
-
export { type ColumnTypeOf, type DefaultMappingOptions, type DefaultMappingResult, type GeneratorCallRefusal, type GeneratorCallsResult, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type PhaseCallText, type PslTypeCall, fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault,
|
|
1
|
+
import { a as writeDefaultLiteral, i as writeDataTypeValue, n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CAOONlKQ-v7GTIkjE.mjs";
|
|
2
|
+
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as writtenTypeArguments, n as GeneratorCallRefusal, o as IntrospectedTable, p as toEnumMemberName, r as GeneratorCallsResult, s as PhaseCallText, t as ColumnTypeOf, u as generatorCallsFor } from "./psl-build-C4ia2uM6.mjs";
|
|
3
|
+
export { type ColumnTypeOf, type DefaultMappingOptions, type DefaultMappingResult, type GeneratorCallRefusal, type GeneratorCallsResult, type InferredTypeConstructor, type InferredTypeConstructors, type IntrospectedTable, type PhaseCallText, type PslTypeCall, fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault, toEnumMemberName, writeDataTypeValue, writeDefaultLiteral, writtenTypeArguments };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
2
|
-
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as
|
|
3
|
-
export { fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault,
|
|
2
|
+
import { a as mapDefault, c as writtenTypeArguments, i as inferredTypeConstructors, n as generatorCallsFor, o as writeDataTypeValue, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-D5VG40ej.mjs";
|
|
3
|
+
export { fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault, toEnumMemberName, writeDataTypeValue, writeDefaultLiteral, writtenTypeArguments };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-
|
|
1
|
+
import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-B_n-rSCj.mjs";
|
|
2
2
|
export { type EnumInfo, type InferredRelations, type PslPrinterOptions, type RelationField, buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, pluralize, toEnumName, toFieldName, toModelName };
|
package/dist/{generator-functions-DErXcNG5-nKYm5qLY.mjs → generator-functions-DuDZSQHE-BbKhsXck.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as enumType } from "./contract-builder-
|
|
1
|
+
import { c as enumType } from "./contract-builder-DT689tII.mjs";
|
|
2
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
3
|
import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
4
4
|
import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
|
|
@@ -8,7 +8,7 @@ import { singleGeneratorBinding } from "@prisma/orm-framework/components/compone
|
|
|
8
8
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
9
9
|
import { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from "@prisma/orm-framework/psl-parser";
|
|
10
10
|
import { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from "@prisma/orm-framework/ids";
|
|
11
|
-
//#region ../../../2-sql/9-family/dist/generator-functions-
|
|
11
|
+
//#region ../../../2-sql/9-family/dist/generator-functions-DuDZSQHE.mjs
|
|
12
12
|
function sqlFamilyEnumSpec() {
|
|
13
13
|
return mapBlock({
|
|
14
14
|
value: {
|
|
@@ -250,29 +250,33 @@ const sqlFamilyAuthoringFieldPresets = {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
const sqlFamilyAuthoringTypes = {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
253
|
+
const sqlFamilyAuthoringTypes = { Raw: {
|
|
254
|
+
kind: "typeConstructor",
|
|
255
|
+
documentation: "A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(sql`tsvector`). Its values are typed unknown, and its default is a sql expression.",
|
|
256
|
+
args: [{
|
|
257
|
+
kind: "value",
|
|
258
|
+
dataType: "sql/expression",
|
|
259
|
+
name: "sql"
|
|
260
|
+
}],
|
|
261
|
+
output: {
|
|
262
|
+
codecId: "sql/raw@1",
|
|
263
|
+
typeParams: { sql: {
|
|
264
|
+
kind: "arg",
|
|
265
|
+
index: 0
|
|
266
|
+
} }
|
|
267
|
+
}
|
|
268
|
+
} };
|
|
269
|
+
/**
|
|
270
|
+
* The type constructors every SQL target contributes itself, because their arguments are sizes, such as a length, and only the target names the data type a size is a value of: `sizeType`, such as `pg/int4`.
|
|
271
|
+
*/
|
|
272
|
+
function sqlTargetTypeConstructors(input) {
|
|
273
|
+
return { sql: { String: {
|
|
270
274
|
kind: "typeConstructor",
|
|
271
275
|
documentation: "Variable-length text with a required maximum character length.",
|
|
272
276
|
args: [{
|
|
273
|
-
kind: "
|
|
274
|
-
|
|
275
|
-
|
|
277
|
+
kind: "value",
|
|
278
|
+
dataType: input.sizeType,
|
|
279
|
+
name: "length"
|
|
276
280
|
}],
|
|
277
281
|
output: {
|
|
278
282
|
codecId: "sql/varchar@1",
|
|
@@ -281,8 +285,8 @@ const sqlFamilyAuthoringTypes = {
|
|
|
281
285
|
index: 0
|
|
282
286
|
} }
|
|
283
287
|
}
|
|
284
|
-
} }
|
|
285
|
-
}
|
|
288
|
+
} } };
|
|
289
|
+
}
|
|
286
290
|
const NANOID_DEFAULT_SIZE = 21;
|
|
287
291
|
const nowSignature = { documentation: "Writes the current time, as the column's codec represents it." };
|
|
288
292
|
const ulidSignature = { documentation: "Generates a ULID when a value is not supplied." };
|
|
@@ -535,6 +539,6 @@ function checkedInteger(integer, dataTypes, allowed, refusal) {
|
|
|
535
539
|
});
|
|
536
540
|
}
|
|
537
541
|
//#endregion
|
|
538
|
-
export { sqlFamilyGeneratorDescriptors as a, sqlIntegerArgumentGeneratorFunctions as c, sqlFamilyEntityTypes as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
|
|
542
|
+
export { sqlFamilyGeneratorDescriptors as a, sqlIntegerArgumentGeneratorFunctions as c, sqlFamilyEntityTypes as i, sqlTargetTypeConstructors as l, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
|
|
539
543
|
|
|
540
|
-
//# sourceMappingURL=generator-functions-
|
|
544
|
+
//# sourceMappingURL=generator-functions-DuDZSQHE-BbKhsXck.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-functions-DuDZSQHE-BbKhsXck.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/generator-functions-DuDZSQHE.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from \"@internal/ids\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\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\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: enumMemberValue(),\n\t\t\tdocumentation: \"The member's value, written as a value of the enum's data type; 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: NANOID_SIZE.min,\n\t\tmaximum: NANOID_SIZE.max\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 = { Raw: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"A column of a type no other column type covers, written exactly as the database catalog prints it, such as Raw(sql`tsvector`). Its values are typed unknown, and its default is a sql expression.\",\n\targs: [{\n\t\tkind: \"value\",\n\t\tdataType: \"sql/expression\",\n\t\tname: \"sql\"\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/raw@1\",\n\t\ttypeParams: { sql: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} };\n/**\n* The type constructors every SQL target contributes itself, because their arguments are sizes, such as a length, and only the target names the data type a size is a value of: `sizeType`, such as `pg/int4`.\n*/\nfunction sqlTargetTypeConstructors(input) {\n\treturn { sql: { String: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\t\targs: [{\n\t\t\tkind: \"value\",\n\t\t\tdataType: input.sizeType,\n\t\t\tname: \"length\"\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 nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\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 === UUID_VERSIONS.v4) return generated(\"uuidv4\");\n\t\t\tif (version === UUID_VERSIONS.v7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${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: UUID_VERSIONS.v7 },\n\t\t\t\ttext: String(UUID_VERSIONS.v7)\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 === CUID_VERSION ? generated(\"cuid2\") : refused(`cuid: version must be ${CUID_VERSION}, got ${String(version)}`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: CUID_VERSION },\n\t\t\ttext: String(CUID_VERSION)\n\t\t} : void 0\n\t};\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_SIZE.min && size <= NANOID_SIZE.max;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. 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 }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${String(explicit)}`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size: explicit });\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/**\n* `binding`, refusing a column whose length, in its data type's normal form, is shorter than the identifier the generator writes. The database would refuse every insert of a longer value.\n*/\nfunction fittingColumn(name, binding) {\n\treturn {\n\t\t...binding,\n\t\tresolve: (input) => {\n\t\t\tconst resolution = binding.resolve(input);\n\t\t\tconst length = input.field.length;\n\t\t\tif (!resolution.ok || length === void 0) return resolution;\n\t\t\tconst { generator } = resolution;\n\t\t\tconst written = generatedLength(blindCast(generator.id), generator.params);\n\t\t\tif (written <= length) return resolution;\n\t\t\treturn refused(`${`${name}(${binding.printArguments(generator, input.field)?.text ?? \"\"})`} writes ${written} characters, which does not fit a column of ${length} ${length === 1 ? \"character\" : \"characters\"}.`);\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. Each refuses a column too short for what it writes. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [fittingColumn(\"uuid\", uuidBinding([...text, ...codecs.uuid ?? []]))]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [fittingColumn(\"cuid\", cuidBinding(text))]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [fittingColumn(\"ulid\", 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: [fittingColumn(\"ksuid\", 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: [fittingColumn(\"nanoid\", 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\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\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\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/**\n* The generator functions whose arguments are integers, declared with their signatures: `uuid(version?)`, `cuid(version)` and `nanoid(size?)`. Each argument is a value of `integer`, the target's integer data type, read and cast like a default, then checked by its function. A target declares them, because only it knows its integer type; the family and the target bind them.\n*/\nfunction sqlIntegerArgumentGeneratorFunctions({ integer }) {\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tsignature: (dataTypes) => uuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tsignature: (dataTypes) => cuidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tsignature: (dataTypes) => nanoidSignature(integer, dataTypes),\n\t\t\tbindings: []\n\t\t}\n\t];\n}\nfunction uuidSignature(integer, dataTypes) {\n\tconst versions = [UUID_VERSIONS.v4, UUID_VERSIONS.v7];\n\treturn {\n\t\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, listed(versions), (version, written) => versions.some((allowed) => allowed === version) ? void 0 : `uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${written}`)),\n\t\t\tdocumentation: `The UUID version: \\`${UUID_VERSIONS.v4}\\` or \\`${UUID_VERSIONS.v7}\\`. Defaults to \\`${UUID_VERSIONS.v4}\\`.`\n\t\t}]\n\t};\n}\nfunction cuidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"version\",\n\t\t\ttype: checkedInteger(integer, dataTypes, listed([CUID_VERSION]), (version, written) => version === CUID_VERSION ? void 0 : `cuid: version must be ${CUID_VERSION}, got ${written}`),\n\t\t\tdocumentation: `The CUID version. Only \\`${CUID_VERSION}\\` is supported.`\n\t\t}]\n\t};\n}\nfunction nanoidSignature(integer, dataTypes) {\n\treturn {\n\t\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\t\tpositional: [{\n\t\t\tkey: \"size\",\n\t\t\ttype: optional(checkedInteger(integer, dataTypes, {\n\t\t\t\tlabel: `integer from ${NANOID_SIZE.min} to ${NANOID_SIZE.max}`,\n\t\t\t\tsuggestions: []\n\t\t\t}, (size, written) => isNanoidSize(size) ? void 0 : `nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${written}`)),\n\t\t\tdocumentation: `The identifier length, from \\`${NANOID_SIZE.min}\\` through \\`${NANOID_SIZE.max}\\`. Defaults to ${NANOID_DEFAULT_SIZE}.`\n\t\t}]\n\t};\n}\n/** The label and completion suggestions of an argument that takes one of `values`. */\nfunction listed(values) {\n\tconst suggestions = values.map(String);\n\treturn {\n\t\tlabel: suggestions.join(\" | \"),\n\t\tsuggestions\n\t};\n}\n/**\n* One value of the integer data type, as a number, refused at the argument with the function's message when `refusal` returns one.\n*/\nfunction checkedInteger(integer, dataTypes, allowed, refusal) {\n\treturn refineArg(dataTypeValue(integer, dataTypes, allowed), ({ value }, arg, ctx) => {\n\t\tconst stored = value.value;\n\t\tif (typeof stored !== \"number\" && typeof stored !== \"string\") throw new InternalError(`Data type \"${integer}\" stores an integer as ${typeof stored}, not a number or digit text.`);\n\t\tconst message = refusal(Number(stored), String(stored));\n\t\treturn message === void 0 ? ok(blindCast(Number(stored))) : notOk([leafDiagnostic(ctx, arg, message, \"PSL_INVALID_GENERATOR_ARGUMENT\")]);\n\t});\n}\n//#endregion\nexport { sqlFamilyAuthoringTypes as a, sqlFamilyEntityTypes as c, sqlIntegerArgumentGeneratorFunctions as i, sqlFamilyPslBlockDescriptors as l, sqlFamilyGeneratorDescriptors as n, sqlTargetTypeConstructors as o, sqlFamilyGeneratorFunctions as r, sqlFamilyAuthoringFieldPresets as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-DuDZSQHE.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,oBAAoB;CAC5B,OAAO,SAAS;EACf,OAAO;GACN,MAAM,gBAAgB;GACtB,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;GAC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QAAQ,OAAO,MAAM,GAAG,OAAO,MAAM,CAAC;EACtD,OAAO,YAAY,KAAK,IAAI,GAAG,UAAU,OAAO,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,eAAe,KAAK,KAAK,SAAS,gCAAgC,CAAC,CAAC;CACxI,CAAC;AACF"}
|
|
@@ -4,9 +4,9 @@ import "./foreign-key-materialization-BPQqd0qF.mjs";
|
|
|
4
4
|
import { p as sqlTextFromStored } from "./sql-expression-BJCuy-WI.mjs";
|
|
5
5
|
import { d as resolvedTypeParams, t as CODEC_INSTANCE_KIND } from "./types-M_FeBD9w.mjs";
|
|
6
6
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
7
|
-
import { n as buildSqlContractFromDefinition } from "./derived-checks-
|
|
7
|
+
import { n as buildSqlContractFromDefinition } from "./derived-checks-CXW9ytkb-B_zxX1-8.mjs";
|
|
8
8
|
import { i as mapFieldNamesToColumns, n as getAttribute, o as storageName, r as getNamedArgument, t as formatDbAttributeMigrationMessage } from "./psl-attribute-parsing-BCsFWsSp-LaNsbcrw.mjs";
|
|
9
|
-
import { b as sqlAttributeSpecs, c as getAuthoringEntity, d as interpretFieldAttribute, f as interpretModelAttribute, g as modelSpecContext, h as modelCoordinateKey, i as contractError, m as modelAttributeSpecsFrom, n as bareTypeConstructorOf, p as lowerDataTypeDefault, r as collectResolvedFields, s as fieldSpecContext, t as PSL_CHECK_ON_STI_VARIANT, u as instantiatePslTypeConstructor, v as readWrittenValueForCodec, x as toNamedTypeFieldDescriptor, y as resolveFieldTypeDescriptor } from "./psl-field-resolution-
|
|
9
|
+
import { b as sqlAttributeSpecs, c as getAuthoringEntity, d as interpretFieldAttribute, f as interpretModelAttribute, g as modelSpecContext, h as modelCoordinateKey, i as contractError, m as modelAttributeSpecsFrom, n as bareTypeConstructorOf, p as lowerDataTypeDefault, r as collectResolvedFields, s as fieldSpecContext, t as PSL_CHECK_ON_STI_VARIANT, u as instantiatePslTypeConstructor, v as readWrittenValueForCodec, x as toNamedTypeFieldDescriptor, y as resolveFieldTypeDescriptor } from "./psl-field-resolution-DpGsATq3-BREG9FbU.mjs";
|
|
10
10
|
import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
|
|
11
11
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
12
12
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -21,7 +21,7 @@ import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions
|
|
|
21
21
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
22
22
|
import { createPslDiagnosticCollector, diagnosticSource, findBlockDescriptor, interpretExtensionBlocks, nodePslSpan, typeReferenceNode } from "@prisma/orm-framework/psl-parser";
|
|
23
23
|
import { claimedBlockKeywords, enumMemberAttributeDiagnostics, fkRelationPairKey, requiredOneToOneBackrelationDiagnostic, unsupportedBlockDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
|
|
24
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-
|
|
24
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-DTwRm0sl.mjs
|
|
25
25
|
function baseColumnDescriptor(resolution, enumTypeDescriptors) {
|
|
26
26
|
if (resolution?.kind === "block") return enumTypeDescriptors.get(resolution.symbol);
|
|
27
27
|
const scalar = bareTypeConstructorOf(resolution);
|
|
@@ -90,7 +90,8 @@ function resolveNamedTypeDeclarations(input) {
|
|
|
90
90
|
codecLookup: input.codecLookup,
|
|
91
91
|
diagnostics: input.diagnostics,
|
|
92
92
|
source,
|
|
93
|
-
entityLabel: `Named type "${declaration.name}"
|
|
93
|
+
entityLabel: `Named type "${declaration.name}"`,
|
|
94
|
+
dataTypes: input.dataTypes
|
|
94
95
|
});
|
|
95
96
|
if (!storageType) continue;
|
|
96
97
|
namedTypeDescriptors.set(declaration, toNamedTypeFieldDescriptor(declaration.name, storageType));
|
|
@@ -1364,7 +1365,8 @@ function buildValueObjectNodes(input) {
|
|
|
1364
1365
|
namespaceId: input.defaultNamespaceId,
|
|
1365
1366
|
namespaceExtensionEntities: input.namespaceExtensionEntities,
|
|
1366
1367
|
binder,
|
|
1367
|
-
codecLookup: input.codecLookup
|
|
1368
|
+
codecLookup: input.codecLookup,
|
|
1369
|
+
dataTypes: input.dataTypes
|
|
1368
1370
|
});
|
|
1369
1371
|
if (!resolved.ok) continue;
|
|
1370
1372
|
const { descriptor } = resolved;
|
|
@@ -1991,6 +1993,7 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
1991
1993
|
binder,
|
|
1992
1994
|
enumTypeDescriptors: allEnumTypeDescriptors,
|
|
1993
1995
|
codecLookup: input.codecLookup,
|
|
1996
|
+
dataTypes: input.dataTypes,
|
|
1994
1997
|
diagnostics
|
|
1995
1998
|
});
|
|
1996
1999
|
const storageTypes = { ...namedTypeResult.storageTypes };
|
|
@@ -2012,6 +2015,7 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
2012
2015
|
defaultNamespaceId,
|
|
2013
2016
|
namespaceExtensionEntities,
|
|
2014
2017
|
codecLookup: input.codecLookup,
|
|
2018
|
+
dataTypes: input.dataTypes,
|
|
2015
2019
|
binder
|
|
2016
2020
|
});
|
|
2017
2021
|
const valueObjectTypes = {
|
|
@@ -2108,7 +2112,7 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
2108
2112
|
typeParams: resolvedTypeParams(field.descriptor, namedTypeResult.storageTypes)
|
|
2109
2113
|
};
|
|
2110
2114
|
};
|
|
2111
|
-
const { discriminatorDeclarations, baseDeclarations } = collectPolymorphismDeclarations(modelIdentities, input.symbolTable, input.sources, binder, specContextFor, discriminatorColumnOf, input.codecLookup, dataTypes,
|
|
2115
|
+
const { discriminatorDeclarations, baseDeclarations } = collectPolymorphismDeclarations(modelIdentities, input.symbolTable, input.sources, binder, specContextFor, discriminatorColumnOf, input.codecLookup, dataTypes, dataTypes.textDataTypes ?? [], diagnostics);
|
|
2112
2116
|
const stiVariantKeys = /* @__PURE__ */ new Set();
|
|
2113
2117
|
for (const [variantKey, declaration] of baseDeclarations) if (!(getAttribute(declaration.model.attributes, "map") !== void 0)) stiVariantKeys.add(variantKey);
|
|
2114
2118
|
for (const variantKey of stiVariantKeys) {
|
|
@@ -2221,4 +2225,4 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
2221
2225
|
//#endregion
|
|
2222
2226
|
export { normalizeReferentialAction as a, interpretPslDocumentToSqlContract as i, buildEntityTypesByDiscriminator as n, indexFkRelations as r, applyBackrelationCandidates as t };
|
|
2223
2227
|
|
|
2224
|
-
//# sourceMappingURL=interpreter-
|
|
2228
|
+
//# sourceMappingURL=interpreter-DTwRm0sl-DHX1SdeJ.mjs.map
|