@prisma/orm-family-sql 8.0.0-rc.18-dev.28 → 8.0.0-rc.18-dev.30
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-D9QcPJpj.d.mts → attribute-specs-BzBk62Jx.d.mts} +10 -4
- package/dist/{attribute-specs-D9QcPJpj.d.mts.map → attribute-specs-BzBk62Jx.d.mts.map} +1 -1
- package/dist/{authoring-entity-types-CZ-vdwYS-CSU65LVs.d.mts → authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts} +2 -2
- package/dist/{authoring-entity-types-CZ-vdwYS-CSU65LVs.d.mts.map → authoring-entity-types-CZ-vdwYS-DzxLL9BC.d.mts.map} +1 -1
- package/dist/{config-types-BJxHMPGt.mjs → config-types-vu5fTaRa.mjs} +2 -2
- package/dist/{config-types-BJxHMPGt.mjs.map → config-types-vu5fTaRa.mjs.map} +1 -1
- package/dist/{contract-builder-CrWbrtE4.mjs → contract-builder-DmX4XnJa.mjs} +95 -10
- package/dist/contract-builder-DmX4XnJa.mjs.map +1 -0
- package/dist/{contract-builder-D-RSOsnc.d.mts → contract-builder-GH-eCIpl.d.mts} +18 -2
- package/dist/contract-builder-GH-eCIpl.d.mts.map +1 -0
- package/dist/contract-prisma7__provider.d.mts +1 -3
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +38 -9
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +5 -3
- 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__provider.mjs +3 -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-D9zFmpo0.d.mts → control-B8tb6SEt.d.mts} +73 -21
- package/dist/control-B8tb6SEt.d.mts.map +1 -0
- package/dist/{control-D7jPD-Tk.mjs → control-DNE-Chse.mjs} +15 -28
- package/dist/control-DNE-Chse.mjs.map +1 -0
- package/dist/{control-adapter-BCopdpsT-BPHa2Frw.d.mts → control-adapter-Bn0uhplA-rhq_JtYp.d.mts} +2 -2
- package/dist/{control-adapter-BCopdpsT-BPHa2Frw.d.mts.map → control-adapter-Bn0uhplA-rhq_JtYp.d.mts.map} +1 -1
- package/dist/{control-adapter-ChJhp5vV.d.mts → control-adapter-RwLtGiwa.d.mts} +2 -2
- package/dist/{control-adapter-ChJhp5vV.d.mts.map → control-adapter-RwLtGiwa.d.mts.map} +1 -1
- package/dist/{derived-checks-sRZp_gTF-ermwhVGQ.mjs → derived-checks-CdPHpJSv-B7Bgj3Ao.mjs} +2 -2
- package/dist/{derived-checks-sRZp_gTF-ermwhVGQ.mjs.map → derived-checks-CdPHpJSv-B7Bgj3Ao.mjs.map} +1 -1
- package/dist/{diff-ClZvIVOl.d.mts → diff-B9Z47nHf.d.mts} +2 -2
- package/dist/{diff-ClZvIVOl.d.mts.map → diff-B9Z47nHf.d.mts.map} +1 -1
- package/dist/family.d.mts +9 -9
- package/dist/family.mjs +4 -3
- 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__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +2 -2
- package/dist/family__pack.mjs +8 -3
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-D4LlP1q2.mjs → generator-functions-B4gRRYZB-BTtC2KQz.mjs} +205 -5
- package/dist/generator-functions-B4gRRYZB-BTtC2KQz.mjs.map +1 -0
- package/dist/{interpreter-kQuqdyeP-B-rzJDWE.mjs → interpreter-Bk0xpelv-BifV9Yib.mjs} +9 -9
- package/dist/interpreter-Bk0xpelv-BifV9Yib.mjs.map +1 -0
- package/dist/{migration-RrhpTP1o.d.mts → migration-CSv3UpiC.d.mts} +2 -2
- package/dist/{migration-RrhpTP1o.d.mts.map → migration-CSv3UpiC.d.mts.map} +1 -1
- package/dist/{pack-DNdZwm5w.d.mts → pack-COEyiyfL.d.mts} +74 -4
- package/dist/pack-COEyiyfL.d.mts.map +1 -0
- package/dist/{psl-build-BT8Ue6gd.mjs → psl-build-BkxAXTwj.mjs} +44 -135
- package/dist/psl-build-BkxAXTwj.mjs.map +1 -0
- package/dist/psl-build-O7_tXQ1E.d.mts +108 -0
- package/dist/psl-build-O7_tXQ1E.d.mts.map +1 -0
- package/dist/{psl-column-resolution-BCkhNzOK-DyfXnB-9.d.mts → psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts} +3 -3
- package/dist/psl-column-resolution-DNdqpUxt-C8BST0uW.d.mts.map +1 -0
- package/dist/{psl-field-resolution-C1E-_fQq-VUYD8cnS.mjs → psl-field-resolution-BET6wtHZ-CX2xL99Q.mjs} +110 -46
- package/dist/psl-field-resolution-BET6wtHZ-CX2xL99Q.mjs.map +1 -0
- package/dist/{types-DKU4GeqD-CUClXCme.d.mts → types-DlFdMaDJ-DekbNgDh.d.mts} +3 -3
- package/dist/{types-DKU4GeqD-CUClXCme.d.mts.map → types-DlFdMaDJ-DekbNgDh.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/authoring-type-constructors-0Iv2zdwS-D4LlP1q2.mjs.map +0 -1
- package/dist/contract-builder-CrWbrtE4.mjs.map +0 -1
- package/dist/contract-builder-D-RSOsnc.d.mts.map +0 -1
- package/dist/control-D7jPD-Tk.mjs.map +0 -1
- package/dist/control-D9zFmpo0.d.mts.map +0 -1
- package/dist/interpreter-kQuqdyeP-B-rzJDWE.mjs.map +0 -1
- package/dist/pack-DNdZwm5w.d.mts.map +0 -1
- package/dist/psl-build-BT8Ue6gd.mjs.map +0 -1
- package/dist/psl-build-DU55bjfu.d.mts +0 -157
- package/dist/psl-build-DU55bjfu.d.mts.map +0 -1
- package/dist/psl-column-resolution-BCkhNzOK-DyfXnB-9.d.mts.map +0 -1
- package/dist/psl-field-resolution-C1E-_fQq-VUYD8cnS.mjs.map +0 -1
package/dist/family.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-8N2xelSh.mjs";
|
|
2
2
|
import { h as checkSqlDefaultText } from "./validators-CTZ-hU2l.mjs";
|
|
3
|
-
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-
|
|
4
|
-
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-
|
|
3
|
+
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-Bn0uhplA-rhq_JtYp.mjs";
|
|
4
|
+
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-DlFdMaDJ-DekbNgDh.mjs";
|
|
5
5
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-CIQ17HTk.mjs";
|
|
6
|
-
import { $ as TableRenameByHand,
|
|
7
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
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-
|
|
6
|
+
import { $ as TableRenameByHand, A as ReadColumnDefault, At as plannerSuccess, B as SqlDescribedContractSpace, Bt as runnerFailure, C as MigrationPlannerConflict, Ct as modelRenameStorageEffect, D as NoTable, Dt as planFieldEventOperations, E as ModelTable, Et as planFieldEventCalls, F as RequiredColumnMark, Ft as requiredColumnsOfMigration, G as SqlTextSources, Gt as storageNameOfOperation, H as SqlQuote, Ht as slotSource, I as SchemaTables, It as resolveColumnRenameAgainst, J as SubjectStorage, Jt as temporalStringAuthoringPresets, K as StatementColumn, Kt as subjectsOfCalls, L as SingleOperationCall, Lt as resolveTableRenameAgainst, M as ReportedBody, Mt as readReportedDefault, N as ReportedLiteralDefault, Nt as requiredColumnMeta, O as PlanFieldEventOperationsOptions, Ot as planStatements, P as RequiredColumn, Pt as requiredColumnOf, Q as TableRename, Qt as unmatchedTableRename, R as SqlControlFamilyInstance, Rt as rowsWithoutValueFailure, S as MigrationPlanner, St as isUnfilledSlot, T as ModelStorageEffect, Tt as partitionIssuesByControlPolicy, U as SqlQuotingRules, Ut as sqlOfSlot, V as SqlPslBuildContext, Vt as runnerSuccess, W as SqlSlot, Wt as sqlTypeLookupsOf, X as TABLE_NAME_CASE_CHANGED_CODE, Xt as unknownCallNames, Y as SuppressionRecord, Yt as unconvertedFieldOf, Z as TableNameCaseGuardTable, Zt as unmatchedColumnRename, _ as INIT_ADDITIVE_POLICY, _t as extractCodecControlHooks, a as ColumnRename, at as backfillOfDefaultedField, b as MigrationPlan, bt as fieldRenameStorageEffect, c as ContractColumns, ct as contractColumns, d as ConvertedColumn, dt as convertedColumnMeta, et as TableRenameRequest, f as DefaultResolver, ft as convertedColumnOf, g as FieldStorageEffect, gt as detectTableNameCaseChanges, h as FieldStatementColumns, ht as detectDestructiveChanges, i as ColumnOnOneSide, it as assembleAuthoringContributions, j as ReadReportedDefault, jt as readColumnDefault, k as PlannedStatements, kt as plannerFailure, l as ContractToSchemaIROptions, lt as contractNamespaceToSchemaIR, m as FieldEventCall, mt as createSqlTextSources, n as CallSubjects, o as ColumnRenameRequest, ot as checkSqlExpressionText, p as DefaultResolverColumn, pt as createMigrationPlan, q as StatementPlanningTarget, qt as temporalCodecPresetWithPrecision, r as CallWithCompanions, rt as appliedStatementsInOrder, s as ContractColumn, st as columnTakesTemporaryValue, t as COLUMN_RENAME_UNMATCHED_CODE, tt as TargetMigrationsCapability, u as ControlPolicySubject, ut as contractToSchemaIR, v as MigrationOperationClass, vt as fieldEventStorage, w as MigrationPlannerResult, wt as partitionCallsByControlPolicy, x as MigrationPlanOperation, xt as fieldStatementColumns, y as MigrationOperationPolicy, yt as fieldOfColumn, z as SqlControlTargetDescriptor, zt as rowsWithoutValueSummary } from "./control-B8tb6SEt.mjs";
|
|
7
|
+
import { t as resolveIntrospectedColumnType } from "./control-adapter-RwLtGiwa.mjs";
|
|
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-B9Z47nHf.mjs";
|
|
9
9
|
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-qK4wX3D3.mjs";
|
|
10
|
-
import { t as SqlMigration } from "./migration-
|
|
11
|
-
import "./pack-
|
|
10
|
+
import { t as SqlMigration } from "./migration-CSv3UpiC.mjs";
|
|
11
|
+
import { t as idGeneratorFunctionBindings } from "./pack-COEyiyfL.mjs";
|
|
12
12
|
import { n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CEISdj2g-DF1LzGBR.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as toEnumMemberName, n as GeneratorCallRefusal, o as IntrospectedTable, p as pslTypeArgumentText, r as GeneratorCallsResult, s as PhaseCallText, t as ColumnTypeOf, u as generatorCallsFor } from "./psl-build-O7_tXQ1E.mjs";
|
|
14
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-I75woGr4.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
|
|
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 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, pslTypeArgumentText, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff };
|
package/dist/family.mjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
2
|
import { n as checkSqlDefaultText } from "./validators-BCRydDG7.mjs";
|
|
3
|
+
import { t as idGeneratorFunctionBindings } from "./generator-functions-B4gRRYZB-BTtC2KQz.mjs";
|
|
3
4
|
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue, s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-nDeE75xa.mjs";
|
|
4
5
|
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-BT6HdXAE.mjs";
|
|
5
6
|
import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-dq5M4iIh.mjs";
|
|
6
|
-
import { $ as
|
|
7
|
+
import { $ as unmatchedTableRename, A as plannerFailure, B as rowsWithoutValueSummary, C as isUnfilledSlot, D as planFieldEventCalls, E as partitionIssuesByControlPolicy, F as requiredColumnOf, G as sqlTypeLookupsOf, H as runnerSuccess, I as requiredColumnsOfMigration, J as temporalCodecPresetWithPrecision, K as storageNameOfOperation, L as resolveColumnRenameAgainst, M as readColumnDefault, N as readReportedDefault, O as planFieldEventOperations, P as requiredColumnMeta, Q as unmatchedColumnRename, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlOfSlot, X as unconvertedFieldOf, Y as temporalStringAuthoringPresets, Z as unknownCallNames, _ 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 subjectsOfCalls, 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-DNE-Chse.mjs";
|
|
7
8
|
import { t as resolveIntrospectedColumnType } from "./control-adapter-DhX77V61.mjs";
|
|
8
9
|
import { t as arraysEqual } from "./diff-DZ82XaGR.mjs";
|
|
9
10
|
import { t as SqlSchemaVerifierBase } from "./ir-I-xciGUH.mjs";
|
|
10
11
|
import { t as SqlMigration } from "./migration-Dy_4Wmiy.mjs";
|
|
11
12
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
12
|
-
import { a as
|
|
13
|
+
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as pslTypeArgumentText, r as inferColumnTypes, t as fewestArgumentsCall } from "./psl-build-BkxAXTwj.mjs";
|
|
13
14
|
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-Bz34csvN.mjs";
|
|
14
15
|
import { i as timestampNowRuntimeGenerator, n as resolveDomainModel, t as UNBOUND_DOMAIN_NAMESPACE_ID } from "./runtime-Z3nD7ix1.mjs";
|
|
15
|
-
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,
|
|
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, pslTypeArgumentText, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-
|
|
2
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
1
|
+
import { i as SqlControlAdapterDescriptor, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-Bn0uhplA-rhq_JtYp.mjs";
|
|
2
|
+
import { t as resolveIntrospectedColumnType } from "./control-adapter-RwLtGiwa.mjs";
|
|
3
3
|
export { type ExecuteRequestLowerer, type Lowerer, type SqlControlAdapter, type SqlControlAdapterDescriptor, resolveIntrospectedColumnType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as checkSqlDefaultText } from "./validators-CTZ-hU2l.mjs";
|
|
2
|
-
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-
|
|
2
|
+
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-DlFdMaDJ-DekbNgDh.mjs";
|
|
3
3
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-DmP74bB8-CIQ17HTk.mjs";
|
|
4
|
-
import { $ as TableRenameByHand,
|
|
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 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,
|
|
4
|
+
import { $ as TableRenameByHand, A as ReadColumnDefault, At as plannerSuccess, B as SqlDescribedContractSpace, Bt as runnerFailure, C as MigrationPlannerConflict, Ct as modelRenameStorageEffect, D as NoTable, Dt as planFieldEventOperations, E as ModelTable, Et as planFieldEventCalls, F as RequiredColumnMark, Ft as requiredColumnsOfMigration, G as SqlTextSources, Gt as storageNameOfOperation, H as SqlQuote, Ht as slotSource, I as SchemaTables, It as resolveColumnRenameAgainst, J as SubjectStorage, Jt as temporalStringAuthoringPresets, K as StatementColumn, Kt as subjectsOfCalls, L as SingleOperationCall, Lt as resolveTableRenameAgainst, M as ReportedBody, Mt as readReportedDefault, N as ReportedLiteralDefault, Nt as requiredColumnMeta, O as PlanFieldEventOperationsOptions, Ot as planStatements, P as RequiredColumn, Pt as requiredColumnOf, Q as TableRename, Qt as unmatchedTableRename, R as SqlControlFamilyInstance, Rt as rowsWithoutValueFailure, S as MigrationPlanner, St as isUnfilledSlot, T as ModelStorageEffect, Tt as partitionIssuesByControlPolicy, U as SqlQuotingRules, Ut as sqlOfSlot, V as SqlPslBuildContext, Vt as runnerSuccess, W as SqlSlot, Wt as sqlTypeLookupsOf, X as TABLE_NAME_CASE_CHANGED_CODE, Xt as unknownCallNames, Y as SuppressionRecord, Yt as unconvertedFieldOf, Z as TableNameCaseGuardTable, Zt as unmatchedColumnRename, _ as INIT_ADDITIVE_POLICY, _t as extractCodecControlHooks, a as ColumnRename, at as backfillOfDefaultedField, b as MigrationPlan, bt as fieldRenameStorageEffect, c as ContractColumns, ct as contractColumns, d as ConvertedColumn, dt as convertedColumnMeta, et as TableRenameRequest, f as DefaultResolver, ft as convertedColumnOf, g as FieldStorageEffect, gt as detectTableNameCaseChanges, h as FieldStatementColumns, ht as detectDestructiveChanges, i as ColumnOnOneSide, it as assembleAuthoringContributions, j as ReadReportedDefault, jt as readColumnDefault, k as PlannedStatements, kt as plannerFailure, l as ContractToSchemaIROptions, lt as contractNamespaceToSchemaIR, m as FieldEventCall, mt as createSqlTextSources, n as CallSubjects, nt as _default, o as ColumnRenameRequest, ot as checkSqlExpressionText, p as DefaultResolverColumn, pt as createMigrationPlan, q as StatementPlanningTarget, qt as temporalCodecPresetWithPrecision, r as CallWithCompanions, rt as appliedStatementsInOrder, s as ContractColumn, st as columnTakesTemporaryValue, t as COLUMN_RENAME_UNMATCHED_CODE, tt as TargetMigrationsCapability, u as ControlPolicySubject, ut as contractToSchemaIR, v as MigrationOperationClass, vt as fieldEventStorage, w as MigrationPlannerResult, wt as partitionCallsByControlPolicy, x as MigrationPlanOperation, xt as fieldStatementColumns, y as MigrationOperationPolicy, yt as fieldOfColumn, z as SqlControlTargetDescriptor, zt as rowsWithoutValueSummary } from "./control-B8tb6SEt.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 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, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as checkSqlDefaultText } from "./validators-BCRydDG7.mjs";
|
|
2
2
|
import { s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-nDeE75xa.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR,
|
|
3
|
+
import { $ as unmatchedTableRename, A as plannerFailure, B as rowsWithoutValueSummary, C as isUnfilledSlot, D as planFieldEventCalls, E as partitionIssuesByControlPolicy, F as requiredColumnOf, G as sqlTypeLookupsOf, H as runnerSuccess, I as requiredColumnsOfMigration, J as temporalCodecPresetWithPrecision, K as storageNameOfOperation, L as resolveColumnRenameAgainst, M as readColumnDefault, N as readReportedDefault, O as planFieldEventOperations, P as requiredColumnMeta, Q as unmatchedColumnRename, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlOfSlot, X as unconvertedFieldOf, Y as temporalStringAuthoringPresets, Z as unknownCallNames, _ 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 subjectsOfCalls, 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-DNE-Chse.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, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__diff.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-B9Z47nHf.mjs";
|
|
2
2
|
export { type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-CSv3UpiC.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
package/dist/family__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { sqlFamilyPack as default };
|
|
1
|
+
import { n as sqlFamilyPack, t as idGeneratorFunctionBindings } from "./pack-COEyiyfL.mjs";
|
|
2
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as sqlAttributeSpecs } from "./psl-field-resolution-
|
|
2
|
-
import { i as
|
|
1
|
+
import { v as sqlAttributeSpecs } from "./psl-field-resolution-BET6wtHZ-CX2xL99Q.mjs";
|
|
2
|
+
import { a as sqlFamilyGeneratorDescriptors, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors, t as idGeneratorFunctionBindings } from "./generator-functions-B4gRRYZB-BTtC2KQz.mjs";
|
|
3
3
|
//#region ../../../2-sql/9-family/dist/pack.mjs
|
|
4
4
|
const sqlFamilyPack = {
|
|
5
5
|
kind: "family",
|
|
@@ -12,9 +12,14 @@ const sqlFamilyPack = {
|
|
|
12
12
|
entityTypes: sqlFamilyEntityTypes,
|
|
13
13
|
pslBlockDescriptors: sqlFamilyPslBlockDescriptors,
|
|
14
14
|
attributeSpecs: sqlAttributeSpecs
|
|
15
|
+
},
|
|
16
|
+
generatorFunctions: sqlFamilyGeneratorFunctions,
|
|
17
|
+
controlMutationDefaults: {
|
|
18
|
+
defaultFunctionRegistry: /* @__PURE__ */ new Map(),
|
|
19
|
+
generatorDescriptors: sqlFamilyGeneratorDescriptors
|
|
15
20
|
}
|
|
16
21
|
};
|
|
17
22
|
//#endregion
|
|
18
|
-
export { sqlFamilyPack as default };
|
|
23
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings };
|
|
19
24
|
|
|
20
25
|
//# sourceMappingURL=family__pack.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family__pack.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/pack.mjs"],"sourcesContent":["import { i as
|
|
1
|
+
{"version":3,"file":"family__pack.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/pack.mjs"],"sourcesContent":["import { a as sqlFamilyAuthoringFieldPresets, i as sqlFamilyAuthoringTypes, n as sqlFamilyGeneratorDescriptors, o as sqlFamilyEntityTypes, r as sqlFamilyGeneratorFunctions, s as sqlFamilyPslBlockDescriptors, t as idGeneratorFunctionBindings } from \"./generator-functions-B4gRRYZB.mjs\";\nimport { sqlAttributeSpecs } from \"@internal/sql-contract-psl/attribute-specs\";\n//#region src/exports/pack.ts\nconst sqlFamilyPack = {\n\tkind: \"family\",\n\tid: \"sql\",\n\tfamilyId: \"sql\",\n\tversion: \"0.0.1\",\n\tauthoring: {\n\t\tfield: sqlFamilyAuthoringFieldPresets,\n\t\ttype: sqlFamilyAuthoringTypes,\n\t\tentityTypes: sqlFamilyEntityTypes,\n\t\tpslBlockDescriptors: sqlFamilyPslBlockDescriptors,\n\t\tattributeSpecs: sqlAttributeSpecs\n\t},\n\tgeneratorFunctions: sqlFamilyGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: sqlFamilyGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { sqlFamilyPack as default, idGeneratorFunctionBindings };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;;AAGA,MAAM,gBAAgB;CACrB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,WAAW;EACV,OAAO;EACP,MAAM;EACN,aAAa;EACb,qBAAqB;EACrB,gBAAgB;CACjB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CEISdj2g-DF1LzGBR.mjs";
|
|
2
|
-
import {
|
|
3
|
-
export { type ColumnTypeOf, type DefaultMappingOptions, type DefaultMappingResult, type
|
|
2
|
+
import { a as InferredTypeConstructors, c as PslTypeCall, d as inferColumnTypes, f as inferredTypeConstructors, i as InferredTypeConstructor, l as fewestArgumentsCall, m as toEnumMemberName, n as GeneratorCallRefusal, o as IntrospectedTable, p as pslTypeArgumentText, r as GeneratorCallsResult, s as PhaseCallText, t as ColumnTypeOf, u as generatorCallsFor } from "./psl-build-O7_tXQ1E.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, pslTypeArgumentText, toEnumMemberName };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export {
|
|
2
|
+
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as pslTypeArgumentText, r as inferColumnTypes, t as fewestArgumentsCall } from "./psl-build-BkxAXTwj.mjs";
|
|
3
|
+
export { fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault, pslTypeArgumentText, toEnumMemberName };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { c as enumType } from "./contract-builder-
|
|
1
|
+
import { c as enumType } from "./contract-builder-DmX4XnJa.mjs";
|
|
2
|
+
import { c as SQL_VARCHAR_CODEC_ID, i as SQL_CHAR_CODEC_ID, s as SQL_TEXT_CODEC_ID } from "./ast-CBO3PEJF.mjs";
|
|
2
3
|
import { readEnumBlockMembers, resolveEnumCodecId } from "@prisma/orm-framework/components/authoring";
|
|
3
4
|
import { enumRefusalOf, requiredParamKeys } from "@prisma/orm-framework/components/codec";
|
|
4
|
-
import {
|
|
5
|
-
|
|
5
|
+
import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
|
|
6
|
+
import { blockAttribute, int, jsonValue, mapBlock, num, oneOf, optional, str } from "@prisma/orm-framework/psl-parser";
|
|
7
|
+
//#region ../../../2-sql/9-family/dist/generator-functions-B4gRRYZB.mjs
|
|
6
8
|
function sqlFamilyEnumSpec() {
|
|
7
9
|
return mapBlock({
|
|
8
10
|
value: {
|
|
@@ -260,7 +262,205 @@ const sqlFamilyAuthoringTypes = { sql: { String: {
|
|
|
260
262
|
} }
|
|
261
263
|
}
|
|
262
264
|
} } };
|
|
265
|
+
const NANOID_DEFAULT_SIZE = 21;
|
|
266
|
+
const NANOID_MIN_SIZE = 2;
|
|
267
|
+
const NANOID_MAX_SIZE = 255;
|
|
268
|
+
const nowSignature = { documentation: "Writes the current time, as the column's codec represents it." };
|
|
269
|
+
const uuidSignature = {
|
|
270
|
+
documentation: "Generates a UUID when a value is not supplied.",
|
|
271
|
+
positional: [{
|
|
272
|
+
key: "version",
|
|
273
|
+
type: optional(oneOf(num(4), num(7))),
|
|
274
|
+
documentation: "The UUID version: `4` or `7`. Defaults to `4`."
|
|
275
|
+
}]
|
|
276
|
+
};
|
|
277
|
+
const cuidSignature = {
|
|
278
|
+
documentation: "Generates a CUID2 identifier when a value is not supplied.",
|
|
279
|
+
positional: [{
|
|
280
|
+
key: "version",
|
|
281
|
+
type: num(2),
|
|
282
|
+
documentation: "The CUID version. Only `2` is supported."
|
|
283
|
+
}]
|
|
284
|
+
};
|
|
285
|
+
const ulidSignature = { documentation: "Generates a ULID when a value is not supplied." };
|
|
286
|
+
const nanoidSignature = {
|
|
287
|
+
documentation: "Generates a Nano ID when a value is not supplied.",
|
|
288
|
+
positional: [{
|
|
289
|
+
key: "size",
|
|
290
|
+
type: optional(int({
|
|
291
|
+
min: NANOID_MIN_SIZE,
|
|
292
|
+
max: NANOID_MAX_SIZE
|
|
293
|
+
})),
|
|
294
|
+
documentation: "The identifier length, from `2` through `255`. Defaults to 21."
|
|
295
|
+
}]
|
|
296
|
+
};
|
|
297
|
+
const ksuidSignature = { documentation: "Generates a KSUID when a value is not supplied." };
|
|
298
|
+
function refused(message) {
|
|
299
|
+
return {
|
|
300
|
+
ok: false,
|
|
301
|
+
message
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function generated(id, params) {
|
|
305
|
+
return {
|
|
306
|
+
ok: true,
|
|
307
|
+
generator: params === void 0 ? {
|
|
308
|
+
kind: "generator",
|
|
309
|
+
id
|
|
310
|
+
} : {
|
|
311
|
+
kind: "generator",
|
|
312
|
+
id,
|
|
313
|
+
params
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function uuidBinding(codecIds) {
|
|
318
|
+
return {
|
|
319
|
+
codecIds,
|
|
320
|
+
generatorIds: ["uuidv4", "uuidv7"],
|
|
321
|
+
resolve: ({ args }) => {
|
|
322
|
+
const version = args["version"];
|
|
323
|
+
if (version === void 0 || version === 4) return generated("uuidv4");
|
|
324
|
+
if (version === 7) return generated("uuidv7");
|
|
325
|
+
return refused(`uuid takes version 4 or 7, not ${String(version)}.`);
|
|
326
|
+
},
|
|
327
|
+
printArguments: (generator) => {
|
|
328
|
+
if (generator.id === "uuidv4") return {
|
|
329
|
+
args: {},
|
|
330
|
+
text: ""
|
|
331
|
+
};
|
|
332
|
+
if (generator.id === "uuidv7") return {
|
|
333
|
+
args: { version: 7 },
|
|
334
|
+
text: "7"
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
function cuidBinding(codecIds) {
|
|
340
|
+
return {
|
|
341
|
+
codecIds,
|
|
342
|
+
generatorIds: ["cuid2"],
|
|
343
|
+
resolve: ({ args }) => {
|
|
344
|
+
const version = args["version"];
|
|
345
|
+
return version === 2 ? generated("cuid2") : refused(`cuid takes version 2, not ${String(version)}.`);
|
|
346
|
+
},
|
|
347
|
+
printArguments: (generator) => generator.id === "cuid2" ? {
|
|
348
|
+
args: { version: 2 },
|
|
349
|
+
text: "2"
|
|
350
|
+
} : void 0
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function columnLength(field) {
|
|
354
|
+
const length = field.typeParams?.["length"];
|
|
355
|
+
return typeof length === "number" ? length : void 0;
|
|
356
|
+
}
|
|
357
|
+
function isNanoidSize(size) {
|
|
358
|
+
return typeof size === "number" && Number.isInteger(size) && size >= NANOID_MIN_SIZE && size <= NANOID_MAX_SIZE;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* A Nano ID has the size the call gives, or 21; the column's length never sets it. A size larger than the column's length is refused, since the identifier would not fit. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.
|
|
362
|
+
*/
|
|
363
|
+
function nanoidBinding(codecIds) {
|
|
364
|
+
return {
|
|
365
|
+
codecIds,
|
|
366
|
+
generatorIds: ["nanoid"],
|
|
367
|
+
resolve: ({ args, field }) => {
|
|
368
|
+
const explicit = args["size"];
|
|
369
|
+
if (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid takes a size from ${NANOID_MIN_SIZE} through ${NANOID_MAX_SIZE}, not ${String(explicit)}.`);
|
|
370
|
+
const size = explicit ?? NANOID_DEFAULT_SIZE;
|
|
371
|
+
const length = columnLength(field);
|
|
372
|
+
if (length !== void 0 && size > length) return refused(`${explicit === void 0 ? "nanoid()" : `nanoid(${size})`} writes ${size} characters, which does not fit a column of ${length} characters.`);
|
|
373
|
+
return explicit === void 0 ? generated("nanoid") : generated("nanoid", { size });
|
|
374
|
+
},
|
|
375
|
+
printArguments: (generator) => {
|
|
376
|
+
if (generator.id !== "nanoid") return void 0;
|
|
377
|
+
const size = generator.params?.["size"];
|
|
378
|
+
return typeof size === "number" ? {
|
|
379
|
+
args: { size },
|
|
380
|
+
text: String(size)
|
|
381
|
+
} : {
|
|
382
|
+
args: {},
|
|
383
|
+
text: ""
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. */
|
|
389
|
+
function idGeneratorFunctionBindings(codecs) {
|
|
390
|
+
const { text } = codecs;
|
|
391
|
+
return [
|
|
392
|
+
{
|
|
393
|
+
name: "uuid",
|
|
394
|
+
bindings: [uuidBinding([...text, ...codecs.uuid ?? []])]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: "cuid",
|
|
398
|
+
bindings: [cuidBinding(text)]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: "ulid",
|
|
402
|
+
bindings: [singleGeneratorBinding({
|
|
403
|
+
codecIds: text,
|
|
404
|
+
generatorId: "ulid"
|
|
405
|
+
})]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "ksuid",
|
|
409
|
+
bindings: [singleGeneratorBinding({
|
|
410
|
+
codecIds: text,
|
|
411
|
+
generatorId: "ksuid"
|
|
412
|
+
})]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: "nanoid",
|
|
416
|
+
bindings: [nanoidBinding(text)]
|
|
417
|
+
}
|
|
418
|
+
];
|
|
419
|
+
}
|
|
420
|
+
const familyIdBindings = idGeneratorFunctionBindings({ text: [
|
|
421
|
+
SQL_CHAR_CODEC_ID,
|
|
422
|
+
SQL_VARCHAR_CODEC_ID,
|
|
423
|
+
SQL_TEXT_CODEC_ID
|
|
424
|
+
] });
|
|
425
|
+
function familyBindingsOf(name) {
|
|
426
|
+
return familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];
|
|
427
|
+
}
|
|
428
|
+
/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */
|
|
429
|
+
const sqlFamilyGeneratorFunctions = [
|
|
430
|
+
{
|
|
431
|
+
name: "now",
|
|
432
|
+
signature: nowSignature,
|
|
433
|
+
bindings: []
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: "uuid",
|
|
437
|
+
signature: uuidSignature,
|
|
438
|
+
bindings: familyBindingsOf("uuid")
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "cuid",
|
|
442
|
+
signature: cuidSignature,
|
|
443
|
+
bindings: familyBindingsOf("cuid")
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
name: "ulid",
|
|
447
|
+
signature: ulidSignature,
|
|
448
|
+
bindings: familyBindingsOf("ulid")
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: "nanoid",
|
|
452
|
+
signature: nanoidSignature,
|
|
453
|
+
bindings: familyBindingsOf("nanoid")
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: "ksuid",
|
|
457
|
+
signature: ksuidSignature,
|
|
458
|
+
bindings: familyBindingsOf("ksuid")
|
|
459
|
+
}
|
|
460
|
+
];
|
|
461
|
+
/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */
|
|
462
|
+
const sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));
|
|
263
463
|
//#endregion
|
|
264
|
-
export {
|
|
464
|
+
export { sqlFamilyGeneratorDescriptors as a, sqlFamilyEntityTypes as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
|
|
265
465
|
|
|
266
|
-
//# sourceMappingURL=
|
|
466
|
+
//# sourceMappingURL=generator-functions-B4gRRYZB-BTtC2KQz.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-functions-B4gRRYZB-BTtC2KQz.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/generator-functions-B4gRRYZB.mjs"],"sourcesContent":["import { readEnumBlockMembers, resolveEnumCodecId } from \"@internal/framework-components/authoring\";\nimport { enumRefusalOf, requiredParamKeys } from \"@internal/framework-components/codec\";\nimport { blockAttribute, int, jsonValue, mapBlock, num, oneOf, optional, str } from \"@internal/psl-parser\";\nimport { enumType } from \"@internal/sql-contract-ts/contract-builder\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { SQL_CHAR_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\n//#region src/core/authoring-entity-types.ts\nfunction sqlFamilyEnumSpec() {\n\treturn mapBlock({\n\t\tvalue: {\n\t\t\ttype: jsonValue(),\n\t\t\tdocumentation: \"The stored member value; a bare member stores its own name.\"\n\t\t},\n\t\tallowBare: true\n\t});\n}\nconst sqlFamilyEntityTypes = { enum: {\n\tkind: \"entity\",\n\tdiscriminator: \"enum\",\n\toutput: { factory: (block, ctx) => {\n\t\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\t\tconst diagnostics = ctx.diagnostics;\n\t\tconst resolved = resolveEnumCodecId(block, ctx);\n\t\tif (resolved === void 0) return;\n\t\tconst { codecId, codecSpan } = resolved;\n\t\tconst descriptor = ctx.codecLookup.descriptorFor(codecId);\n\t\tconst codec = ctx.codecLookup.get(codecId);\n\t\tif (descriptor === void 0 || codec === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type references unknown codec \"${codecId}\"`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst enumRefusal = enumRefusalOf(descriptor);\n\t\tif (enumRefusal !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" cannot use the codec \"${codecId}\". ${enumRefusal}`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst dataType = ctx.dataTypeLookup.get(descriptor.dataType);\n\t\tif (dataType === void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_EXTENSION_INVALID_VALUE\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${descriptor.dataType}\", which no component registers`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst [requiredParam] = requiredParamKeys(dataType);\n\t\tif (requiredParam !== void 0) {\n\t\t\tdiagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_TYPE_NEEDS_PARAMETERS\",\n\t\t\t\tmessage: `enum \"${block.name}\" @@type codec \"${codecId}\" represents data type \"${dataType.id}\", which requires the parameter \"${requiredParam}\"; an enum block gives it none`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: codecSpan\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst members = readEnumBlockMembers(block, codecId, codec, ctx);\n\t\tif (members === void 0) return void 0;\n\t\treturn enumType(block.name, { codecId }, ...members);\n\t} }\n} };\nconst enumTypeBlockAttribute = blockAttribute(\"type\", {\n\tdocumentation: \"Selects the storage codec for this enum.\",\n\tpositional: [{\n\t\tkey: \"codecId\",\n\t\ttype: str(),\n\t\tdocumentation: \"The fully qualified codec identifier used to store enum values.\"\n\t}]\n});\nconst sqlFamilyPslBlockDescriptors = { enum: {\n\tkind: \"pslBlock\",\n\tkeyword: \"enum\",\n\tdocumentation: \"Defines an enum with named values and an inferred or explicitly selected storage codec.\",\n\tdiscriminator: \"enum\",\n\tname: { required: true },\n\tspec: sqlFamilyEnumSpec,\n\tattributes: { type: () => enumTypeBlockAttribute }\n} };\n//#endregion\n//#region src/core/authoring-field-presets.ts\n/**\n* Family-level SQL authoring field presets.\n*\n* Only presets whose codec IDs align with the ID generator metadata live here\n* (see `@internal/ids`). These presets are target-agnostic because the\n* generator metadata fixes their codec/native-type to `sql/char@1`\n* (`character`) regardless of target, and the PSL interpreter lets the\n* generator override the scalar descriptor.\n*\n* The `uuidString` / `id.uuidv4String` / `id.uuidv7String` presets store UUID\n* values as `character(36)` — portable across all SQL targets. For a native\n* Postgres `uuid` column use `uuidNative` / `id.uuidv4Native` /\n* `id.uuidv7Native` from `@internal/target-postgres`.\n*\n* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n* `boolean`, `dateTime`) are contributed by the target pack (see\n* `postgresAuthoringFieldPresets` in `@internal/target-postgres`) so the\n* TS callback surface and the PSL scalar surface lower to byte-identical\n* contracts for the active target.\n*/\nconst CHARACTER_CODEC_ID = \"sql/char@1\";\nconst nanoidOptionsArgument = {\n\tkind: \"object\",\n\toptional: true,\n\tproperties: { size: {\n\t\tkind: \"number\",\n\t\toptional: true,\n\t\tinteger: true,\n\t\tminimum: 2,\n\t\tmaximum: 255\n\t} }\n};\nconst sqlFamilyAuthoringFieldPresets = {\n\tuuidString: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 36 }\n\t\t}\n\t},\n\tulid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 26 }\n\t\t}\n\t},\n\tnanoid: {\n\t\tkind: \"fieldPreset\",\n\t\targs: [nanoidOptionsArgument],\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0,\n\t\t\t\tpath: [\"size\"],\n\t\t\t\tdefault: 21\n\t\t\t} }\n\t\t}\n\t},\n\tcuid2: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 24 }\n\t\t}\n\t},\n\tksuid: {\n\t\tkind: \"fieldPreset\",\n\t\toutput: {\n\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\ttypeParams: { length: 27 }\n\t\t}\n\t},\n\tid: {\n\t\tuuidv4String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv4\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tuuidv7String: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 36 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"uuidv7\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tulid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 26 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ulid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tnanoid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\targs: [nanoidOptionsArgument],\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: {\n\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\tindex: 0,\n\t\t\t\t\tpath: [\"size\"],\n\t\t\t\t\tdefault: 21\n\t\t\t\t} },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"nanoid\",\n\t\t\t\t\tparams: { size: {\n\t\t\t\t\t\tkind: \"arg\",\n\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\tpath: [\"size\"]\n\t\t\t\t\t} }\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tcuid2: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 24 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"cuid2\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t},\n\t\tksuid: {\n\t\t\tkind: \"fieldPreset\",\n\t\t\toutput: {\n\t\t\t\tcodecId: CHARACTER_CODEC_ID,\n\t\t\t\ttypeParams: { length: 27 },\n\t\t\t\texecutionDefaults: { onCreate: {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: \"ksuid\"\n\t\t\t\t} },\n\t\t\t\tid: true\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/authoring-type-constructors.ts\nconst sqlFamilyAuthoringTypes = { sql: { String: {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"Variable-length text with a required maximum character length.\",\n\targs: [{\n\t\tkind: \"number\",\n\t\tname: \"length\",\n\t\tinteger: true\n\t}],\n\toutput: {\n\t\tcodecId: \"sql/varchar@1\",\n\t\ttypeParams: { length: {\n\t\t\tkind: \"arg\",\n\t\t\tindex: 0\n\t\t} }\n\t}\n} } };\n//#endregion\n//#region src/core/generator-functions.ts\nconst NANOID_DEFAULT_SIZE = 21;\nconst NANOID_MIN_SIZE = 2;\nconst NANOID_MAX_SIZE = 255;\nconst nowSignature = { documentation: \"Writes the current time, as the column's codec represents it.\" };\nconst uuidSignature = {\n\tdocumentation: \"Generates a UUID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: optional(oneOf(num(4), num(7))),\n\t\tdocumentation: \"The UUID version: `4` or `7`. Defaults to `4`.\"\n\t}]\n};\nconst cuidSignature = {\n\tdocumentation: \"Generates a CUID2 identifier when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"version\",\n\t\ttype: num(2),\n\t\tdocumentation: \"The CUID version. Only `2` is supported.\"\n\t}]\n};\nconst ulidSignature = { documentation: \"Generates a ULID when a value is not supplied.\" };\nconst nanoidSignature = {\n\tdocumentation: \"Generates a Nano ID when a value is not supplied.\",\n\tpositional: [{\n\t\tkey: \"size\",\n\t\ttype: optional(int({\n\t\t\tmin: NANOID_MIN_SIZE,\n\t\t\tmax: NANOID_MAX_SIZE\n\t\t})),\n\t\tdocumentation: \"The identifier length, from `2` through `255`. Defaults to 21.\"\n\t}]\n};\nconst ksuidSignature = { documentation: \"Generates a KSUID when a value is not supplied.\" };\nfunction refused(message) {\n\treturn {\n\t\tok: false,\n\t\tmessage\n\t};\n}\nfunction generated(id, params) {\n\treturn {\n\t\tok: true,\n\t\tgenerator: params === void 0 ? {\n\t\t\tkind: \"generator\",\n\t\t\tid\n\t\t} : {\n\t\t\tkind: \"generator\",\n\t\t\tid,\n\t\t\tparams\n\t\t}\n\t};\n}\nfunction uuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"uuidv4\", \"uuidv7\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\tif (version === void 0 || version === 4) return generated(\"uuidv4\");\n\t\t\tif (version === 7) return generated(\"uuidv7\");\n\t\t\treturn refused(`uuid takes version 4 or 7, not ${String(version)}.`);\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id === \"uuidv4\") return {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t\tif (generator.id === \"uuidv7\") return {\n\t\t\t\targs: { version: 7 },\n\t\t\t\ttext: \"7\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction cuidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"cuid2\"],\n\t\tresolve: ({ args }) => {\n\t\t\tconst version = args[\"version\"];\n\t\t\treturn version === 2 ? generated(\"cuid2\") : refused(`cuid takes version 2, not ${String(version)}.`);\n\t\t},\n\t\tprintArguments: (generator) => generator.id === \"cuid2\" ? {\n\t\t\targs: { version: 2 },\n\t\t\ttext: \"2\"\n\t\t} : void 0\n\t};\n}\nfunction columnLength(field) {\n\tconst length = field.typeParams?.[\"length\"];\n\treturn typeof length === \"number\" ? length : void 0;\n}\nfunction isNanoidSize(size) {\n\treturn typeof size === \"number\" && Number.isInteger(size) && size >= NANOID_MIN_SIZE && size <= NANOID_MAX_SIZE;\n}\n/**\n* A Nano ID has the size the call gives, or 21; the column's length never sets it. A size larger than the column's length is refused, since the identifier would not fit. A shorter identifier in a fixed-length column is padded by the database, as Prisma 7 does.\n*/\nfunction nanoidBinding(codecIds) {\n\treturn {\n\t\tcodecIds,\n\t\tgeneratorIds: [\"nanoid\"],\n\t\tresolve: ({ args, field }) => {\n\t\t\tconst explicit = args[\"size\"];\n\t\t\tif (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid takes a size from ${NANOID_MIN_SIZE} through ${NANOID_MAX_SIZE}, not ${String(explicit)}.`);\n\t\t\tconst size = explicit ?? NANOID_DEFAULT_SIZE;\n\t\t\tconst length = columnLength(field);\n\t\t\tif (length !== void 0 && size > length) return refused(`${explicit === void 0 ? \"nanoid()\" : `nanoid(${size})`} writes ${size} characters, which does not fit a column of ${length} characters.`);\n\t\t\treturn explicit === void 0 ? generated(\"nanoid\") : generated(\"nanoid\", { size });\n\t\t},\n\t\tprintArguments: (generator) => {\n\t\t\tif (generator.id !== \"nanoid\") return void 0;\n\t\t\tconst size = generator.params?.[\"size\"];\n\t\t\treturn typeof size === \"number\" ? {\n\t\t\t\targs: { size },\n\t\t\t\ttext: String(size)\n\t\t\t} : {\n\t\t\t\targs: {},\n\t\t\t\ttext: \"\"\n\t\t\t};\n\t\t}\n\t};\n}\n/** The identifier generator functions bound to a target's text codecs, and `uuid` to its uuid codecs. */\nfunction idGeneratorFunctionBindings(codecs) {\n\tconst { text } = codecs;\n\treturn [\n\t\t{\n\t\t\tname: \"uuid\",\n\t\t\tbindings: [uuidBinding([...text, ...codecs.uuid ?? []])]\n\t\t},\n\t\t{\n\t\t\tname: \"cuid\",\n\t\t\tbindings: [cuidBinding(text)]\n\t\t},\n\t\t{\n\t\t\tname: \"ulid\",\n\t\t\tbindings: [singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ulid\"\n\t\t\t})]\n\t\t},\n\t\t{\n\t\t\tname: \"ksuid\",\n\t\t\tbindings: [singleGeneratorBinding({\n\t\t\t\tcodecIds: text,\n\t\t\t\tgeneratorId: \"ksuid\"\n\t\t\t})]\n\t\t},\n\t\t{\n\t\t\tname: \"nanoid\",\n\t\t\tbindings: [nanoidBinding(text)]\n\t\t}\n\t];\n}\nconst familyIdBindings = idGeneratorFunctionBindings({ text: [\n\tSQL_CHAR_CODEC_ID,\n\tSQL_VARCHAR_CODEC_ID,\n\tSQL_TEXT_CODEC_ID\n] });\nfunction familyBindingsOf(name) {\n\treturn familyIdBindings.find((contribution) => contribution.name === name)?.bindings ?? [];\n}\n/** The generator functions the SQL family declares, with their bindings to the family's codecs. Targets bind `now` and their own codecs. */\nconst sqlFamilyGeneratorFunctions = [\n\t{\n\t\tname: \"now\",\n\t\tsignature: nowSignature,\n\t\tbindings: []\n\t},\n\t{\n\t\tname: \"uuid\",\n\t\tsignature: uuidSignature,\n\t\tbindings: familyBindingsOf(\"uuid\")\n\t},\n\t{\n\t\tname: \"cuid\",\n\t\tsignature: cuidSignature,\n\t\tbindings: familyBindingsOf(\"cuid\")\n\t},\n\t{\n\t\tname: \"ulid\",\n\t\tsignature: ulidSignature,\n\t\tbindings: familyBindingsOf(\"ulid\")\n\t},\n\t{\n\t\tname: \"nanoid\",\n\t\tsignature: nanoidSignature,\n\t\tbindings: familyBindingsOf(\"nanoid\")\n\t},\n\t{\n\t\tname: \"ksuid\",\n\t\tsignature: ksuidSignature,\n\t\tbindings: familyBindingsOf(\"ksuid\")\n\t}\n];\n/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */\nconst sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));\n//#endregion\nexport { sqlFamilyAuthoringFieldPresets as a, sqlFamilyAuthoringTypes as i, sqlFamilyGeneratorDescriptors as n, sqlFamilyEntityTypes as o, sqlFamilyGeneratorFunctions as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };\n\n//# sourceMappingURL=generator-functions-B4gRRYZB.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,o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AAS,EAAE,eAAe,SAAS,SAAS,EAAE,mBAAmB,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,GAAG,EAAE"}
|
|
@@ -4,9 +4,9 @@ import "./foreign-key-materialization-C_FPLzj3.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-CdPHpJSv-B7Bgj3Ao.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 { _ as resolveFieldTypeDescriptor, d as interpretModelAttribute, f as modelAttributeSpecsFrom, g as readWrittenNumberForCodec, i as contractError, l as instantiatePslTypeConstructor, m as modelSpecContext, n as bareTypeConstructorOf, o as fieldSpecContext, p as modelCoordinateKey, r as collectResolvedFields, s as getAuthoringEntity, t as PSL_CHECK_ON_STI_VARIANT, u as interpretFieldAttribute, v as sqlAttributeSpecs, y as toNamedTypeFieldDescriptor } from "./psl-field-resolution-
|
|
9
|
+
import { _ as resolveFieldTypeDescriptor, d as interpretModelAttribute, f as modelAttributeSpecsFrom, g as readWrittenNumberForCodec, i as contractError, l as instantiatePslTypeConstructor, m as modelSpecContext, n as bareTypeConstructorOf, o as fieldSpecContext, p as modelCoordinateKey, r as collectResolvedFields, s as getAuthoringEntity, t as PSL_CHECK_ON_STI_VARIANT, u as interpretFieldAttribute, v as sqlAttributeSpecs, y as toNamedTypeFieldDescriptor } from "./psl-field-resolution-BET6wtHZ-CX2xL99Q.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 { contributedTypeOf, 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-Bk0xpelv.mjs
|
|
25
25
|
function baseColumnDescriptor(resolution, enumTypeDescriptors) {
|
|
26
26
|
if (resolution?.kind === "block") return enumTypeDescriptors.get(resolution.symbol);
|
|
27
27
|
const scalar = bareTypeConstructorOf(resolution);
|
|
@@ -692,6 +692,7 @@ function buildModelNodeFromPsl(input) {
|
|
|
692
692
|
symbols: input.symbolTable,
|
|
693
693
|
model,
|
|
694
694
|
defaultFunctionRegistry: input.defaultFunctionRegistry,
|
|
695
|
+
generatorFunctions: input.generatorFunctions,
|
|
695
696
|
dataTypes: input.dataTypes
|
|
696
697
|
});
|
|
697
698
|
const modelNamespaceId = input.namespaceId;
|
|
@@ -706,8 +707,8 @@ function buildModelNodeFromPsl(input) {
|
|
|
706
707
|
authoringContributions: input.authoringContributions,
|
|
707
708
|
targetId: input.targetId,
|
|
708
709
|
defaultFunctionRegistry: input.defaultFunctionRegistry,
|
|
710
|
+
generatorFunctions: input.generatorFunctions,
|
|
709
711
|
dataTypes: input.dataTypes,
|
|
710
|
-
generatorDescriptorById: input.generatorDescriptorById,
|
|
711
712
|
diagnostics,
|
|
712
713
|
sources: input.sources,
|
|
713
714
|
binder: input.binder,
|
|
@@ -1739,10 +1740,12 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
1739
1740
|
const composedPslBlockDescriptors = input.authoringContributions?.pslBlockDescriptors ?? {};
|
|
1740
1741
|
const { binder, dataTypes } = input;
|
|
1741
1742
|
const defaultFunctionRegistry = input.controlMutationDefaults?.defaultFunctionRegistry ?? /* @__PURE__ */ new Map();
|
|
1743
|
+
const { generatorFunctions } = input;
|
|
1742
1744
|
const specContextFor = (model) => modelSpecContext({
|
|
1743
1745
|
symbols: input.symbolTable,
|
|
1744
1746
|
model,
|
|
1745
1747
|
defaultFunctionRegistry,
|
|
1748
|
+
generatorFunctions,
|
|
1746
1749
|
dataTypes
|
|
1747
1750
|
});
|
|
1748
1751
|
const namespaceSymbols = Object.values(input.symbolTable.namespaces);
|
|
@@ -1816,9 +1819,6 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
1816
1819
|
const defaultNamespaceId = input.symbolTable.defaultNamespace.id;
|
|
1817
1820
|
const composedExtensions = new Set(input.composedExtensions ?? []);
|
|
1818
1821
|
const composedExtensionContracts = input.composedExtensionContracts;
|
|
1819
|
-
const generatorDescriptors = input.controlMutationDefaults?.generatorDescriptors ?? [];
|
|
1820
|
-
const generatorDescriptorById = /* @__PURE__ */ new Map();
|
|
1821
|
-
for (const descriptor of generatorDescriptors) generatorDescriptorById.set(descriptor.id, descriptor);
|
|
1822
1822
|
const isEnumBlock = (block) => block.keyword === "enum";
|
|
1823
1823
|
const legitimateBlockKeywords = claimedBlockKeywords(input.authoringContributions?.pslBlockDescriptors);
|
|
1824
1824
|
const reportUnsupportedTopLevelBlock = (block) => {
|
|
@@ -1994,8 +1994,8 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
1994
1994
|
targetId: input.target.targetId,
|
|
1995
1995
|
authoringContributions: input.authoringContributions,
|
|
1996
1996
|
defaultFunctionRegistry,
|
|
1997
|
+
generatorFunctions,
|
|
1997
1998
|
dataTypes,
|
|
1998
|
-
generatorDescriptorById,
|
|
1999
1999
|
scalarColumnDescriptors: input.scalarColumnDescriptors,
|
|
2000
2000
|
sources: input.sources,
|
|
2001
2001
|
binder,
|
|
@@ -2174,4 +2174,4 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
2174
2174
|
//#endregion
|
|
2175
2175
|
export { normalizeReferentialAction as a, interpretPslDocumentToSqlContract as i, buildEntityTypesByDiscriminator as n, indexFkRelations as r, applyBackrelationCandidates as t };
|
|
2176
2176
|
|
|
2177
|
-
//# sourceMappingURL=interpreter-
|
|
2177
|
+
//# sourceMappingURL=interpreter-Bk0xpelv-BifV9Yib.mjs.map
|