@prisma/orm-family-sql 8.0.0-rc.18-dev.36 → 8.0.0-rc.18-dev.38
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-CKPSK8oZ.d.mts → attribute-specs-D_fUYNiw.d.mts} +15 -8
- package/dist/attribute-specs-D_fUYNiw.d.mts.map +1 -0
- package/dist/{authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts → authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts} +2 -2
- package/dist/{authoring-entity-types-DUQLeBf_-DmXuN7I3.d.mts.map → authoring-entity-types-DUQLeBf_-BZ1zRWGY.d.mts.map} +1 -1
- package/dist/{config-types-Dc7u9onO.mjs → config-types-CUWdUm6B.mjs} +2 -2
- package/dist/{config-types-Dc7u9onO.mjs.map → config-types-CUWdUm6B.mjs.map} +1 -1
- package/dist/{contract-builder-C7X80029.d.mts → contract-builder-Di-2-fFO.d.mts} +2 -2
- package/dist/{contract-builder-C7X80029.d.mts.map → contract-builder-Di-2-fFO.d.mts.map} +1 -1
- package/dist/{contract-builder-CKfnPa4C.mjs → contract-builder-DzzgwCZd.mjs} +20 -9
- package/dist/contract-builder-DzzgwCZd.mjs.map +1 -0
- package/dist/contract-prisma7__provider.mjs +69 -44
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.d.mts +2 -2
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.d.mts +2 -2
- package/dist/contract-psl__attribute-specs.mjs +2 -2
- 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/contract.d.mts +2 -2
- package/dist/contract.mjs +4 -4
- package/dist/contract__data-type.d.mts +2 -2
- package/dist/contract__data-type.mjs +3 -3
- package/dist/contract__validators.mjs +1 -1
- package/dist/{control-B1Nyqky-.d.mts → control-LkQLqHHL.d.mts} +14 -31
- package/dist/control-LkQLqHHL.d.mts.map +1 -0
- package/dist/{control-adapter-BX5COBWO.mjs → control-adapter-DRlEXxsv.mjs} +2 -2
- package/dist/{control-adapter-BX5COBWO.mjs.map → control-adapter-DRlEXxsv.mjs.map} +1 -1
- package/dist/{control-jtTYvP_4.mjs → control-d-Dlrhh4.mjs} +38 -9
- package/dist/control-d-Dlrhh4.mjs.map +1 -0
- package/dist/{data-type-DMk-fLAZ.d.mts → data-type-BacIoCfv.d.mts} +11 -2
- package/dist/data-type-BacIoCfv.d.mts.map +1 -0
- package/dist/{data-type-HNhSslwG.mjs → data-type-CUJMZOHo.mjs} +2 -2
- package/dist/data-type-CUJMZOHo.mjs.map +1 -0
- package/dist/{derived-checks-CwbSfZ8d-B3-zWGv_.mjs → derived-checks-CwbSfZ8d-B91zqK6B.mjs} +3 -3
- package/dist/{derived-checks-CwbSfZ8d-B3-zWGv_.mjs.map → derived-checks-CwbSfZ8d-B91zqK6B.mjs.map} +1 -1
- package/dist/{diff-DDjcnhgw.d.mts → diff-CzUyZmJi.d.mts} +2 -2
- package/dist/{diff-DDjcnhgw.d.mts.map → diff-CzUyZmJi.d.mts.map} +1 -1
- package/dist/family.d.mts +7 -7
- package/dist/family.mjs +8 -8
- package/dist/family__control-adapter.mjs +1 -1
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +4 -4
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__diff.mjs +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.d.mts +2 -2
- package/dist/family__pack.mjs +3 -3
- package/dist/family__pack.mjs.map +1 -1
- package/dist/family__psl-build.d.mts +1 -1
- package/dist/family__psl-build.mjs +1 -1
- package/dist/{generator-functions-DIXj2u8w-B_EpEY8t.mjs → generator-functions-DErXcNG5-nKYm5qLY.mjs} +124 -67
- package/dist/generator-functions-DErXcNG5-nKYm5qLY.mjs.map +1 -0
- package/dist/{interpreter-Dq32sxoS-BcLhPY0_.mjs → interpreter-MPFufRkd-D0QvlLTq.mjs} +72 -18
- package/dist/interpreter-MPFufRkd-D0QvlLTq.mjs.map +1 -0
- package/dist/{migration-BZJFz90J.d.mts → migration-tfMTDejH.d.mts} +2 -2
- package/dist/{migration-BZJFz90J.d.mts.map → migration-tfMTDejH.d.mts.map} +1 -1
- package/dist/{pack-C4yN9ooT.d.mts → pack-74uFuOgh.d.mts} +48 -30
- package/dist/{pack-C4yN9ooT.d.mts.map → pack-74uFuOgh.d.mts.map} +1 -1
- package/dist/{psl-build-DzdzY3o1.mjs → psl-build-BSZQ8lC1.mjs} +5 -4
- package/dist/{psl-build-DzdzY3o1.mjs.map → psl-build-BSZQ8lC1.mjs.map} +1 -1
- package/dist/{psl-build-DETsH_kq.d.mts → psl-build-BkNvqSMz.d.mts} +4 -2
- package/dist/{psl-build-DETsH_kq.d.mts.map → psl-build-BkNvqSMz.d.mts.map} +1 -1
- package/dist/{psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts → psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts} +3 -3
- package/dist/{psl-column-resolution-DNdqpUxt-CL8m5aC4.d.mts.map → psl-column-resolution-DNdqpUxt-DlQwgbqn.d.mts.map} +1 -1
- package/dist/{psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs → psl-field-resolution-BLtSah2i-BuuJ5H70.mjs} +21 -15
- package/dist/psl-field-resolution-BLtSah2i-BuuJ5H70.mjs.map +1 -0
- package/dist/{schema-verify-BwRdzbHb-BzdgK4xv.mjs → schema-verify-BwRdzbHb-DfFAS0EC.mjs} +2 -2
- package/dist/{schema-verify-BwRdzbHb-BzdgK4xv.mjs.map → schema-verify-BwRdzbHb-DfFAS0EC.mjs.map} +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs → sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs} +2 -2
- package/dist/{sql-contract-serializer-sMY3prTx-D-xfnqyD.mjs.map → sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs.map} +1 -1
- package/dist/{sql-data-type-D5cI3M07-DIcPP8s1.mjs → sql-data-type-D7M-YTTY-C9oWGZ3z.mjs} +16 -3
- package/dist/sql-data-type-D7M-YTTY-C9oWGZ3z.mjs.map +1 -0
- package/dist/{types-DKSRuPhK-DuxW_ceI.d.mts → types-CI5lled6-CDV4aYNB.d.mts} +2 -2
- package/dist/{types-DKSRuPhK-DuxW_ceI.d.mts.map → types-CI5lled6-CDV4aYNB.d.mts.map} +1 -1
- package/dist/{validators-BlONfdFH.mjs → validators-Cfy0jmZ2.mjs} +2 -2
- package/dist/{validators-BlONfdFH.mjs.map → validators-Cfy0jmZ2.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/attribute-specs-CKPSK8oZ.d.mts.map +0 -1
- package/dist/contract-builder-CKfnPa4C.mjs.map +0 -1
- package/dist/control-B1Nyqky-.d.mts.map +0 -1
- package/dist/control-jtTYvP_4.mjs.map +0 -1
- package/dist/data-type-DMk-fLAZ.d.mts.map +0 -1
- package/dist/data-type-HNhSslwG.mjs.map +0 -1
- package/dist/generator-functions-DIXj2u8w-B_EpEY8t.mjs.map +0 -1
- package/dist/interpreter-Dq32sxoS-BcLhPY0_.mjs.map +0 -1
- package/dist/psl-field-resolution-C8s57hFC-Bv6NiK8J.mjs.map +0 -1
- package/dist/sql-data-type-D5cI3M07-DIcPP8s1.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
3
|
import { n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-Bn0uhplA-BBax-2PG.mjs";
|
|
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-
|
|
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
|
|
6
|
+
import { $ as TableRename, $t as unmatchedColumnRename, 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 unknownCallNames, 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 temporalStringAuthoringPresets, Y as SubjectStorage, Yt as temporalCodecPresetWithPrecision, Z as TABLE_NAME_CASE_CHANGED_CODE, Zt as unconvertedFieldOf, _ 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, en as unmatchedTableRename, 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-LkQLqHHL.mjs";
|
|
7
7
|
import { t as resolveIntrospectedColumnType } from "./control-adapter-QzlyTp1z.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-
|
|
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
|
-
import { t as SqlMigration } from "./migration-
|
|
11
|
-
import { t as idGeneratorFunctionBindings } from "./pack-
|
|
10
|
+
import { t as SqlMigration } from "./migration-tfMTDejH.mjs";
|
|
11
|
+
import { r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-74uFuOgh.mjs";
|
|
12
12
|
import { i as writeDefaultLiteral, n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CP8q4TfH-CF6eJMej.mjs";
|
|
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-
|
|
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-BkNvqSMz.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-C-RcAyUr.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 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, writeDefaultLiteral };
|
|
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, pslTypeArgumentText, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveDomainModel, resolveIntrospectedColumnType, resolveStorageTable, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff, writeDefaultLiteral };
|
package/dist/family.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as resolveStorageTable } from "./resolve-storage-table-DZsfnzeW.mjs";
|
|
2
|
-
import { n as checkSqlDefaultText } from "./validators-
|
|
3
|
-
import { t as idGeneratorFunctionBindings } from "./generator-functions-
|
|
4
|
-
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue, s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-
|
|
5
|
-
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-
|
|
2
|
+
import { n as checkSqlDefaultText } from "./validators-Cfy0jmZ2.mjs";
|
|
3
|
+
import { c as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./generator-functions-DErXcNG5-nKYm5qLY.mjs";
|
|
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
|
+
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 { $ as
|
|
8
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
7
|
+
import { $ as unmatchedColumnRename, 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 unknownCallNames, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlDefaultFunctions, X as temporalStringAuthoringPresets, Y as temporalCodecPresetWithPrecision, Z as unconvertedFieldOf, _ as detectDestructiveChanges, a as assembleAuthoringContributions, b as fieldOfColumn, c as columnTakesTemporaryValue, d as contractToSchemaIR, et as unmatchedTableRename, 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-d-Dlrhh4.mjs";
|
|
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
12
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
13
|
-
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as pslTypeArgumentText, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-
|
|
13
|
+
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as pslTypeArgumentText, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-BSZQ8lC1.mjs";
|
|
14
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-CaEnF_x3.mjs";
|
|
15
15
|
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, 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, writeDefaultLiteral };
|
|
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, sqlDefaultFunctions, sqlIntegerArgumentGeneratorFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff, writeDefaultLiteral };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveIntrospectedColumnType } from "./control-adapter-
|
|
1
|
+
import { t as resolveIntrospectedColumnType } from "./control-adapter-DRlEXxsv.mjs";
|
|
2
2
|
export { resolveIntrospectedColumnType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as checkSqlDefaultText } from "./validators-CTZ-hU2l.mjs";
|
|
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-
|
|
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
|
|
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 };
|
|
4
|
+
import { $ as TableRename, $t as unmatchedColumnRename, 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 unknownCallNames, 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 temporalStringAuthoringPresets, Y as SubjectStorage, Yt as temporalCodecPresetWithPrecision, Z as TABLE_NAME_CASE_CHANGED_CODE, Zt as unconvertedFieldOf, _ 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, en as unmatchedTableRename, 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-LkQLqHHL.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, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as checkSqlDefaultText } from "./validators-
|
|
2
|
-
import { s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-
|
|
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, 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 };
|
|
1
|
+
import { n as checkSqlDefaultText } from "./validators-Cfy0jmZ2.mjs";
|
|
2
|
+
import { s as extractCodecControlHooks } from "./schema-verify-BwRdzbHb-DfFAS0EC.mjs";
|
|
3
|
+
import { $ as unmatchedColumnRename, 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 unknownCallNames, R as resolveTableRenameAgainst, S as fieldStatementColumns, T as partitionCallsByControlPolicy, U as slotSource, V as runnerFailure, W as sqlDefaultFunctions, X as temporalStringAuthoringPresets, Y as temporalCodecPresetWithPrecision, Z as unconvertedFieldOf, _ as detectDestructiveChanges, a as assembleAuthoringContributions, b as fieldOfColumn, c as columnTakesTemporaryValue, d as contractToSchemaIR, et as unmatchedTableRename, 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-d-Dlrhh4.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, 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-CzUyZmJi.mjs";
|
|
2
2
|
export { type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
package/dist/family__diff.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue } from "./schema-verify-BwRdzbHb-
|
|
1
|
+
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue } from "./schema-verify-BwRdzbHb-DfFAS0EC.mjs";
|
|
2
2
|
import { t as arraysEqual } from "./diff-DZ82XaGR.mjs";
|
|
3
3
|
export { arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
package/dist/family__ir.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-
|
|
1
|
+
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-CpZa5Nlt.mjs";
|
|
2
2
|
import { t as SqlSchemaVerifierBase } from "./ir-I-xciGUH.mjs";
|
|
3
3
|
export { SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-tfMTDejH.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
package/dist/family__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as sqlFamilyPack, t as idGeneratorFunctionBindings } from "./pack-
|
|
2
|
-
export { sqlFamilyPack as default, idGeneratorFunctionBindings };
|
|
1
|
+
import { n as sqlFamilyPack, r as sqlIntegerArgumentGeneratorFunctions, t as idGeneratorFunctionBindings } from "./pack-74uFuOgh.mjs";
|
|
2
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions };
|
package/dist/family__pack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { b as sqlAttributeSpecs } from "./psl-field-resolution-BLtSah2i-BuuJ5H70.mjs";
|
|
2
|
+
import { a as sqlFamilyGeneratorDescriptors, c as sqlIntegerArgumentGeneratorFunctions, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors, t as idGeneratorFunctionBindings } from "./generator-functions-DErXcNG5-nKYm5qLY.mjs";
|
|
3
3
|
//#region ../../../2-sql/9-family/dist/pack.mjs
|
|
4
4
|
const sqlFamilyPack = {
|
|
5
5
|
kind: "family",
|
|
@@ -20,6 +20,6 @@ const sqlFamilyPack = {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
|
-
export { sqlFamilyPack as default, idGeneratorFunctionBindings };
|
|
23
|
+
export { sqlFamilyPack as default, idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions };
|
|
24
24
|
|
|
25
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 { a as
|
|
1
|
+
{"version":3,"file":"family__pack.mjs","names":[],"sources":["../../../../2-sql/9-family/dist/pack.mjs"],"sourcesContent":["import { a as sqlFamilyAuthoringTypes, c as sqlFamilyPslBlockDescriptors, i as sqlIntegerArgumentGeneratorFunctions, n as sqlFamilyGeneratorDescriptors, o as sqlFamilyAuthoringFieldPresets, r as sqlFamilyGeneratorFunctions, s as sqlFamilyEntityTypes, t as idGeneratorFunctionBindings } from \"./generator-functions-DErXcNG5.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, sqlIntegerArgumentGeneratorFunctions };\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 { i as writeDefaultLiteral, n as DefaultMappingResult, r as mapDefault, t as DefaultMappingOptions } from "./default-mapping-CP8q4TfH-CF6eJMej.mjs";
|
|
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-
|
|
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-BkNvqSMz.mjs";
|
|
3
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, writeDefaultLiteral };
|
|
@@ -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 pslTypeArgumentText, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-
|
|
2
|
+
import { a as mapDefault, i as inferredTypeConstructors, n as generatorCallsFor, o as pslTypeArgumentText, r as inferColumnTypes, s as writeDefaultLiteral, t as fewestArgumentsCall } from "./psl-build-BSZQ8lC1.mjs";
|
|
3
3
|
export { fewestArgumentsCall, generatorCallsFor, inferColumnTypes, inferredTypeConstructors, mapDefault, pslTypeArgumentText, toEnumMemberName, writeDefaultLiteral };
|
package/dist/{generator-functions-DIXj2u8w-B_EpEY8t.mjs → generator-functions-DErXcNG5-nKYm5qLY.mjs}
RENAMED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { c as enumType } from "./contract-builder-
|
|
1
|
+
import { c as enumType } from "./contract-builder-DzzgwCZd.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";
|
|
5
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
6
|
+
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
5
7
|
import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
+
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
9
|
+
import { blockAttribute, dataTypeValue, enumMemberValue, leafDiagnostic, mapBlock, optional, refineArg, str } from "@prisma/orm-framework/psl-parser";
|
|
10
|
+
import { CUID_VERSION, NANOID_SIZE, UUID_VERSIONS, generatedLength } from "@prisma/orm-framework/ids";
|
|
11
|
+
//#region ../../../2-sql/9-family/dist/generator-functions-DErXcNG5.mjs
|
|
8
12
|
function sqlFamilyEnumSpec() {
|
|
9
13
|
return mapBlock({
|
|
10
14
|
value: {
|
|
@@ -114,8 +118,8 @@ const nanoidOptionsArgument = {
|
|
|
114
118
|
kind: "number",
|
|
115
119
|
optional: true,
|
|
116
120
|
integer: true,
|
|
117
|
-
minimum:
|
|
118
|
-
maximum:
|
|
121
|
+
minimum: NANOID_SIZE.min,
|
|
122
|
+
maximum: NANOID_SIZE.max
|
|
119
123
|
} }
|
|
120
124
|
};
|
|
121
125
|
const sqlFamilyAuthoringFieldPresets = {
|
|
@@ -280,37 +284,8 @@ const sqlFamilyAuthoringTypes = {
|
|
|
280
284
|
} }
|
|
281
285
|
};
|
|
282
286
|
const NANOID_DEFAULT_SIZE = 21;
|
|
283
|
-
const NANOID_MIN_SIZE = 2;
|
|
284
|
-
const NANOID_MAX_SIZE = 255;
|
|
285
287
|
const nowSignature = { documentation: "Writes the current time, as the column's codec represents it." };
|
|
286
|
-
const uuidSignature = {
|
|
287
|
-
documentation: "Generates a UUID when a value is not supplied.",
|
|
288
|
-
positional: [{
|
|
289
|
-
key: "version",
|
|
290
|
-
type: optional(oneOf(num(4), num(7))),
|
|
291
|
-
documentation: "The UUID version: `4` or `7`. Defaults to `4`."
|
|
292
|
-
}]
|
|
293
|
-
};
|
|
294
|
-
const cuidSignature = {
|
|
295
|
-
documentation: "Generates a CUID2 identifier when a value is not supplied.",
|
|
296
|
-
positional: [{
|
|
297
|
-
key: "version",
|
|
298
|
-
type: num(2),
|
|
299
|
-
documentation: "The CUID version. Only `2` is supported."
|
|
300
|
-
}]
|
|
301
|
-
};
|
|
302
288
|
const ulidSignature = { documentation: "Generates a ULID when a value is not supplied." };
|
|
303
|
-
const nanoidSignature = {
|
|
304
|
-
documentation: "Generates a Nano ID when a value is not supplied.",
|
|
305
|
-
positional: [{
|
|
306
|
-
key: "size",
|
|
307
|
-
type: optional(int({
|
|
308
|
-
min: NANOID_MIN_SIZE,
|
|
309
|
-
max: NANOID_MAX_SIZE
|
|
310
|
-
})),
|
|
311
|
-
documentation: "The identifier length, from `2` through `255`. Defaults to 21."
|
|
312
|
-
}]
|
|
313
|
-
};
|
|
314
289
|
const ksuidSignature = { documentation: "Generates a KSUID when a value is not supplied." };
|
|
315
290
|
function refused(message) {
|
|
316
291
|
return {
|
|
@@ -337,9 +312,9 @@ function uuidBinding(codecIds) {
|
|
|
337
312
|
generatorIds: ["uuidv4", "uuidv7"],
|
|
338
313
|
resolve: ({ args }) => {
|
|
339
314
|
const version = args["version"];
|
|
340
|
-
if (version === void 0 || version ===
|
|
341
|
-
if (version ===
|
|
342
|
-
return refused(`uuid
|
|
315
|
+
if (version === void 0 || version === UUID_VERSIONS.v4) return generated("uuidv4");
|
|
316
|
+
if (version === UUID_VERSIONS.v7) return generated("uuidv7");
|
|
317
|
+
return refused(`uuid: version must be ${UUID_VERSIONS.v4} or ${UUID_VERSIONS.v7}, got ${String(version)}`);
|
|
343
318
|
},
|
|
344
319
|
printArguments: (generator) => {
|
|
345
320
|
if (generator.id === "uuidv4") return {
|
|
@@ -347,8 +322,8 @@ function uuidBinding(codecIds) {
|
|
|
347
322
|
text: ""
|
|
348
323
|
};
|
|
349
324
|
if (generator.id === "uuidv7") return {
|
|
350
|
-
args: { version:
|
|
351
|
-
text:
|
|
325
|
+
args: { version: UUID_VERSIONS.v7 },
|
|
326
|
+
text: String(UUID_VERSIONS.v7)
|
|
352
327
|
};
|
|
353
328
|
}
|
|
354
329
|
};
|
|
@@ -359,35 +334,28 @@ function cuidBinding(codecIds) {
|
|
|
359
334
|
generatorIds: ["cuid2"],
|
|
360
335
|
resolve: ({ args }) => {
|
|
361
336
|
const version = args["version"];
|
|
362
|
-
return version ===
|
|
337
|
+
return version === CUID_VERSION ? generated("cuid2") : refused(`cuid: version must be ${CUID_VERSION}, got ${String(version)}`);
|
|
363
338
|
},
|
|
364
339
|
printArguments: (generator) => generator.id === "cuid2" ? {
|
|
365
|
-
args: { version:
|
|
366
|
-
text:
|
|
340
|
+
args: { version: CUID_VERSION },
|
|
341
|
+
text: String(CUID_VERSION)
|
|
367
342
|
} : void 0
|
|
368
343
|
};
|
|
369
344
|
}
|
|
370
|
-
function columnLength(field) {
|
|
371
|
-
const length = field.typeParams?.["length"];
|
|
372
|
-
return typeof length === "number" ? length : void 0;
|
|
373
|
-
}
|
|
374
345
|
function isNanoidSize(size) {
|
|
375
|
-
return typeof size === "number" && Number.isInteger(size) && size >=
|
|
346
|
+
return typeof size === "number" && Number.isInteger(size) && size >= NANOID_SIZE.min && size <= NANOID_SIZE.max;
|
|
376
347
|
}
|
|
377
348
|
/**
|
|
378
|
-
* A Nano ID has the size the call gives, or 21; the column's length never sets it. A
|
|
349
|
+
* 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.
|
|
379
350
|
*/
|
|
380
351
|
function nanoidBinding(codecIds) {
|
|
381
352
|
return {
|
|
382
353
|
codecIds,
|
|
383
354
|
generatorIds: ["nanoid"],
|
|
384
|
-
resolve: ({ args
|
|
355
|
+
resolve: ({ args }) => {
|
|
385
356
|
const explicit = args["size"];
|
|
386
|
-
if (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid
|
|
387
|
-
|
|
388
|
-
const length = columnLength(field);
|
|
389
|
-
if (length !== void 0 && size > length) return refused(`${explicit === void 0 ? "nanoid()" : `nanoid(${size})`} writes ${size} characters, which does not fit a column of ${length} characters.`);
|
|
390
|
-
return explicit === void 0 ? generated("nanoid") : generated("nanoid", { size });
|
|
357
|
+
if (explicit !== void 0 && !isNanoidSize(explicit)) return refused(`nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${String(explicit)}`);
|
|
358
|
+
return explicit === void 0 ? generated("nanoid") : generated("nanoid", { size: explicit });
|
|
391
359
|
},
|
|
392
360
|
printArguments: (generator) => {
|
|
393
361
|
if (generator.id !== "nanoid") return void 0;
|
|
@@ -402,35 +370,52 @@ function nanoidBinding(codecIds) {
|
|
|
402
370
|
}
|
|
403
371
|
};
|
|
404
372
|
}
|
|
405
|
-
/**
|
|
373
|
+
/**
|
|
374
|
+
* `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.
|
|
375
|
+
*/
|
|
376
|
+
function fittingColumn(name, binding) {
|
|
377
|
+
return {
|
|
378
|
+
...binding,
|
|
379
|
+
resolve: (input) => {
|
|
380
|
+
const resolution = binding.resolve(input);
|
|
381
|
+
const length = input.field.length;
|
|
382
|
+
if (!resolution.ok || length === void 0) return resolution;
|
|
383
|
+
const { generator } = resolution;
|
|
384
|
+
const written = generatedLength(blindCast(generator.id), generator.params);
|
|
385
|
+
if (written <= length) return resolution;
|
|
386
|
+
return refused(`${`${name}(${binding.printArguments(generator, input.field)?.text ?? ""})`} writes ${written} characters, which does not fit a column of ${length} ${length === 1 ? "character" : "characters"}.`);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
/** 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. */
|
|
406
391
|
function idGeneratorFunctionBindings(codecs) {
|
|
407
392
|
const { text } = codecs;
|
|
408
393
|
return [
|
|
409
394
|
{
|
|
410
395
|
name: "uuid",
|
|
411
|
-
bindings: [uuidBinding([...text, ...codecs.uuid ?? []])]
|
|
396
|
+
bindings: [fittingColumn("uuid", uuidBinding([...text, ...codecs.uuid ?? []]))]
|
|
412
397
|
},
|
|
413
398
|
{
|
|
414
399
|
name: "cuid",
|
|
415
|
-
bindings: [cuidBinding(text)]
|
|
400
|
+
bindings: [fittingColumn("cuid", cuidBinding(text))]
|
|
416
401
|
},
|
|
417
402
|
{
|
|
418
403
|
name: "ulid",
|
|
419
|
-
bindings: [singleGeneratorBinding({
|
|
404
|
+
bindings: [fittingColumn("ulid", singleGeneratorBinding({
|
|
420
405
|
codecIds: text,
|
|
421
406
|
generatorId: "ulid"
|
|
422
|
-
})]
|
|
407
|
+
}))]
|
|
423
408
|
},
|
|
424
409
|
{
|
|
425
410
|
name: "ksuid",
|
|
426
|
-
bindings: [singleGeneratorBinding({
|
|
411
|
+
bindings: [fittingColumn("ksuid", singleGeneratorBinding({
|
|
427
412
|
codecIds: text,
|
|
428
413
|
generatorId: "ksuid"
|
|
429
|
-
})]
|
|
414
|
+
}))]
|
|
430
415
|
},
|
|
431
416
|
{
|
|
432
417
|
name: "nanoid",
|
|
433
|
-
bindings: [nanoidBinding(text)]
|
|
418
|
+
bindings: [fittingColumn("nanoid", nanoidBinding(text))]
|
|
434
419
|
}
|
|
435
420
|
];
|
|
436
421
|
}
|
|
@@ -451,12 +436,10 @@ const sqlFamilyGeneratorFunctions = [
|
|
|
451
436
|
},
|
|
452
437
|
{
|
|
453
438
|
name: "uuid",
|
|
454
|
-
signature: uuidSignature,
|
|
455
439
|
bindings: familyBindingsOf("uuid")
|
|
456
440
|
},
|
|
457
441
|
{
|
|
458
442
|
name: "cuid",
|
|
459
|
-
signature: cuidSignature,
|
|
460
443
|
bindings: familyBindingsOf("cuid")
|
|
461
444
|
},
|
|
462
445
|
{
|
|
@@ -466,7 +449,6 @@ const sqlFamilyGeneratorFunctions = [
|
|
|
466
449
|
},
|
|
467
450
|
{
|
|
468
451
|
name: "nanoid",
|
|
469
|
-
signature: nanoidSignature,
|
|
470
452
|
bindings: familyBindingsOf("nanoid")
|
|
471
453
|
},
|
|
472
454
|
{
|
|
@@ -477,7 +459,82 @@ const sqlFamilyGeneratorFunctions = [
|
|
|
477
459
|
];
|
|
478
460
|
/** The identifier generators the family's bindings produce, which the family registers so that a target binding them through `idGeneratorFunctionBindings` registers none. */
|
|
479
461
|
const sqlFamilyGeneratorDescriptors = [...new Set(sqlFamilyGeneratorFunctions.flatMap(({ bindings }) => bindings.flatMap(({ generatorIds }) => generatorIds)))].map((id) => ({ id }));
|
|
462
|
+
/**
|
|
463
|
+
* 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.
|
|
464
|
+
*/
|
|
465
|
+
function sqlIntegerArgumentGeneratorFunctions({ integer }) {
|
|
466
|
+
return [
|
|
467
|
+
{
|
|
468
|
+
name: "uuid",
|
|
469
|
+
signature: (dataTypes) => uuidSignature(integer, dataTypes),
|
|
470
|
+
bindings: []
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: "cuid",
|
|
474
|
+
signature: (dataTypes) => cuidSignature(integer, dataTypes),
|
|
475
|
+
bindings: []
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: "nanoid",
|
|
479
|
+
signature: (dataTypes) => nanoidSignature(integer, dataTypes),
|
|
480
|
+
bindings: []
|
|
481
|
+
}
|
|
482
|
+
];
|
|
483
|
+
}
|
|
484
|
+
function uuidSignature(integer, dataTypes) {
|
|
485
|
+
const versions = [UUID_VERSIONS.v4, UUID_VERSIONS.v7];
|
|
486
|
+
return {
|
|
487
|
+
documentation: "Generates a UUID when a value is not supplied.",
|
|
488
|
+
positional: [{
|
|
489
|
+
key: "version",
|
|
490
|
+
type: 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}`)),
|
|
491
|
+
documentation: `The UUID version: \`${UUID_VERSIONS.v4}\` or \`${UUID_VERSIONS.v7}\`. Defaults to \`${UUID_VERSIONS.v4}\`.`
|
|
492
|
+
}]
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
function cuidSignature(integer, dataTypes) {
|
|
496
|
+
return {
|
|
497
|
+
documentation: "Generates a CUID2 identifier when a value is not supplied.",
|
|
498
|
+
positional: [{
|
|
499
|
+
key: "version",
|
|
500
|
+
type: checkedInteger(integer, dataTypes, listed([CUID_VERSION]), (version, written) => version === CUID_VERSION ? void 0 : `cuid: version must be ${CUID_VERSION}, got ${written}`),
|
|
501
|
+
documentation: `The CUID version. Only \`${CUID_VERSION}\` is supported.`
|
|
502
|
+
}]
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function nanoidSignature(integer, dataTypes) {
|
|
506
|
+
return {
|
|
507
|
+
documentation: "Generates a Nano ID when a value is not supplied.",
|
|
508
|
+
positional: [{
|
|
509
|
+
key: "size",
|
|
510
|
+
type: optional(checkedInteger(integer, dataTypes, {
|
|
511
|
+
label: `integer from ${NANOID_SIZE.min} to ${NANOID_SIZE.max}`,
|
|
512
|
+
suggestions: []
|
|
513
|
+
}, (size, written) => isNanoidSize(size) ? void 0 : `nanoid: size must be between ${NANOID_SIZE.min} and ${NANOID_SIZE.max}, got ${written}`)),
|
|
514
|
+
documentation: `The identifier length, from \`${NANOID_SIZE.min}\` through \`${NANOID_SIZE.max}\`. Defaults to ${NANOID_DEFAULT_SIZE}.`
|
|
515
|
+
}]
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
/** The label and completion suggestions of an argument that takes one of `values`. */
|
|
519
|
+
function listed(values) {
|
|
520
|
+
const suggestions = values.map(String);
|
|
521
|
+
return {
|
|
522
|
+
label: suggestions.join(" | "),
|
|
523
|
+
suggestions
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* One value of the integer data type, as a number, refused at the argument with the function's message when `refusal` returns one.
|
|
528
|
+
*/
|
|
529
|
+
function checkedInteger(integer, dataTypes, allowed, refusal) {
|
|
530
|
+
return refineArg(dataTypeValue(integer, dataTypes, allowed), ({ value }, arg, ctx) => {
|
|
531
|
+
const stored = value.value;
|
|
532
|
+
if (typeof stored !== "number" && typeof stored !== "string") throw new InternalError(`Data type "${integer}" stores an integer as ${typeof stored}, not a number or digit text.`);
|
|
533
|
+
const message = refusal(Number(stored), String(stored));
|
|
534
|
+
return message === void 0 ? ok(blindCast(Number(stored))) : notOk([leafDiagnostic(ctx, arg, message, "PSL_INVALID_GENERATOR_ARGUMENT")]);
|
|
535
|
+
});
|
|
536
|
+
}
|
|
480
537
|
//#endregion
|
|
481
|
-
export { sqlFamilyGeneratorDescriptors as a, sqlFamilyEntityTypes as i, sqlFamilyAuthoringFieldPresets as n, sqlFamilyGeneratorFunctions as o, sqlFamilyAuthoringTypes as r, sqlFamilyPslBlockDescriptors as s, idGeneratorFunctionBindings as t };
|
|
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 };
|
|
482
539
|
|
|
483
|
-
//# sourceMappingURL=generator-functions-
|
|
540
|
+
//# sourceMappingURL=generator-functions-DErXcNG5-nKYm5qLY.mjs.map
|