@prisma/orm-family-sql 8.0.0-rc.20-dev.1 → 8.0.0-rc.20-dev.3
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/{control-BK50zF6c.mjs → control-CtSZTCTp.mjs} +69 -12
- package/dist/control-CtSZTCTp.mjs.map +1 -0
- package/dist/{dist-CMDXybwm.mjs → dist-CB2NpcCs.mjs} +4 -1
- package/dist/{dist-CMDXybwm.mjs.map → dist-CB2NpcCs.mjs.map} +1 -1
- package/dist/errors.d.mts +3 -0
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/family.mjs +3 -3
- package/dist/family__control.mjs +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/{generator-functions-D_qdqBV--Bq296cED.mjs → generator-functions-Cg5QkM46-D6M4ayK9.mjs} +5 -6
- package/dist/{generator-functions-D_qdqBV--Bq296cED.mjs.map → generator-functions-Cg5QkM46-D6M4ayK9.mjs.map} +1 -1
- package/dist/orm-client.mjs +1 -1
- package/dist/{pack-gSvGQWqs.mjs → pack-CNrW7w8L.mjs} +2 -2
- package/dist/{pack-gSvGQWqs.mjs.map → pack-CNrW7w8L.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/control-BK50zF6c.mjs.map +0 -1
|
@@ -9,7 +9,7 @@ import { g as valueObjectStorageTypeMissingMessage } from "./validators-BwA7ttZM
|
|
|
9
9
|
import { a as describeUnsupportedSqlAttribute, b as sqlAttributeSpecs } from "./psl-field-resolution-C5KQ7kzP-B0NwuRWV.mjs";
|
|
10
10
|
import { t as describeUnresolvedSqlType } from "./diagnostics-RHJxoiIk.mjs";
|
|
11
11
|
import { t as sqlEmission } from "./dist-C8Y-PPuE.mjs";
|
|
12
|
-
import { a as sqlFamilyGeneratorDescriptors, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors } from "./generator-functions-
|
|
12
|
+
import { a as sqlFamilyGeneratorDescriptors, i as sqlFamilyEntityTypes, n as sqlFamilyAuthoringFieldPresets, o as sqlFamilyGeneratorFunctions, r as sqlFamilyAuthoringTypes, s as sqlFamilyPslBlockDescriptors } from "./generator-functions-Cg5QkM46-D6M4ayK9.mjs";
|
|
13
13
|
import { c as verifySqlSchemaByDiff, n as classifyDiffSubjectGranularity, o as enforceSqlDataTypeInvariants, t as classifyDiffEntityKind } from "./schema-verify-C3wbdviw-DMjIubOr.mjs";
|
|
14
14
|
import { t as sqlFamilyError } from "./errors-B5g0xWro-C8plbqga.mjs";
|
|
15
15
|
import { t as SqlContractSerializer } from "./sql-contract-serializer-sMY3prTx-D2BfrNxs.mjs";
|
|
@@ -662,11 +662,24 @@ function createSqlFamilyInstance(stack) {
|
|
|
662
662
|
const children = [];
|
|
663
663
|
const columnNodes = [];
|
|
664
664
|
for (const [columnName, column] of Object.entries(table.columns)) {
|
|
665
|
-
const
|
|
665
|
+
const typeDisplay = column.typeText;
|
|
666
|
+
const nullability = column.nullable ? "nullable" : "not nullable";
|
|
666
667
|
columnNodes.push(new SchemaTreeNode({
|
|
667
668
|
kind: "field",
|
|
668
669
|
id: `column-${displayName}-${columnName}`,
|
|
669
|
-
|
|
670
|
+
labelParts: [
|
|
671
|
+
{
|
|
672
|
+
text: columnName,
|
|
673
|
+
role: "name"
|
|
674
|
+
},
|
|
675
|
+
{ text: ": " },
|
|
676
|
+
{ text: typeDisplay },
|
|
677
|
+
{ text: " " },
|
|
678
|
+
{
|
|
679
|
+
text: `(${nullability})`,
|
|
680
|
+
role: "detail"
|
|
681
|
+
}
|
|
682
|
+
],
|
|
670
683
|
meta: {
|
|
671
684
|
typeText: column.typeText,
|
|
672
685
|
nullable: column.nullable,
|
|
@@ -677,7 +690,10 @@ function createSqlFamilyInstance(stack) {
|
|
|
677
690
|
if (columnNodes.length > 0) children.push(new SchemaTreeNode({
|
|
678
691
|
kind: "collection",
|
|
679
692
|
id: `columns-${displayName}`,
|
|
680
|
-
|
|
693
|
+
labelParts: [{
|
|
694
|
+
text: "columns",
|
|
695
|
+
role: "keyword"
|
|
696
|
+
}],
|
|
681
697
|
children: columnNodes
|
|
682
698
|
}));
|
|
683
699
|
if (table.primaryKey) {
|
|
@@ -685,7 +701,17 @@ function createSqlFamilyInstance(stack) {
|
|
|
685
701
|
children.push(new SchemaTreeNode({
|
|
686
702
|
kind: "index",
|
|
687
703
|
id: `primary-key-${displayName}`,
|
|
688
|
-
|
|
704
|
+
labelParts: [
|
|
705
|
+
{
|
|
706
|
+
text: "primary key",
|
|
707
|
+
role: "keyword"
|
|
708
|
+
},
|
|
709
|
+
{ text: ": " },
|
|
710
|
+
{
|
|
711
|
+
text: pkColumns,
|
|
712
|
+
role: "name"
|
|
713
|
+
}
|
|
714
|
+
],
|
|
689
715
|
meta: {
|
|
690
716
|
columns: table.primaryKey.columns,
|
|
691
717
|
...table.primaryKey.name ? { name: table.primaryKey.name } : {}
|
|
@@ -694,11 +720,20 @@ function createSqlFamilyInstance(stack) {
|
|
|
694
720
|
}
|
|
695
721
|
for (const unique of table.uniques) {
|
|
696
722
|
const name = unique.name ?? `${tableName}_${unique.columns.join("_")}_unique`;
|
|
697
|
-
const label = `unique ${name}`;
|
|
698
723
|
children.push(new SchemaTreeNode({
|
|
699
724
|
kind: "index",
|
|
700
725
|
id: `unique-${displayName}-${name}`,
|
|
701
|
-
|
|
726
|
+
labelParts: [
|
|
727
|
+
{
|
|
728
|
+
text: "unique",
|
|
729
|
+
role: "keyword"
|
|
730
|
+
},
|
|
731
|
+
{ text: " " },
|
|
732
|
+
{
|
|
733
|
+
text: name,
|
|
734
|
+
role: "name"
|
|
735
|
+
}
|
|
736
|
+
],
|
|
702
737
|
meta: {
|
|
703
738
|
columns: unique.columns,
|
|
704
739
|
unique: true
|
|
@@ -707,11 +742,20 @@ function createSqlFamilyInstance(stack) {
|
|
|
707
742
|
}
|
|
708
743
|
for (const index of table.indexes) {
|
|
709
744
|
const name = index.name;
|
|
710
|
-
const label = index.unique ? `unique index ${name}` : `index ${name}`;
|
|
711
745
|
children.push(new SchemaTreeNode({
|
|
712
746
|
kind: "index",
|
|
713
747
|
id: `index-${displayName}-${name}`,
|
|
714
|
-
|
|
748
|
+
labelParts: [
|
|
749
|
+
{
|
|
750
|
+
text: index.unique ? "unique index" : "index",
|
|
751
|
+
role: "keyword"
|
|
752
|
+
},
|
|
753
|
+
{ text: " " },
|
|
754
|
+
{
|
|
755
|
+
text: name,
|
|
756
|
+
role: "name"
|
|
757
|
+
}
|
|
758
|
+
],
|
|
715
759
|
meta: {
|
|
716
760
|
columns: index.columns,
|
|
717
761
|
unique: index.unique
|
|
@@ -732,7 +776,17 @@ function createSqlFamilyInstance(stack) {
|
|
|
732
776
|
return new SchemaTreeNode({
|
|
733
777
|
kind: "entity",
|
|
734
778
|
id: `table-${displayName}`,
|
|
735
|
-
|
|
779
|
+
labelParts: [
|
|
780
|
+
{
|
|
781
|
+
text: "table",
|
|
782
|
+
role: "keyword"
|
|
783
|
+
},
|
|
784
|
+
{ text: " " },
|
|
785
|
+
{
|
|
786
|
+
text: displayName,
|
|
787
|
+
role: "name"
|
|
788
|
+
}
|
|
789
|
+
],
|
|
736
790
|
...Object.keys(tableMeta).length > 0 ? { meta: tableMeta } : {},
|
|
737
791
|
...children.length > 0 ? { children } : {}
|
|
738
792
|
});
|
|
@@ -740,7 +794,10 @@ function createSqlFamilyInstance(stack) {
|
|
|
740
794
|
return { root: new SchemaTreeNode({
|
|
741
795
|
kind: "root",
|
|
742
796
|
id: "sql-schema",
|
|
743
|
-
|
|
797
|
+
labelParts: [{
|
|
798
|
+
text: "database",
|
|
799
|
+
role: "title"
|
|
800
|
+
}],
|
|
744
801
|
...tableNodes.length > 0 ? { children: tableNodes } : {}
|
|
745
802
|
}) };
|
|
746
803
|
}
|
|
@@ -2718,4 +2775,4 @@ var control_default = new SqlFamilyDescriptor();
|
|
|
2718
2775
|
//#endregion
|
|
2719
2776
|
export { unmatchedColumnRename as $, planFieldEventOperations as A, resolveTableRenameAgainst as B, fieldStatementColumns as C, partitionCallsByControlPolicy as D, otherSpaceDeclaring as E, readReportedDefault as F, slotSource as G, rowsWithoutValueSummary as H, requiredColumnMeta as I, sqlTypeLookupsOf as J, sqlDefaultFunctions as K, requiredColumnOf as L, plannerFailure as M, plannerSuccess as N, partitionIssuesByControlPolicy as O, readColumnDefault as P, unknownCallNames as Q, requiredColumnsOfMigration as R, fieldRenameStorageEffect as S, modelRenameStorageEffect as T, runnerFailure as U, rowsWithoutValueFailure as V, runnerSuccess as W, subjectsOfCalls as X, storageNameOfOperation as Y, unconvertedFieldOf as Z, createSqlTextSources as _, appliedStatementsInOrder as a, fieldEventStorage as b, checkSqlExpressionText as c, contractNamespaceToSchemaIR as d, unmatchedTableRename as et, contractToSchemaIR as f, createMigrationPlan as g, convertedColumnOf as h, TABLE_NAME_CASE_CHANGED_CODE as i, planStatements as j, planFieldEventCalls as k, columnTakesTemporaryValue as l, convertedColumnMeta as m, INIT_ADDITIVE_POLICY as n, assembleAuthoringContributions$1 as o, control_default as p, sqlOfSlot as q, NO_RENAMED_ORIGINS as r, backfillOfDefaultedField as s, COLUMN_RENAME_UNMATCHED_CODE as t, contractColumns as u, detectDestructiveChanges as v, isUnfilledSlot as w, fieldOfColumn as x, detectTableNameCaseChanges as y, resolveColumnRenameAgainst as z };
|
|
2720
2777
|
|
|
2721
|
-
//# sourceMappingURL=control-
|
|
2778
|
+
//# sourceMappingURL=control-CtSZTCTp.mjs.map
|