@dbml/core 6.4.0 → 6.5.0
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/lib/index.cjs +19 -19
- package/lib/index.mjs +21449 -21402
- package/package.json +3 -3
- package/types/model_structure/check.d.ts +1 -1
- package/types/model_structure/database.d.ts +1 -0
- package/types/model_structure/dbState.d.ts +1 -1
- package/types/model_structure/enum.d.ts +1 -1
- package/types/model_structure/enumValue.d.ts +1 -1
- package/types/model_structure/indexColumn.d.ts +9 -1
- package/types/model_structure/indexes.d.ts +1 -1
- package/types/model_structure/ref.d.ts +1 -1
- package/types/model_structure/table.d.ts +5 -2
- package/types/model_structure/tableGroup.d.ts +1 -1
- package/types/model_structure/tablePartial.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/core",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.5.0",
|
|
5
5
|
"description": "> TODO: description",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:fix": "eslint --fix ."
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@dbml/parse": "^6.
|
|
49
|
+
"@dbml/parse": "^6.5.0",
|
|
50
50
|
"antlr4": "^4.13.1",
|
|
51
51
|
"lodash": "^4.17.15",
|
|
52
52
|
"lodash-es": "^4.17.15",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"bluebird": "^3.5.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9ed15e01a00d4f58564ccdfb75f2f85bf5de5199",
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=16"
|
|
63
63
|
}
|
|
@@ -2,7 +2,7 @@ import { NormalizedModel } from './database';
|
|
|
2
2
|
import DbState from './dbState';
|
|
3
3
|
import Element, { Token, RawNote } from './element';
|
|
4
4
|
import Enum from './enum';
|
|
5
|
-
interface RawEnumValue {
|
|
5
|
+
export interface RawEnumValue {
|
|
6
6
|
name: string;
|
|
7
7
|
token: Token;
|
|
8
8
|
note: RawNote;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { NormalizedModel } from './database';
|
|
2
2
|
import DbState from './dbState';
|
|
3
|
-
import Element from './element';
|
|
3
|
+
import Element, { Token } from './element';
|
|
4
4
|
import Index from './indexes';
|
|
5
|
+
|
|
6
|
+
export interface RawIndexColumn {
|
|
7
|
+
type: any;
|
|
8
|
+
value: any;
|
|
9
|
+
index: Index;
|
|
10
|
+
token: Token;
|
|
11
|
+
}
|
|
12
|
+
|
|
5
13
|
declare class IndexColumn extends Element {
|
|
6
14
|
type: any;
|
|
7
15
|
value: any;
|
|
@@ -4,7 +4,7 @@ import Element, { RawNote, Token } from './element';
|
|
|
4
4
|
import IndexColumn from './indexColumn';
|
|
5
5
|
import Table from './table';
|
|
6
6
|
import TablePartial from './tablePartial';
|
|
7
|
-
interface RawIndex {
|
|
7
|
+
export interface RawIndex {
|
|
8
8
|
columns: IndexColumn;
|
|
9
9
|
type: any;
|
|
10
10
|
unique: boolean;
|
|
@@ -4,7 +4,7 @@ import Schema from './schema';
|
|
|
4
4
|
import DbState from './dbState';
|
|
5
5
|
import Database, { NormalizedModel } from './database';
|
|
6
6
|
import TablePartial from './tablePartial';
|
|
7
|
-
interface RawRef {
|
|
7
|
+
export interface RawRef {
|
|
8
8
|
name: string;
|
|
9
9
|
color?: string;
|
|
10
10
|
endpoints: Endpoint[];
|
|
@@ -6,9 +6,9 @@ import Schema from './schema';
|
|
|
6
6
|
import DbState from './dbState';
|
|
7
7
|
import TableGroup from './tableGroup';
|
|
8
8
|
import TablePartial from './tablePartial';
|
|
9
|
-
import { NormalizedModel } from './database';
|
|
9
|
+
import { NormalizedModel, TableRecord } from './database';
|
|
10
10
|
|
|
11
|
-
interface RawTable {
|
|
11
|
+
export interface RawTable {
|
|
12
12
|
name: string;
|
|
13
13
|
alias: string;
|
|
14
14
|
note: RawNote;
|
|
@@ -35,6 +35,7 @@ declare class Table extends Element {
|
|
|
35
35
|
id: number;
|
|
36
36
|
group: TableGroup;
|
|
37
37
|
partials: TablePartial[];
|
|
38
|
+
records: TableRecord[];
|
|
38
39
|
|
|
39
40
|
constructor({ name, alias, note, fields, indexes, checks, schema, token, headerColor }: RawTable);
|
|
40
41
|
generateId(): void;
|
|
@@ -115,6 +116,7 @@ declare class Table extends Element {
|
|
|
115
116
|
note: string;
|
|
116
117
|
headerColor: string;
|
|
117
118
|
partials: TablePartial[];
|
|
119
|
+
recordIds: number[];
|
|
118
120
|
};
|
|
119
121
|
normalize(model: NormalizedModel): void;
|
|
120
122
|
}
|
|
@@ -128,6 +130,7 @@ export interface NormalizedTable {
|
|
|
128
130
|
fieldIds: number[];
|
|
129
131
|
indexIds: number[];
|
|
130
132
|
checkIds: number[];
|
|
133
|
+
recordIds: number[];
|
|
131
134
|
schemaId: number;
|
|
132
135
|
groupId: number | null;
|
|
133
136
|
partials: TablePartial[];
|