@prisma/orm-family-sql 8.0.0-rc.11-dev.21 → 8.0.0-rc.11-dev.23
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/contract-prisma7__provider.mjs +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__default-table-name.d.mts +7 -0
- package/dist/contract-psl__default-table-name.d.mts.map +1 -0
- package/dist/contract-psl__default-table-name.mjs +2 -0
- package/dist/contract-psl__provider.mjs +1 -1
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/{control-CvOB6L1w.d.mts → control-BbwkxMMY.d.mts} +26 -3
- package/dist/{control-CvOB6L1w.d.mts.map → control-BbwkxMMY.d.mts.map} +1 -1
- package/dist/{control-DVNPQod2.mjs → control-CtBvtfSa.mjs} +56 -3
- package/dist/control-CtBvtfSa.mjs.map +1 -0
- package/dist/default-table-name-BfFY8qYR-lHNcVmY5.mjs +9 -0
- package/dist/default-table-name-BfFY8qYR-lHNcVmY5.mjs.map +1 -0
- package/dist/{diff-Dz5kQO4e.d.mts → diff-DkowDnsu.d.mts} +2 -2
- package/dist/{diff-Dz5kQO4e.d.mts.map → diff-DkowDnsu.d.mts.map} +1 -1
- package/dist/family.d.mts +5 -5
- package/dist/family.mjs +3 -3
- 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__psl-infer.mjs +1 -1
- package/dist/{interpreter-DAdB9lVL-qgJYQ9Yz.mjs → interpreter-9qyRPSGy-ufALmXNY.mjs} +5 -8
- package/dist/interpreter-9qyRPSGy-ufALmXNY.mjs.map +1 -0
- package/dist/{migration-D5C6JC3c.d.mts → migration-CYCOGLPS.d.mts} +2 -2
- package/dist/{migration-D5C6JC3c.d.mts.map → migration-CYCOGLPS.d.mts.map} +1 -1
- package/dist/{psl-infer-CPQSp4tG.mjs → psl-infer-DyRJ8dw6.mjs} +3 -2
- package/dist/psl-infer-DyRJ8dw6.mjs.map +1 -0
- package/dist/{types-IqZMLrFC-BAUPBjE5.d.mts → types-BFPRCYGW-BmBCa10J.d.mts} +3 -3
- package/dist/{types-IqZMLrFC-BAUPBjE5.d.mts.map → types-BFPRCYGW-BmBCa10J.d.mts.map} +1 -1
- package/package.json +19 -18
- package/dist/control-DVNPQod2.mjs.map +0 -1
- package/dist/interpreter-DAdB9lVL-qgJYQ9Yz.mjs.map +0 -1
- package/dist/psl-infer-CPQSp4tG.mjs.map +0 -1
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { o as extractCodecControlHooks } from "./schema-verify-C_PEdlAr-CmXrFuW1.mjs";
|
|
2
2
|
import { a as temporalStringAuthoringPresets, i as temporalCodecPresetWithPrecision, n as temporalAuthoringPresets, o as timestampNowControlDescriptor, r as temporalCodecPreset, t as TIMESTAMP_NOW_GENERATOR_ID } from "./timestamp-now-generator-BZnBo7IC-DbN5Apqe.mjs";
|
|
3
|
-
import { a as
|
|
4
|
-
export { INIT_ADDITIVE_POLICY, TIMESTAMP_NOW_GENERATOR_ID, assembleAuthoringContributions, buildNativeTypeExpander, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, control_default as default, detectDestructiveChanges, extractCodecControlHooks, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, plannerSuccess, runnerFailure, runnerSuccess, temporalAuthoringPresets, temporalCodecPreset, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowControlDescriptor };
|
|
3
|
+
import { _ as runnerFailure, a as contractNamespaceToSchemaIR, c as control_default, d as detectTableNameCaseChanges, f as partitionCallsByControlPolicy, g as plannerSuccess, h as plannerFailure, i as buildNativeTypeExpander, l as createMigrationPlan, m as planFieldEventOperations, n as TABLE_NAME_CASE_CHANGED_CODE, o as contractToSchemaIR, p as partitionIssuesByControlPolicy, r as assembleAuthoringContributions, s as controlPolicyForCall, t as INIT_ADDITIVE_POLICY, u as detectDestructiveChanges, v as runnerSuccess } from "./control-CtBvtfSa.mjs";
|
|
4
|
+
export { INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, TIMESTAMP_NOW_GENERATOR_ID, assembleAuthoringContributions, buildNativeTypeExpander, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, plannerSuccess, runnerFailure, runnerSuccess, temporalAuthoringPresets, temporalCodecPreset, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowControlDescriptor };
|
package/dist/family__diff.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { o as arraysEqual, r as NativeTypeNormalizer } from "./control-adapter-C99J7aEF-BLc1Uog8.mjs";
|
|
2
|
-
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-
|
|
2
|
+
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-DkowDnsu.mjs";
|
|
3
3
|
export { type NativeTypeNormalizer, 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-CYCOGLPS.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as mapDefault, c as toEnumName, i as inferRelations, l as toFieldName, n as deriveBackRelationFieldName, o as pluralize, r as deriveRelationFieldName, s as toEnumMemberName, t as buildChildRelationField, u as toModelName } from "./psl-infer-
|
|
1
|
+
import { a as mapDefault, c as toEnumName, i as inferRelations, l as toFieldName, n as deriveBackRelationFieldName, o as pluralize, r as deriveRelationFieldName, s as toEnumMemberName, t as buildChildRelationField, u as toModelName } from "./psl-infer-DyRJ8dw6.mjs";
|
|
2
2
|
export { buildChildRelationField, deriveBackRelationFieldName, deriveRelationFieldName, inferRelations, mapDefault, pluralize, toEnumMemberName, toEnumName, toFieldName, toModelName };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
2
2
|
import { n as buildSqlContractFromDefinition } from "./derived-checks-DGjY5t7S-CzJmkeZR.mjs";
|
|
3
3
|
import { a as interpretFieldAttribute, i as findModelAttributeNode, n as fieldSpecContext, o as interpretModelAttribute, r as findFieldAttributeNode, s as sqlAttributeSpecs, t as PSL_CHECK_ON_STI_VARIANT } from "./sql-attribute-specs-DWUP6JTq-5-fgijvM.mjs";
|
|
4
|
+
import { t as defaultTableName } from "./default-table-name-BfFY8qYR-lHNcVmY5.mjs";
|
|
4
5
|
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
5
6
|
import { hasRegisteredFieldNamespace, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, validateAuthoringHelperArguments } from "@prisma/orm-framework/components/authoring";
|
|
6
7
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
@@ -13,14 +14,10 @@ import { resolveToOneRelationNullable } from "@prisma/orm-framework/contract-aut
|
|
|
13
14
|
import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
|
|
14
15
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
15
16
|
import { consumeInvalidFkPairing, fkRelationPairKey, requiredOneToOneBackrelationDiagnostic } from "@prisma/orm-framework/psl-parser/interpret";
|
|
16
|
-
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-
|
|
17
|
+
//#region ../../../2-sql/2-authoring/contract-psl/dist/interpreter-9qyRPSGy.mjs
|
|
17
18
|
function contractError(code, message, options) {
|
|
18
19
|
return structuredError(code, message, options);
|
|
19
20
|
}
|
|
20
|
-
function lowerFirst(value) {
|
|
21
|
-
if (value.length === 0) return value;
|
|
22
|
-
return value[0]?.toLowerCase() + value.slice(1);
|
|
23
|
-
}
|
|
24
21
|
function getAttribute(attributes, name) {
|
|
25
22
|
return attributes?.find((attribute) => attribute.name === name);
|
|
26
23
|
}
|
|
@@ -1267,14 +1264,14 @@ function buildModelMappings(modelEntries, defaultNamespaceId, diagnostics, sourc
|
|
|
1267
1264
|
const result = /* @__PURE__ */ new Map();
|
|
1268
1265
|
for (const { model, namespaceId } of modelEntries) {
|
|
1269
1266
|
const mapNode = findModelAttributeNode(model, "map");
|
|
1270
|
-
const tableName = mapNode === void 0 ?
|
|
1267
|
+
const tableName = mapNode === void 0 ? defaultTableName(model.name) : interpretModelAttribute({
|
|
1271
1268
|
node: mapNode,
|
|
1272
1269
|
spec: sqlAttributeSpecs.model.map(),
|
|
1273
1270
|
model,
|
|
1274
1271
|
sourceFile,
|
|
1275
1272
|
sourceId,
|
|
1276
1273
|
diagnostics
|
|
1277
|
-
})?.name ??
|
|
1274
|
+
})?.name ?? defaultTableName(model.name);
|
|
1278
1275
|
const fieldColumns = /* @__PURE__ */ new Map();
|
|
1279
1276
|
for (const field of Object.values(model.fields)) {
|
|
1280
1277
|
const fieldMapNode = findFieldAttributeNode(field, "map");
|
|
@@ -3542,4 +3539,4 @@ function interpretPslDocumentToSqlContract(input) {
|
|
|
3542
3539
|
//#endregion
|
|
3543
3540
|
export { normalizeReferentialAction as a, interpretPslDocumentToSqlContract as i, buildEntityTypesByDiscriminator as n, numberLiteralDefault as o, indexFkRelations as r, resolveFieldTypeDescriptor as s, applyBackrelationCandidates as t };
|
|
3544
3541
|
|
|
3545
|
-
//# sourceMappingURL=interpreter-
|
|
3542
|
+
//# sourceMappingURL=interpreter-9qyRPSGy-ufALmXNY.mjs.map
|