@dbml/parse 9.0.0-alpha.3 → 9.0.0-optional-ref.2
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 +19 -22
- package/dist/dbml-parse.mjs +8564 -8807
- package/dist/index.d.ts +0 -0
- package/dist/src/compiler/index.d.ts +9 -10
- 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/addSetting.d.ts +14 -0
- package/dist/src/compiler/queries/transform/applyTextEdits.d.ts +0 -0
- package/dist/src/compiler/queries/transform/index.d.ts +2 -1
- 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/updateSetting.d.ts +8 -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 +7 -8
- 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/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 +2 -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 +4 -17
- 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/constraint_fixes.d.ts +8 -0
- package/dist/src/core/global_modules/ref/index.d.ts +0 -1
- package/dist/src/core/global_modules/ref/interpret.d.ts +1 -0
- package/dist/src/core/global_modules/schema/index.d.ts +0 -0
- package/dist/src/core/global_modules/table/bind.d.ts +0 -2
- 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 -2
- 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/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 +75 -52
- 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 +0 -2
- 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/relation.d.ts +19 -0
- package/dist/src/core/types/report.d.ts +5 -3
- package/dist/src/core/types/schemaJson.d.ts +3 -35
- 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 +25 -17
- package/dist/src/core/types/symbol/symbols.d.ts +4 -1
- 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 +2 -2
- package/dist/src/services/code_actions/provider.d.ts +8 -0
- package/dist/src/services/definition/provider.d.ts +0 -0
- package/dist/src/services/diagnostics/provider.d.ts +7 -1
- package/dist/src/services/index.d.ts +2 -1
- 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 +5 -1
- package/dist/src/services/utils.d.ts +0 -0
- package/package.json +2 -2
- package/dist/src/compiler/queries/transform/syncDep.d.ts +0 -98
- package/dist/src/core/global_modules/dep/bind.d.ts +0 -15
- package/dist/src/core/global_modules/dep/index.d.ts +0 -2
- package/dist/src/core/global_modules/dep/interpret.d.ts +0 -34
- package/dist/src/core/local_modules/dep/index.d.ts +0 -2
- package/dist/src/core/local_modules/dep/validate.d.ts +0 -18
package/dist/index.d.ts
CHANGED
|
File without changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Filepath } from '../core/types/filepath';
|
|
2
2
|
import { SyntaxNode, SyntaxNodeIdGenerator } from '../core/types/nodes';
|
|
3
3
|
import { NodeSymbolIdGenerator, SymbolFactory } from '../core/types/symbol';
|
|
4
|
-
import { DBMLCompletionItemProvider, DBMLDefinitionProvider, DBMLDiagnosticsProvider, DBMLReferencesProvider } from '../services/index';
|
|
4
|
+
import { DBMLCodeActionProvider, DBMLCompletionItemProvider, DBMLDefinitionProvider, DBMLDiagnosticsProvider, DBMLReferencesProvider } from '../services/index';
|
|
5
5
|
import { DbmlProjectLayout } from './projectLayout';
|
|
6
|
-
import { DiagramViewBlock,
|
|
6
|
+
import { DiagramViewBlock, findDiagramViewBlocks } from './queries/transform';
|
|
7
7
|
import { addDoubleQuoteIfNeeded, escapeString, formatRecordValue, isValidIdentifier, splitQualifiedIdentifier, unescapeString } from './queries/utils';
|
|
8
8
|
export { ScopeKind } from './types';
|
|
9
|
-
export type { DiagramViewBlock,
|
|
10
|
-
export { addDoubleQuoteIfNeeded, escapeString, formatRecordValue, isValidIdentifier, splitQualifiedIdentifier, unescapeString, findDiagramViewBlocks,
|
|
9
|
+
export type { DiagramViewBlock, TableNameInput, TextEdit } from './queries/transform';
|
|
10
|
+
export { addDoubleQuoteIfNeeded, escapeString, formatRecordValue, isValidIdentifier, splitQualifiedIdentifier, unescapeString, findDiagramViewBlocks, };
|
|
11
11
|
export default class Compiler {
|
|
12
12
|
layout: DbmlProjectLayout;
|
|
13
13
|
readonly nodeIdGenerator: SyntaxNodeIdGenerator;
|
|
@@ -30,7 +30,7 @@ export default class Compiler {
|
|
|
30
30
|
validateFile: (filepath: Filepath) => import('../core/types/report').default<void>;
|
|
31
31
|
nodeFullname: (node: SyntaxNode) => import('../core/types/report').default<string[] | undefined> | import('../core/types/report').default<typeof import('..').UNHANDLED>;
|
|
32
32
|
nodeAlias: (node: SyntaxNode) => import('../core/types/report').default<typeof import('..').UNHANDLED> | import('../core/types/report').default<string | undefined>;
|
|
33
|
-
nodeSettings: (node: SyntaxNode) => import('../core/types/report').default<
|
|
33
|
+
nodeSettings: (node: SyntaxNode) => import('../core/types/report').default<import('../core/utils/validate').Settings> | import('../core/types/report').default<typeof import('..').UNHANDLED>;
|
|
34
34
|
canonicalName: (filepath: Filepath, symbol: import('../core/types/symbol').NodeSymbol) => import('../core/types/report').default<import('./queries/canonicalName').CanonicalName | undefined>;
|
|
35
35
|
bindNode: (node: SyntaxNode) => import('../core/types/report').default<typeof import('..').UNHANDLED> | import('../core/types/report').default<void>;
|
|
36
36
|
bindFile: (filepath: Filepath) => import('../core/types/report').default<void>;
|
|
@@ -77,12 +77,10 @@ export default class Compiler {
|
|
|
77
77
|
newDbml: string;
|
|
78
78
|
edits: import('.').TextEdit[];
|
|
79
79
|
};
|
|
80
|
+
addSetting: (filepath: Filepath, declaration: SyntaxNode, setting: string) => string | undefined;
|
|
81
|
+
updateSetting: (filepath: Filepath, declaration: SyntaxNode, settingName: string, newValue: string) => string | undefined;
|
|
82
|
+
removeSetting: (filepath: Filepath, declaration: SyntaxNode, settingName: string) => string | undefined;
|
|
80
83
|
findDiagramViewBlocks(filepath: Filepath): DiagramViewBlock[];
|
|
81
|
-
syncDep: (filepath: Filepath, operations: import('..').DepSyncOperation[], blocks?: DepBlock[] | undefined) => {
|
|
82
|
-
newDbml: string;
|
|
83
|
-
edits: import('.').TextEdit[];
|
|
84
|
-
};
|
|
85
|
-
findDepBlocks(filepath: Filepath): DepBlock[];
|
|
86
84
|
readonly token: {
|
|
87
85
|
invalidStream: (filepath: Filepath) => readonly import('..').SyntaxToken[];
|
|
88
86
|
flatStream: (filepath: Filepath) => readonly import('..').SyntaxToken[];
|
|
@@ -118,5 +116,6 @@ export default class Compiler {
|
|
|
118
116
|
referenceProvider: DBMLReferencesProvider;
|
|
119
117
|
autocompletionProvider: DBMLCompletionItemProvider;
|
|
120
118
|
diagnosticsProvider: DBMLDiagnosticsProvider;
|
|
119
|
+
codeActionProvider: DBMLCodeActionProvider;
|
|
121
120
|
};
|
|
122
121
|
}
|
|
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
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SyntaxNode } from '../../../core/types/nodes';
|
|
2
|
+
import { Filepath } from '../../../core/types/filepath';
|
|
3
|
+
import { default as Compiler } from '../../index';
|
|
4
|
+
import { TextEdit } from './applyTextEdits';
|
|
5
|
+
/**
|
|
6
|
+
* Produces a TextEdit that adds a setting to a field/element declaration.
|
|
7
|
+
* If the declaration already has a settings block [...], inserts before the closing ].
|
|
8
|
+
* Otherwise, appends a new [setting] block.
|
|
9
|
+
*/
|
|
10
|
+
export declare function addSettingEdit(declaration: SyntaxNode, setting: string): TextEdit | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Adds a setting to a field/element declaration and returns the updated source.
|
|
13
|
+
*/
|
|
14
|
+
export declare function addSetting(this: Compiler, filepath: Filepath, declaration: SyntaxNode, setting: string): string | undefined;
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { renameTable } from './renameTable';
|
|
2
2
|
export { syncDiagramView, findDiagramViewBlocks, type DiagramViewSyncOperation, type DiagramViewBlock, } from './syncDiagramView';
|
|
3
|
-
export { syncDep, findDepBlocks, generateDepBlock, type DepSyncOperation, type DepSyncEdge, type DepEndpointRef, type DepBlock, } from './syncDep';
|
|
4
3
|
export { applyTextEdits, type TextEdit } from './applyTextEdits';
|
|
4
|
+
export { addSetting, addSettingEdit } from './addSetting';
|
|
5
|
+
export { updateSetting, updateSettingEdit, removeSetting, removeSettingEdit, } from './updateSetting';
|
|
5
6
|
export { type TableNameInput } from './utils';
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SyntaxNode } from '../../../core/types/nodes';
|
|
2
|
+
import { Filepath } from '../../../core/types/filepath';
|
|
3
|
+
import { default as Compiler } from '../../index';
|
|
4
|
+
import { TextEdit } from './applyTextEdits';
|
|
5
|
+
export declare function updateSettingEdit(declaration: SyntaxNode, settingName: string, newValue: string, source: string): TextEdit | undefined;
|
|
6
|
+
export declare function removeSettingEdit(declaration: SyntaxNode, settingName: string, source: string): TextEdit | undefined;
|
|
7
|
+
export declare function updateSetting(this: Compiler, filepath: Filepath, declaration: SyntaxNode, settingName: string, newValue: string): string | undefined;
|
|
8
|
+
export declare function removeSetting(this: Compiler, filepath: Filepath, declaration: SyntaxNode, settingName: string): string | undefined;
|
|
File without changes
|
|
File without changes
|
|
@@ -5,12 +5,11 @@ export declare const enum ScopeKind {
|
|
|
5
5
|
INDEXES = 3,
|
|
6
6
|
NOTE = 4,
|
|
7
7
|
REF = 5,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
DIAGRAMVIEW = 13
|
|
8
|
+
PROJECT = 6,
|
|
9
|
+
CUSTOM = 7,
|
|
10
|
+
TOPLEVEL = 8,
|
|
11
|
+
TABLEPARTIAL = 9,
|
|
12
|
+
CHECKS = 10,
|
|
13
|
+
RECORDS = 11,
|
|
14
|
+
DIAGRAMVIEW = 12
|
|
16
15
|
}
|
package/dist/src/constants.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
|
|
@@ -10,6 +10,7 @@ export default class ProgramInterpreter {
|
|
|
10
10
|
private filepath;
|
|
11
11
|
private errors;
|
|
12
12
|
private warnings;
|
|
13
|
+
private hints;
|
|
13
14
|
private db;
|
|
14
15
|
constructor(compiler: Compiler, symbol: ProgramSymbol, filepath: Filepath);
|
|
15
16
|
interpret(): Report<SchemaElement | SchemaElement[] | undefined>;
|
|
@@ -18,6 +19,7 @@ export default class ProgramInterpreter {
|
|
|
18
19
|
private interpretAllMetadata;
|
|
19
20
|
private interpretAllAliases;
|
|
20
21
|
private validateRecords;
|
|
22
|
+
private validatePartialRefs;
|
|
21
23
|
private collectPartialRefs;
|
|
22
24
|
private pushElement;
|
|
23
25
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,25 +2,12 @@ import { default as Compiler } from '../../../../../compiler/index';
|
|
|
2
2
|
import { CompileWarning } from '../../../../types/errors';
|
|
3
3
|
import { RecordValue, TableRecord } from '../../../../types/schemaJson';
|
|
4
4
|
import { ColumnSymbol } from '../../../../types/symbol';
|
|
5
|
-
export interface ColumnInfo {
|
|
6
|
-
name: string;
|
|
7
|
-
pk: boolean;
|
|
8
|
-
unique: boolean;
|
|
9
|
-
increment: boolean;
|
|
10
|
-
notNull: boolean;
|
|
11
|
-
dbdefault?: {
|
|
12
|
-
value: string | number;
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
typeName: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function columnInfoFromSymbol(col: ColumnSymbol, compiler: Compiler): ColumnInfo;
|
|
18
5
|
export declare function toKeyedRows(record: TableRecord): Record<string, RecordValue>[];
|
|
19
6
|
export declare function makeTableKey(schema: string | null, table: string): string;
|
|
20
|
-
export declare function extractKeyValueWithDefault(row: Record<string, RecordValue>,
|
|
21
|
-
export declare function hasNullWithoutDefaultInKey(row: Record<string, RecordValue>,
|
|
22
|
-
export declare function isAutoIncrementColumn(column: ColumnInfo): boolean;
|
|
7
|
+
export declare function extractKeyValueWithDefault(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): string;
|
|
8
|
+
export declare function hasNullWithoutDefaultInKey(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): boolean;
|
|
23
9
|
export declare function formatFullColumnName(schemaName: string | null, tableName: string, columnName: string): string;
|
|
24
10
|
export declare function formatFullColumnNames(schemaName: string | null, tableName: string, columnNames: string[]): string;
|
|
25
|
-
export declare function formatValues(row: Record<string, RecordValue>,
|
|
11
|
+
export declare function formatValues(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): string;
|
|
12
|
+
export declare function getDiagnosticAnchorValues(row: Record<string, RecordValue>, columnNames: string[]): RecordValue[];
|
|
26
13
|
export declare function createConstraintWarning(compiler: Compiler, recordValue: RecordValue, message: string): CompileWarning;
|
|
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,8 @@
|
|
|
1
|
+
import { default as Compiler } from '../../../compiler';
|
|
2
|
+
import { CompileInfo } from '../../types/errors';
|
|
3
|
+
import { RefMetadata, PartialRefMetadata } from '../../types/symbol/metadata';
|
|
4
|
+
export declare function validateCardinality(compiler: Compiler, meta: RefMetadata | PartialRefMetadata, side: 'left' | 'right', options?: {
|
|
5
|
+
allowOtherColFix?: boolean;
|
|
6
|
+
allowOwnColFix?: boolean;
|
|
7
|
+
}): CompileInfo[];
|
|
8
|
+
export declare function validatePartialRef(compiler: Compiler, meta: PartialRefMetadata): CompileInfo[];
|
|
@@ -4,5 +4,4 @@ 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;
|
|
8
7
|
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
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as Compiler } from '../../compiler';
|
|
2
|
-
import { RelationCardinality } from '../types';
|
|
3
2
|
import { PrimaryExpressionNode, SyntaxNode, VariableNode } from '../types/nodes';
|
|
4
3
|
import { default as Report } from '../types/report';
|
|
5
4
|
import { NodeSymbol } from '../types/symbol';
|
|
@@ -14,4 +13,3 @@ export declare function scanNonListNodeForBinding(node?: SyntaxNode): {
|
|
|
14
13
|
})[];
|
|
15
14
|
}[];
|
|
16
15
|
export declare function nodeRefereeOfLeftExpression(compiler: Compiler, node: SyntaxNode): NodeSymbol | undefined;
|
|
17
|
-
export declare function getMultiplicities(op: string): [RelationCardinality, RelationCardinality] | 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
|
|
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
|