@dbml/parse 8.3.0 → 9.0.0-alpha.1
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/LICENSE +0 -0
- package/dist/__benchmarks__/compiler.benchmark.d.ts +0 -0
- package/dist/__benchmarks__/compiler.profile.d.ts +0 -0
- package/dist/dbml-parse.js +15 -15
- package/dist/dbml-parse.mjs +3116 -2658
- package/dist/index.d.ts +0 -0
- package/dist/src/compiler/index.d.ts +0 -0
- package/dist/src/compiler/projectLayout/index.d.ts +0 -0
- package/dist/src/compiler/projectLayout/layout.d.ts +0 -0
- package/dist/src/compiler/queries/canonicalName.d.ts +0 -0
- package/dist/src/compiler/queries/container/element.d.ts +0 -0
- package/dist/src/compiler/queries/container/index.d.ts +0 -0
- package/dist/src/compiler/queries/container/scope.d.ts +0 -0
- package/dist/src/compiler/queries/container/scopeKind.d.ts +0 -0
- package/dist/src/compiler/queries/container/stack.d.ts +0 -0
- package/dist/src/compiler/queries/container/token.d.ts +0 -0
- package/dist/src/compiler/queries/files/fileDependencies.d.ts +0 -0
- package/dist/src/compiler/queries/files/reachableFiles.d.ts +0 -0
- package/dist/src/compiler/queries/files/usableMembers.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/parse.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/symbol.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/token.d.ts +0 -0
- package/dist/src/compiler/queries/nodeAtPosition.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/bind.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/index.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/interpret.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/parse.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/validate.d.ts +0 -0
- package/dist/src/compiler/queries/resolutionIndex.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/lookupMembers.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/symbolAliases.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/symbolUses.d.ts +0 -0
- package/dist/src/compiler/queries/transform/applyTextEdits.d.ts +0 -0
- package/dist/src/compiler/queries/transform/index.d.ts +0 -0
- package/dist/src/compiler/queries/transform/renameTable.d.ts +0 -0
- package/dist/src/compiler/queries/transform/syncDiagramView.d.ts +0 -0
- package/dist/src/compiler/queries/transform/utils.d.ts +0 -0
- package/dist/src/compiler/queries/utils.d.ts +0 -0
- package/dist/src/compiler/types.d.ts +0 -0
- package/dist/src/constants.d.ts +0 -0
- package/dist/src/core/global_modules/checks/bind.d.ts +0 -0
- package/dist/src/core/global_modules/checks/index.d.ts +0 -0
- package/dist/src/core/global_modules/checks/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/dep/bind.d.ts +15 -0
- package/dist/src/core/global_modules/dep/index.d.ts +2 -0
- package/dist/src/core/global_modules/dep/interpret.d.ts +34 -0
- package/dist/src/core/global_modules/diagramView/bind.d.ts +0 -0
- package/dist/src/core/global_modules/diagramView/index.d.ts +0 -0
- package/dist/src/core/global_modules/diagramView/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/enum/bind.d.ts +0 -0
- package/dist/src/core/global_modules/enum/index.d.ts +0 -0
- package/dist/src/core/global_modules/enum/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/index.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/bind.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/index.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/note/bind.d.ts +0 -0
- package/dist/src/core/global_modules/note/index.d.ts +0 -0
- package/dist/src/core/global_modules/note/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/program/bind.d.ts +0 -0
- package/dist/src/core/global_modules/program/index.d.ts +0 -0
- package/dist/src/core/global_modules/program/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/program/utils.d.ts +0 -0
- package/dist/src/core/global_modules/project/bind.d.ts +0 -0
- package/dist/src/core/global_modules/project/index.d.ts +0 -0
- package/dist/src/core/global_modules/project/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/records/bind.d.ts +0 -0
- package/dist/src/core/global_modules/records/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/fk.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/helper.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/pk.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/unique.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/sqlTypes.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/values.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/index.d.ts +0 -0
- package/dist/src/core/global_modules/ref/bind.d.ts +0 -0
- package/dist/src/core/global_modules/ref/index.d.ts +1 -0
- package/dist/src/core/global_modules/ref/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/schema/index.d.ts +0 -0
- package/dist/src/core/global_modules/table/bind.d.ts +2 -0
- package/dist/src/core/global_modules/table/index.d.ts +0 -0
- package/dist/src/core/global_modules/table/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/table/utils.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/bind.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/index.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/bind.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/index.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/types.d.ts +0 -0
- package/dist/src/core/global_modules/use/index.d.ts +0 -0
- package/dist/src/core/global_modules/utils.d.ts +0 -0
- package/dist/src/core/lexer/lexer.d.ts +0 -0
- package/dist/src/core/lexer/utils.d.ts +0 -0
- package/dist/src/core/local_modules/checks/index.d.ts +0 -0
- package/dist/src/core/local_modules/checks/validate.d.ts +0 -0
- package/dist/src/core/local_modules/custom/index.d.ts +0 -0
- package/dist/src/core/local_modules/custom/validate.d.ts +0 -0
- package/dist/src/core/local_modules/dep/index.d.ts +2 -0
- package/dist/src/core/local_modules/dep/validate.d.ts +18 -0
- package/dist/src/core/local_modules/diagramView/index.d.ts +0 -0
- package/dist/src/core/local_modules/diagramView/validate.d.ts +0 -0
- package/dist/src/core/local_modules/enum/index.d.ts +0 -0
- package/dist/src/core/local_modules/enum/validate.d.ts +0 -0
- package/dist/src/core/local_modules/index.d.ts +0 -0
- package/dist/src/core/local_modules/indexes/index.d.ts +0 -0
- package/dist/src/core/local_modules/indexes/validate.d.ts +0 -0
- package/dist/src/core/local_modules/note/index.d.ts +0 -0
- package/dist/src/core/local_modules/note/validate.d.ts +0 -0
- package/dist/src/core/local_modules/program/index.d.ts +0 -0
- package/dist/src/core/local_modules/program/validate.d.ts +0 -0
- package/dist/src/core/local_modules/project/index.d.ts +0 -0
- package/dist/src/core/local_modules/project/validate.d.ts +0 -0
- package/dist/src/core/local_modules/records/index.d.ts +0 -0
- package/dist/src/core/local_modules/records/validate.d.ts +0 -0
- package/dist/src/core/local_modules/ref/index.d.ts +0 -0
- package/dist/src/core/local_modules/ref/validate.d.ts +0 -0
- package/dist/src/core/local_modules/table/index.d.ts +0 -0
- package/dist/src/core/local_modules/table/validate.d.ts +0 -0
- package/dist/src/core/local_modules/tableGroup/index.d.ts +0 -0
- package/dist/src/core/local_modules/tableGroup/validate.d.ts +0 -0
- package/dist/src/core/local_modules/tablePartial/index.d.ts +0 -0
- package/dist/src/core/local_modules/tablePartial/validate.d.ts +0 -0
- package/dist/src/core/local_modules/types.d.ts +0 -0
- package/dist/src/core/local_modules/use/index.d.ts +0 -0
- package/dist/src/core/local_modules/use/validate.d.ts +0 -0
- package/dist/src/core/parser/contextStack.d.ts +0 -0
- package/dist/src/core/parser/factory.d.ts +0 -0
- package/dist/src/core/parser/parser.d.ts +0 -0
- package/dist/src/core/parser/utils.d.ts +0 -0
- package/dist/src/core/types/errors.d.ts +52 -50
- package/dist/src/core/types/filepath.d.ts +0 -0
- package/dist/src/core/types/index.d.ts +0 -0
- package/dist/src/core/types/internable.d.ts +0 -0
- package/dist/src/core/types/keywords.d.ts +2 -0
- package/dist/src/core/types/module.d.ts +0 -0
- package/dist/src/core/types/nodes.d.ts +0 -0
- package/dist/src/core/types/position.d.ts +0 -0
- package/dist/src/core/types/report.d.ts +0 -0
- package/dist/src/core/types/schemaJson.d.ts +32 -1
- package/dist/src/core/types/symbol/factory.d.ts +0 -0
- package/dist/src/core/types/symbol/index.d.ts +0 -0
- package/dist/src/core/types/symbol/metadata.d.ts +15 -1
- package/dist/src/core/types/symbol/symbols.d.ts +0 -0
- package/dist/src/core/types/tokens.d.ts +0 -0
- package/dist/src/core/utils/chars.d.ts +0 -0
- package/dist/src/core/utils/expression.d.ts +0 -0
- package/dist/src/core/utils/interpret.d.ts +0 -0
- package/dist/src/core/utils/numbers.d.ts +0 -0
- package/dist/src/core/utils/span.d.ts +0 -0
- package/dist/src/core/utils/tokens.d.ts +0 -0
- package/dist/src/core/utils/validate.d.ts +0 -0
- package/dist/src/index.d.ts +0 -0
- package/dist/src/services/definition/provider.d.ts +0 -0
- package/dist/src/services/diagnostics/provider.d.ts +0 -0
- package/dist/src/services/index.d.ts +0 -0
- package/dist/src/services/monarch.d.ts +0 -0
- package/dist/src/services/references/provider.d.ts +0 -0
- package/dist/src/services/suggestions/crossFile.d.ts +0 -0
- package/dist/src/services/suggestions/provider.d.ts +0 -0
- package/dist/src/services/suggestions/recordRowSnippet.d.ts +0 -0
- package/dist/src/services/suggestions/use.d.ts +0 -0
- package/dist/src/services/suggestions/utils/index.d.ts +0 -0
- package/dist/src/services/suggestions/utils/useMerger.d.ts +0 -0
- package/dist/src/services/types.d.ts +0 -0
- package/dist/src/services/utils.d.ts +0 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/src/constants.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as Compiler } from '../../../compiler';
|
|
2
|
+
import { CompileError } from '../../types/errors';
|
|
3
|
+
import { ElementDeclarationNode } from '../../types/nodes';
|
|
4
|
+
import { SyntaxToken } from '../../types/tokens';
|
|
5
|
+
export default class DepBinder {
|
|
6
|
+
private compiler;
|
|
7
|
+
private declarationNode;
|
|
8
|
+
constructor(compiler: Compiler, declarationNode: ElementDeclarationNode & {
|
|
9
|
+
type: SyntaxToken;
|
|
10
|
+
});
|
|
11
|
+
bind(): CompileError[];
|
|
12
|
+
private bindBody;
|
|
13
|
+
private bindFields;
|
|
14
|
+
private bindSubElements;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dep } from '../../types/schemaJson';
|
|
2
|
+
import { DepMetadata, Filepath } from '../../types';
|
|
3
|
+
import { default as Compiler } from '../../../compiler';
|
|
4
|
+
import { default as Report } from '../../types/report';
|
|
5
|
+
export declare class DepInterpreter {
|
|
6
|
+
private compiler;
|
|
7
|
+
private metadata;
|
|
8
|
+
private declarationNode;
|
|
9
|
+
private filepath;
|
|
10
|
+
private dep;
|
|
11
|
+
constructor(compiler: Compiler, metadata: DepMetadata, filepath: Filepath);
|
|
12
|
+
interpret(): Report<Dep>;
|
|
13
|
+
private interpretName;
|
|
14
|
+
private interpretEdges;
|
|
15
|
+
/**
|
|
16
|
+
* Read settings into `dep.note` and `dep.custom`.
|
|
17
|
+
*
|
|
18
|
+
* Settings come from THREE sources, in this order:
|
|
19
|
+
* 1. The top-level attribute list on the Dep header
|
|
20
|
+
* (e.g. `Dep my_block [color: 'blue'] { ... }`).
|
|
21
|
+
* 2. Per-field setting lists inside the body
|
|
22
|
+
* (e.g. `Dep { a -> b [note: 'x'] }`).
|
|
23
|
+
* 3. Sub-element declarations inside the body
|
|
24
|
+
* (e.g. `Dep { a -> b; note: 'x'; materialized: 'view' }`).
|
|
25
|
+
*
|
|
26
|
+
* All three sources write into the same `custom` object (with `note`
|
|
27
|
+
* routed to the typed slot instead). Precedence is last-write-wins by
|
|
28
|
+
* virtue of plain object assignment — settings later in the source
|
|
29
|
+
* file overwrite earlier ones with the same key.
|
|
30
|
+
*/
|
|
31
|
+
private interpretSettings;
|
|
32
|
+
private consumeSettings;
|
|
33
|
+
private extractAttrValue;
|
|
34
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,4 +4,5 @@ import { default as Report } from '../../types/report';
|
|
|
4
4
|
import { NodeSymbol } from '../../types/symbol';
|
|
5
5
|
import { GlobalModule } from '../types';
|
|
6
6
|
export declare const refModule: GlobalModule;
|
|
7
|
+
export declare function getDefaultSchemaSymbol(compiler: Compiler, globalSymbol: NodeSymbol): NodeSymbol | undefined;
|
|
7
8
|
export declare function nodeRefereeOfRefEndpoint(compiler: Compiler, globalSymbol: NodeSymbol, node: SyntaxNode): Report<NodeSymbol | undefined>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as Compiler } from '../../../compiler';
|
|
2
|
+
import { CompileError } from '../../types/errors';
|
|
3
|
+
import { BlockExpressionNode, ElementDeclarationNode, FunctionApplicationNode, ListExpressionNode } from '../../types/nodes';
|
|
4
|
+
import { default as Report } from '../../types/report';
|
|
5
|
+
import { Settings } from '../../utils/validate';
|
|
6
|
+
export default class DepValidator {
|
|
7
|
+
private declarationNode;
|
|
8
|
+
private compiler;
|
|
9
|
+
constructor(compiler: Compiler, declarationNode: ElementDeclarationNode);
|
|
10
|
+
validate(): CompileError[];
|
|
11
|
+
private validateContext;
|
|
12
|
+
private validateName;
|
|
13
|
+
private validateAlias;
|
|
14
|
+
validateBody(body?: FunctionApplicationNode | BlockExpressionNode): CompileError[];
|
|
15
|
+
validateFields(fields: FunctionApplicationNode[]): CompileError[];
|
|
16
|
+
private validateSubElements;
|
|
17
|
+
}
|
|
18
|
+
export declare function validateDepSettings(settings: ListExpressionNode): Report<Settings>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -56,56 +56,58 @@ export declare enum CompileErrorCode {
|
|
|
56
56
|
INVALID_REF_FIELD = 3039,
|
|
57
57
|
EMPTY_REF = 3040,
|
|
58
58
|
REF_REDEFINED = 3041,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
59
|
+
INVALID_DEP_CONTEXT = 3042,
|
|
60
|
+
INVALID_DEP_FIELD = 3043,
|
|
61
|
+
INVALID_NOTE_CONTEXT = 3044,
|
|
62
|
+
INVALID_NOTE = 3045,
|
|
63
|
+
NOTE_REDEFINED = 3046,
|
|
64
|
+
NOTE_CONTENT_REDEFINED = 3047,
|
|
65
|
+
EMPTY_NOTE = 3048,
|
|
66
|
+
UNKNOWN_NOTE_SETTING = 3049,
|
|
67
|
+
DUPLICATE_NOTE_SETTING = 3050,
|
|
68
|
+
INVALID_NOTE_SETTING_VALUE = 3051,
|
|
69
|
+
INVALID_INDEXES_CONTEXT = 3052,
|
|
70
|
+
INVALID_INDEXES_FIELD = 3053,
|
|
71
|
+
INVALID_INDEX = 3054,
|
|
72
|
+
UNKNOWN_INDEX_SETTING = 3055,
|
|
73
|
+
DUPLICATE_INDEX_SETTING = 3056,
|
|
74
|
+
UNEXPECTED_INDEX_SETTING_VALUE = 3057,
|
|
75
|
+
INVALID_INDEX_SETTING_VALUE = 3058,
|
|
76
|
+
INVALID_PROJECT_CONTEXT = 3059,
|
|
77
|
+
PROJECT_REDEFINED = 3060,
|
|
78
|
+
INVALID_PROJECT_FIELD = 3061,
|
|
79
|
+
INVALID_CUSTOM_CONTEXT = 3062,
|
|
80
|
+
INVALID_CUSTOM_ELEMENT_VALUE = 3063,
|
|
81
|
+
INVALID_ELEMENT_IN_SIMPLE_BODY = 3064,
|
|
82
|
+
INVALID_TABLE_PARTIAL_CONTEXT = 3065,
|
|
83
|
+
INVALID_TABLE_PARTIAL_ELEMENT_NAME = 3066,
|
|
84
|
+
INVALID_TABLE_PARTIAL_SETTING_VALUE = 3067,
|
|
85
|
+
DUPLICATE_TABLE_PARTIAL_ELEMENT_NAME = 3068,
|
|
86
|
+
DUPLICATE_TABLE_PARTIAL_SETTING = 3069,
|
|
87
|
+
INVALID_TABLE_PARTIAL_INJECTION = 3070,
|
|
88
|
+
INVALID_TABLE_PARTIAL_INJECTION_OP = 3071,
|
|
89
|
+
INVALID_TABLE_PARTIAL_INJECTION_NAME = 3072,
|
|
90
|
+
DUPLICATE_TABLE_PARTIAL_INJECTION_NAME = 3073,
|
|
91
|
+
UNKNOWN_TABLE_PARTIAL_SETTING = 3074,
|
|
92
|
+
INVALID_TABLE_SETTING_VALUE = 3075,
|
|
93
|
+
INVALID_CHECKS_CONTEXT = 3076,
|
|
94
|
+
INVALID_CHECKS_FIELD = 3077,
|
|
95
|
+
INVALID_CHECK = 3078,
|
|
96
|
+
UNKNOWN_CHECK_SETTING = 3079,
|
|
97
|
+
DUPLICATE_CHECK_SETTING = 3080,
|
|
98
|
+
INVALID_CHECK_SETTING_VALUE = 3081,
|
|
99
|
+
INVALID_RECORDS_CONTEXT = 3082,
|
|
100
|
+
INVALID_RECORDS_NAME = 3083,
|
|
101
|
+
INVALID_RECORDS_FIELD = 3084,
|
|
102
|
+
DUPLICATE_COLUMN_REFERENCES_IN_RECORDS = 3085,
|
|
103
|
+
DUPLICATE_RECORDS_FOR_TABLE = 3086,
|
|
104
|
+
INVALID_USE_CONTEXT = 3087,
|
|
105
|
+
INVALID_USE_SPECIFIER_KIND = 3088,
|
|
106
|
+
INVALID_USE_SPECIFIER_NAME = 3089,
|
|
107
|
+
INVALID_DIAGRAMVIEW_CONTEXT = 3090,
|
|
108
|
+
DUPLICATE_DIAGRAMVIEW_NAME = 3091,
|
|
109
|
+
INVALID_DIAGRAMVIEW_FIELD = 3092,
|
|
110
|
+
DUPLICATE_DIAGRAMVIEW_FIELD = 3093,
|
|
109
111
|
BINDING_ERROR = 4000,
|
|
110
112
|
NONEXISTENT_MODULE = 4001,
|
|
111
113
|
UNSUPPORTED = 5000,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ export declare enum ElementKind {
|
|
|
2
2
|
Table = "table",
|
|
3
3
|
Enum = "enum",
|
|
4
4
|
Ref = "ref",
|
|
5
|
+
Dep = "dep",
|
|
5
6
|
Note = "note",
|
|
6
7
|
Project = "project",
|
|
7
8
|
Indexes = "indexes",
|
|
@@ -23,6 +24,7 @@ export declare enum SettingName {
|
|
|
23
24
|
PrimaryKey = "primary key",
|
|
24
25
|
Unique = "unique",
|
|
25
26
|
Ref = "ref",
|
|
27
|
+
Dep = "dep",
|
|
26
28
|
NotNull = "not null",
|
|
27
29
|
Null = "null",
|
|
28
30
|
Increment = "increment",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -58,6 +58,7 @@ export interface Database {
|
|
|
58
58
|
tables: Table[];
|
|
59
59
|
notes: Note[];
|
|
60
60
|
refs: Ref[];
|
|
61
|
+
deps: Dep[];
|
|
61
62
|
enums: Enum[];
|
|
62
63
|
tableGroups: TableGroup[];
|
|
63
64
|
aliases: Alias[];
|
|
@@ -110,6 +111,7 @@ export interface Column {
|
|
|
110
111
|
type: ColumnType;
|
|
111
112
|
token: TokenPosition;
|
|
112
113
|
inline_refs: InlineRef[];
|
|
114
|
+
inline_deps: InlineDep[];
|
|
113
115
|
checks: Check[];
|
|
114
116
|
pk?: boolean;
|
|
115
117
|
dbdefault?: {
|
|
@@ -171,6 +173,35 @@ export interface RefEndpoint {
|
|
|
171
173
|
token: TokenPosition;
|
|
172
174
|
}
|
|
173
175
|
export type RelationCardinality = '1' | '*';
|
|
176
|
+
export interface Dep {
|
|
177
|
+
schemaName: string | null;
|
|
178
|
+
name: string | null;
|
|
179
|
+
edges: DepEdge[];
|
|
180
|
+
note?: {
|
|
181
|
+
value: string;
|
|
182
|
+
token: TokenPosition;
|
|
183
|
+
};
|
|
184
|
+
custom?: Record<string, string | number | boolean | null>;
|
|
185
|
+
token: TokenPosition;
|
|
186
|
+
}
|
|
187
|
+
export interface DepEdge {
|
|
188
|
+
upstream: DepEndpoint;
|
|
189
|
+
downstream: DepEndpoint;
|
|
190
|
+
token: TokenPosition;
|
|
191
|
+
}
|
|
192
|
+
export interface DepEndpoint {
|
|
193
|
+
schemaName: string | null;
|
|
194
|
+
tableName: string;
|
|
195
|
+
fieldNames: string[];
|
|
196
|
+
token: TokenPosition;
|
|
197
|
+
}
|
|
198
|
+
export interface InlineDep {
|
|
199
|
+
schemaName: string | null;
|
|
200
|
+
tableName: string;
|
|
201
|
+
fieldNames: string[];
|
|
202
|
+
direction: '->' | '<-';
|
|
203
|
+
token: TokenPosition;
|
|
204
|
+
}
|
|
174
205
|
export interface Enum {
|
|
175
206
|
name: string;
|
|
176
207
|
schemaName: string | null;
|
|
@@ -252,4 +283,4 @@ export type Project = Record<string, never> | {
|
|
|
252
283
|
token: TokenPosition;
|
|
253
284
|
[index: string & Omit<any, 'name' | 'tables' | 'refs' | 'enums' | 'tableGroups' | 'note' | 'tablePartials' | 'records'>]: string;
|
|
254
285
|
};
|
|
255
|
-
export type SchemaElement = Database | Project | Table | Note | Column | ColumnType | Index | Check | InlineRef | Ref | RefEndpoint | Enum | EnumField | TableGroup | TableGroupField | Alias | TablePartial | TablePartialInjection | TableRecord | RecordValue;
|
|
286
|
+
export type SchemaElement = Database | Project | Table | Note | Column | ColumnType | Index | Check | InlineRef | InlineDep | Ref | RefEndpoint | Dep | DepEdge | DepEndpoint | Enum | EnumField | TableGroup | TableGroupField | Alias | TablePartial | TablePartialInjection | TableRecord | RecordValue;
|
|
File without changes
|
|
File without changes
|