@dbml/parse 7.1.2 → 8.0.0-alpha.10
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/dbml-parse.js +25 -19
- package/dist/dbml-parse.mjs +11321 -7514
- package/dist/src/compiler/index.d.ts +93 -53
- package/dist/src/compiler/projectLayout/index.d.ts +1 -0
- package/dist/src/compiler/projectLayout/layout.d.ts +23 -0
- package/dist/src/compiler/queries/canonicalName.d.ts +9 -0
- package/dist/src/compiler/queries/container/element.d.ts +2 -1
- package/dist/src/compiler/queries/container/index.d.ts +5 -5
- package/dist/src/compiler/queries/container/scope.d.ts +3 -2
- package/dist/src/compiler/queries/container/scopeKind.d.ts +2 -1
- package/dist/src/compiler/queries/container/stack.d.ts +2 -1
- package/dist/src/compiler/queries/container/token.d.ts +2 -1
- package/dist/src/compiler/queries/files/fileDependencies.d.ts +3 -0
- package/dist/src/compiler/queries/files/reachableFiles.d.ts +4 -0
- package/dist/src/compiler/queries/files/usableMembers.d.ts +34 -0
- package/dist/src/compiler/queries/legacy/parse.d.ts +10 -9
- package/dist/src/compiler/queries/legacy/symbol.d.ts +1 -10
- package/dist/src/compiler/queries/legacy/token.d.ts +3 -2
- package/dist/src/compiler/queries/nodeAtPosition.d.ts +5 -0
- package/dist/src/compiler/queries/pipeline/bind.d.ts +5 -0
- package/dist/src/compiler/queries/pipeline/index.d.ts +2 -0
- package/dist/src/compiler/queries/pipeline/interpret.d.ts +6 -0
- package/dist/src/compiler/queries/pipeline/parse.d.ts +12 -0
- package/dist/src/compiler/queries/pipeline/validate.d.ts +4 -0
- package/dist/src/compiler/queries/resolutionIndex.d.ts +13 -0
- package/dist/src/compiler/queries/symbol/lookupMembers.d.ts +4 -0
- package/dist/src/compiler/queries/symbol/symbolAliases.d.ts +4 -0
- package/dist/src/compiler/queries/symbol/symbolUses.d.ts +4 -0
- package/dist/src/compiler/queries/transform/index.d.ts +3 -3
- package/dist/src/compiler/queries/transform/renameTable.d.ts +19 -16
- package/dist/src/compiler/queries/transform/syncDiagramView.d.ts +19 -6
- package/dist/src/compiler/queries/transform/utils.d.ts +5 -4
- package/dist/src/compiler/queries/utils.d.ts +6 -0
- package/dist/src/constants.d.ts +1 -2
- package/dist/src/core/global_modules/checks/bind.d.ts +9 -0
- package/dist/src/core/global_modules/checks/index.d.ts +2 -0
- package/dist/src/core/global_modules/checks/interpret.d.ts +10 -0
- package/dist/src/core/global_modules/diagramView/bind.d.ts +18 -0
- package/dist/src/core/global_modules/diagramView/index.d.ts +8 -0
- package/dist/src/core/global_modules/diagramView/interpret.d.ts +37 -0
- package/dist/src/core/global_modules/enum/bind.d.ts +11 -0
- package/dist/src/core/global_modules/enum/index.d.ts +8 -0
- package/dist/src/core/global_modules/enum/interpret.d.ts +15 -0
- package/dist/src/core/global_modules/index.d.ts +17 -0
- package/dist/src/core/global_modules/indexes/bind.d.ts +12 -0
- package/dist/src/core/global_modules/indexes/index.d.ts +2 -0
- package/dist/src/core/global_modules/indexes/interpret.d.ts +10 -0
- package/dist/src/core/global_modules/note/bind.d.ts +11 -0
- package/dist/src/core/global_modules/note/index.d.ts +2 -0
- package/dist/src/core/global_modules/note/interpret.d.ts +17 -0
- package/dist/src/core/global_modules/program/bind.d.ts +17 -0
- package/dist/src/core/global_modules/program/index.d.ts +2 -0
- package/dist/src/core/global_modules/program/interpret.d.ts +23 -0
- package/dist/src/core/global_modules/program/utils.d.ts +3 -0
- package/dist/src/core/global_modules/project/bind.d.ts +11 -0
- package/dist/src/core/global_modules/project/index.d.ts +2 -0
- package/dist/src/core/global_modules/project/interpret.d.ts +16 -0
- package/dist/src/core/global_modules/records/bind.d.ts +17 -0
- package/dist/src/core/global_modules/records/index.d.ts +2 -0
- package/dist/src/core/global_modules/records/interpret.d.ts +13 -0
- package/dist/src/core/global_modules/records/utils/constraints/fk.d.ts +13 -0
- package/dist/src/core/global_modules/records/utils/constraints/helper.d.ts +26 -0
- package/dist/src/core/global_modules/records/utils/constraints/pk.d.ts +6 -0
- package/dist/src/core/global_modules/records/utils/constraints/unique.d.ts +5 -0
- package/dist/src/core/{interpreter → global_modules}/records/utils/data/sqlTypes.d.ts +0 -8
- package/dist/src/core/{interpreter → global_modules}/records/utils/data/values.d.ts +1 -1
- package/dist/src/core/global_modules/ref/bind.d.ts +15 -0
- package/dist/src/core/global_modules/ref/index.d.ts +7 -0
- package/dist/src/core/global_modules/ref/interpret.d.ts +15 -0
- package/dist/src/core/global_modules/schema/index.d.ts +2 -0
- package/dist/src/core/global_modules/table/bind.d.ts +18 -0
- package/dist/src/core/global_modules/table/index.d.ts +9 -0
- package/dist/src/core/global_modules/table/interpret.d.ts +26 -0
- package/dist/src/core/global_modules/table/utils.d.ts +4 -0
- package/dist/src/core/global_modules/tableGroup/bind.d.ts +15 -0
- package/dist/src/core/global_modules/tableGroup/index.d.ts +8 -0
- package/dist/src/core/global_modules/tableGroup/interpret.d.ts +18 -0
- package/dist/src/core/global_modules/tablePartial/bind.d.ts +17 -0
- package/dist/src/core/global_modules/tablePartial/index.d.ts +7 -0
- package/dist/src/core/global_modules/tablePartial/interpret.d.ts +23 -0
- package/dist/src/core/global_modules/types.d.ts +17 -0
- package/dist/src/core/global_modules/use/index.d.ts +8 -0
- package/dist/src/core/global_modules/utils.d.ts +17 -0
- package/dist/src/core/local_modules/checks/index.d.ts +2 -0
- package/dist/src/core/local_modules/checks/validate.d.ts +17 -0
- package/dist/src/core/local_modules/custom/index.d.ts +2 -0
- package/dist/src/core/local_modules/custom/validate.d.ts +14 -0
- package/dist/src/core/local_modules/diagramView/index.d.ts +2 -0
- package/dist/src/core/local_modules/diagramView/validate.d.ts +24 -0
- package/dist/src/core/local_modules/enum/index.d.ts +2 -0
- package/dist/src/core/local_modules/enum/validate.d.ts +17 -0
- package/dist/src/core/local_modules/index.d.ts +10 -0
- package/dist/src/core/local_modules/indexes/index.d.ts +2 -0
- package/dist/src/core/local_modules/indexes/validate.d.ts +18 -0
- package/dist/src/core/local_modules/note/index.d.ts +2 -0
- package/dist/src/core/local_modules/note/validate.d.ts +16 -0
- package/dist/src/core/local_modules/program/index.d.ts +2 -0
- package/dist/src/core/local_modules/program/validate.d.ts +9 -0
- package/dist/src/core/local_modules/project/index.d.ts +2 -0
- package/dist/src/core/local_modules/project/validate.d.ts +15 -0
- package/dist/src/core/local_modules/records/index.d.ts +2 -0
- package/dist/src/core/local_modules/records/validate.d.ts +20 -0
- package/dist/src/core/local_modules/ref/index.d.ts +2 -0
- package/dist/src/core/local_modules/ref/validate.d.ts +20 -0
- package/dist/src/core/local_modules/table/index.d.ts +2 -0
- package/dist/src/core/local_modules/table/validate.d.ts +21 -0
- package/dist/src/core/local_modules/tableGroup/index.d.ts +2 -0
- package/dist/src/core/local_modules/tableGroup/validate.d.ts +19 -0
- package/dist/src/core/local_modules/tablePartial/index.d.ts +2 -0
- package/dist/src/core/local_modules/tablePartial/validate.d.ts +21 -0
- package/dist/src/core/local_modules/types.d.ts +12 -0
- package/dist/src/core/local_modules/use/index.d.ts +2 -0
- package/dist/src/core/local_modules/use/validate.d.ts +12 -0
- package/dist/src/core/parser/parser.d.ts +8 -0
- package/dist/src/core/parser/utils.d.ts +2 -49
- package/dist/src/core/types/errors.d.ts +9 -5
- package/dist/src/core/types/filepath.d.ts +8 -2
- package/dist/src/core/types/index.d.ts +2 -0
- package/dist/src/core/types/internable.d.ts +0 -12
- package/dist/src/core/{analyzer/types.d.ts → types/keywords.d.ts} +6 -2
- package/dist/src/core/types/nodes.d.ts +61 -16
- package/dist/src/core/types/report.d.ts +3 -3
- package/dist/src/core/types/schemaJson.d.ts +14 -5
- package/dist/src/core/types/symbol/factory.d.ts +3 -2
- package/dist/src/core/types/symbol/index.d.ts +3 -4
- package/dist/src/core/types/symbol/metadata.d.ts +80 -0
- package/dist/src/core/types/symbol/symbols.d.ts +277 -86
- package/dist/src/core/{analyzer/utils.d.ts → utils/expression.d.ts} +10 -21
- package/dist/src/core/utils/interpret.d.ts +16 -0
- package/dist/src/core/utils/numbers.d.ts +1 -1
- package/dist/src/core/utils/span.d.ts +2 -4
- package/dist/src/core/utils/tokens.d.ts +15 -0
- package/dist/src/core/utils/validate.d.ts +103 -0
- package/dist/src/index.d.ts +13 -9
- package/dist/src/services/diagnostics/provider.d.ts +7 -6
- package/dist/src/services/index.d.ts +2 -1
- package/dist/src/services/monarch.d.ts +4 -3
- package/dist/src/services/suggestions/crossFile.d.ts +6 -0
- package/dist/src/services/suggestions/provider.d.ts +4 -1
- package/dist/src/services/suggestions/recordRowSnippet.d.ts +2 -1
- package/dist/src/services/suggestions/use.d.ts +5 -0
- package/dist/src/services/suggestions/utils/index.d.ts +10 -0
- package/dist/src/services/suggestions/utils/useMerger.d.ts +29 -0
- package/dist/src/services/types.d.ts +4 -0
- package/dist/src/services/utils.d.ts +4 -1
- package/package.json +4 -3
- package/dist/src/core/analyzer/analyzer.d.ts +0 -10
- package/dist/src/core/analyzer/binder/binder.d.ts +0 -10
- package/dist/src/core/analyzer/binder/elementBinder/checks.d.ts +0 -13
- package/dist/src/core/analyzer/binder/elementBinder/custom.d.ts +0 -16
- package/dist/src/core/analyzer/binder/elementBinder/diagramView.d.ts +0 -20
- package/dist/src/core/analyzer/binder/elementBinder/enum.d.ts +0 -16
- package/dist/src/core/analyzer/binder/elementBinder/indexes.d.ts +0 -17
- package/dist/src/core/analyzer/binder/elementBinder/note.d.ts +0 -16
- package/dist/src/core/analyzer/binder/elementBinder/project.d.ts +0 -16
- package/dist/src/core/analyzer/binder/elementBinder/records.d.ts +0 -22
- package/dist/src/core/analyzer/binder/elementBinder/ref.d.ts +0 -17
- package/dist/src/core/analyzer/binder/elementBinder/table.d.ts +0 -21
- package/dist/src/core/analyzer/binder/elementBinder/tableGroup.d.ts +0 -17
- package/dist/src/core/analyzer/binder/elementBinder/tablePartial.d.ts +0 -19
- package/dist/src/core/analyzer/binder/types.d.ts +0 -4
- package/dist/src/core/analyzer/binder/utils.d.ts +0 -33
- package/dist/src/core/analyzer/validator/elementValidators/checks.d.ts +0 -26
- package/dist/src/core/analyzer/validator/elementValidators/custom.d.ts +0 -23
- package/dist/src/core/analyzer/validator/elementValidators/diagramView.d.ts +0 -31
- package/dist/src/core/analyzer/validator/elementValidators/enum.d.ts +0 -28
- package/dist/src/core/analyzer/validator/elementValidators/indexes.d.ts +0 -27
- package/dist/src/core/analyzer/validator/elementValidators/note.d.ts +0 -25
- package/dist/src/core/analyzer/validator/elementValidators/project.d.ts +0 -24
- package/dist/src/core/analyzer/validator/elementValidators/records.d.ts +0 -29
- package/dist/src/core/analyzer/validator/elementValidators/ref.d.ts +0 -26
- package/dist/src/core/analyzer/validator/elementValidators/table.d.ts +0 -28
- package/dist/src/core/analyzer/validator/elementValidators/tableGroup.d.ts +0 -27
- package/dist/src/core/analyzer/validator/elementValidators/tablePartial.d.ts +0 -28
- package/dist/src/core/analyzer/validator/types.d.ts +0 -7
- package/dist/src/core/analyzer/validator/utils.d.ts +0 -65
- package/dist/src/core/analyzer/validator/validator.d.ts +0 -10
- package/dist/src/core/interpreter/elementInterpreter/diagramView.d.ts +0 -13
- package/dist/src/core/interpreter/elementInterpreter/enum.d.ts +0 -12
- package/dist/src/core/interpreter/elementInterpreter/project.d.ts +0 -12
- package/dist/src/core/interpreter/elementInterpreter/ref.d.ts +0 -14
- package/dist/src/core/interpreter/elementInterpreter/sticky_note.d.ts +0 -14
- package/dist/src/core/interpreter/elementInterpreter/table.d.ts +0 -22
- package/dist/src/core/interpreter/elementInterpreter/tableGroup.d.ts +0 -15
- package/dist/src/core/interpreter/elementInterpreter/tablePartial.d.ts +0 -19
- package/dist/src/core/interpreter/interpreter.d.ts +0 -10
- package/dist/src/core/interpreter/records/index.d.ts +0 -10
- package/dist/src/core/interpreter/records/utils/constraints/fk.d.ts +0 -3
- package/dist/src/core/interpreter/records/utils/constraints/helper.d.ts +0 -11
- package/dist/src/core/interpreter/records/utils/constraints/pk.d.ts +0 -3
- package/dist/src/core/interpreter/records/utils/constraints/unique.d.ts +0 -3
- package/dist/src/core/interpreter/types.d.ts +0 -47
- package/dist/src/core/interpreter/utils.d.ts +0 -37
- package/dist/src/core/types/symbol/symbolIndex.d.ts +0 -33
- package/dist/src/core/types/symbol/symbolTable.d.ts +0 -12
- package/dist/src/core/types/symbol/utils.d.ts +0 -4
- package/dist/src/core/utils/array.d.ts +0 -1
- package/dist/src/core/utils/enum.d.ts +0 -1
- package/dist/src/services/suggestions/utils.d.ts +0 -34
- /package/dist/src/core/{interpreter → global_modules}/records/utils/constraints/index.d.ts +0 -0
- /package/dist/src/core/{interpreter → global_modules}/records/utils/data/index.d.ts +0 -0
- /package/dist/src/core/{interpreter → global_modules}/records/utils/index.d.ts +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { default as Compiler } from '../../compiler';
|
|
2
|
-
import { SyntaxNode, TupleExpressionNode } from '../../core/types/nodes';
|
|
3
|
-
import { SymbolKind } from '../../core/types/symbol';
|
|
4
|
-
import { ColumnSymbol, TablePartialInjectedColumnSymbol, TablePartialSymbol, TableSymbol } from '../../core/types/symbol/symbols';
|
|
5
|
-
import { SyntaxToken } from '../../core/types/tokens';
|
|
6
|
-
import { CompletionItemKind, CompletionList } from '../types';
|
|
7
|
-
export declare function pickCompletionItemKind(symbolKind: SymbolKind): CompletionItemKind;
|
|
8
|
-
export declare function shouldPrependSpace(token: SyntaxToken | undefined, offset: number): boolean;
|
|
9
|
-
export declare function noSuggestions(): CompletionList;
|
|
10
|
-
export declare function prependSpace(completionList: CompletionList): CompletionList;
|
|
11
|
-
export declare function addQuoteToSuggestionIfNeeded(completionList: CompletionList): CompletionList;
|
|
12
|
-
export declare function addSuggestAllSuggestion(completionList: CompletionList, separator?: string): CompletionList;
|
|
13
|
-
export declare function getNodeOrTokenSource(compiler: Compiler, tokenOrNode: SyntaxToken | SyntaxNode): string;
|
|
14
|
-
/**
|
|
15
|
-
* Checks if the offset is within the element's header
|
|
16
|
-
* (within the element, but outside the body)
|
|
17
|
-
*/
|
|
18
|
-
export declare function isOffsetWithinElementHeader(offset: number, element: SyntaxNode & {
|
|
19
|
-
body?: SyntaxNode;
|
|
20
|
-
}): boolean;
|
|
21
|
-
export declare function isTupleEmpty(tuple: TupleExpressionNode): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Get columns from a table symbol
|
|
24
|
-
* @param tableSymbol The table symbol to extract columns from
|
|
25
|
-
* @returns Array of column objects with name and type information
|
|
26
|
-
*/
|
|
27
|
-
export declare function getColumnsFromTableSymbol(tableSymbol: TableSymbol | TablePartialSymbol): Array<{
|
|
28
|
-
name: string;
|
|
29
|
-
type: string;
|
|
30
|
-
}> | null;
|
|
31
|
-
export declare function extractNameAndTypeOfColumnSymbol(columnSymbol: ColumnSymbol | TablePartialInjectedColumnSymbol, columnName: string): {
|
|
32
|
-
name: string;
|
|
33
|
-
type: string;
|
|
34
|
-
} | null;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|