@dbml/core 2.5.4 → 2.6.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/lib/model_structure/field.js +3 -1
- package/lib/parse/ANTLR/ASTGeneration/AST.js +246 -0
- package/lib/parse/ANTLR/ASTGeneration/ParserErrorListener.js +40 -0
- package/lib/parse/ANTLR/ASTGeneration/SyntaxError.js +47 -0
- package/lib/parse/ANTLR/ASTGeneration/index.js +32 -0
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js +43 -0
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js +37 -0
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +1126 -0
- package/lib/parse/ANTLR/README.md +32 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.g4 +3044 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.interp +2074 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.js +882 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.tokens +1314 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.g4 +5506 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.interp +2182 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.js +3 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.tokens +1314 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParserVisitor.js +5767 -0
- package/lib/parse/ANTLR/parsers/postgresql/README.md +10 -0
- package/lib/parse/Parser.js +9 -0
- package/lib/parse/dbml/parser.pegjs +2 -2
- package/lib/parse/dbmlParser.js +66 -103
- package/lib/parse/mysql/parser.pegjs +2 -2
- package/lib/parse/mysqlParser.js +281 -283
- package/package.json +5 -2
- package/types/import/index.d.ts +1 -1
- package/types/parse/Parser.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,12 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"test": "jest",
|
|
28
|
+
"benchmark": "jest --projects jest-bench.config.json",
|
|
28
29
|
"build:lib": "babel src --out-dir lib --copy-files",
|
|
29
30
|
"build:parser": "npx babel-node src/parse/buildParser.js",
|
|
30
31
|
"build": "npm run build:parser && npm run build:lib",
|
|
31
32
|
"prepublish": "npm run build"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
35
|
+
"antlr4": "^4.13.1",
|
|
34
36
|
"lodash": "^4.17.15",
|
|
35
37
|
"parsimmon": "^1.13.0",
|
|
36
38
|
"pluralize": "^8.0.0"
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
"babel-jest": "^29.5.0",
|
|
45
47
|
"bluebird": "^3.5.5",
|
|
46
48
|
"jest": "^29.5.0",
|
|
49
|
+
"jest-bench": "^29.4.1",
|
|
47
50
|
"pegjs-require-import": "0.0.6"
|
|
48
51
|
},
|
|
49
52
|
"jest": {
|
|
@@ -55,5 +58,5 @@
|
|
|
55
58
|
"\\.(?!json$)[^.]*$": "@glen/jest-raw-loader"
|
|
56
59
|
}
|
|
57
60
|
},
|
|
58
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "54ed18bb2232c6143992aa3d81f4a2b48c36a249"
|
|
59
62
|
}
|
package/types/import/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function _import(str: string, format: 'dbml' | 'mysql' | 'postgres' | 'json' | 'mssql'): string;
|
|
1
|
+
declare function _import(str: string, format: 'dbml' | 'mysql' | 'postgres' | 'json' | 'mssql' | 'postgresLegacy'): string;
|
|
2
2
|
declare const _default: {
|
|
3
3
|
import: typeof _import;
|
|
4
4
|
};
|
package/types/parse/Parser.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare class Parser {
|
|
|
3
3
|
static parseJSONToDatabase(rawDatabase: RawDatabase): Database;
|
|
4
4
|
static parseMySQLToJSON(str: string): RawDatabase;
|
|
5
5
|
static parsePostgresToJSON(str: string): RawDatabase;
|
|
6
|
+
static parsePostgresToJSONv2(str: string): RawDatabase;
|
|
6
7
|
static parseDBMLToJSON(str: string): RawDatabase;
|
|
7
8
|
static parseSchemaRbToJSON(str: string): RawDatabase;
|
|
8
9
|
static parseMSSQLToJSON(str: string): RawDatabase;
|