@dbml/core 3.13.5 → 3.13.6
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/README.md +0 -0
- package/lib/export/DbmlExporter.js +8 -10
- package/lib/export/JsonExporter.js +8 -10
- package/lib/export/ModelExporter.js +9 -11
- package/lib/export/MysqlExporter.js +14 -16
- package/lib/export/OracleExporter.js +17 -19
- package/lib/export/PostgresExporter.js +16 -18
- package/lib/export/README.md +0 -0
- package/lib/export/SqlServerExporter.js +14 -16
- package/lib/export/index.js +3 -4
- package/lib/export/utils.js +4 -0
- package/lib/import/index.js +3 -4
- package/lib/index.js +1 -1
- package/lib/model_structure/config.js +6 -12
- package/lib/model_structure/database.js +22 -26
- package/lib/model_structure/dbState.js +9 -11
- package/lib/model_structure/element.js +22 -25
- package/lib/model_structure/endpoint.js +26 -29
- package/lib/model_structure/enum.js +21 -24
- package/lib/model_structure/enumValue.js +21 -24
- package/lib/model_structure/field.js +21 -24
- package/lib/model_structure/indexColumn.js +21 -24
- package/lib/model_structure/indexes.js +21 -24
- package/lib/model_structure/ref.js +21 -24
- package/lib/model_structure/schema.js +21 -24
- package/lib/model_structure/stickyNote.js +21 -24
- package/lib/model_structure/table.js +26 -29
- package/lib/model_structure/tableGroup.js +21 -24
- package/lib/model_structure/tablePartial.js +21 -24
- package/lib/model_structure/utils.js +0 -0
- package/lib/parse/ANTLR/ASTGeneration/AST.js +21 -35
- package/lib/parse/ANTLR/ASTGeneration/ParserErrorListener.js +19 -22
- package/lib/parse/ANTLR/ASTGeneration/SyntaxError.js +21 -23
- package/lib/parse/ANTLR/ASTGeneration/constants.js +5 -9
- package/lib/parse/ANTLR/ASTGeneration/helpers.js +0 -0
- package/lib/parse/ANTLR/ASTGeneration/index.js +1 -1
- package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.js +55 -58
- package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.js +54 -58
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLLexerBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgreSQLParserBase.js +17 -19
- package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.js +38 -42
- package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.js +28 -31
- package/lib/parse/ANTLR/README.md +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mssql/TSqlLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mssql/TSqlParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mssql/TSqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/mysql/MySqlLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.js +2 -2
- package/lib/parse/ANTLR/parsers/mysql/MySqlParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/mysql/MySqlParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.js +20 -23
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.js +2 -2
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/postgresql/PostgreSQLParserVisitor.js +19 -22
- package/lib/parse/ANTLR/parsers/postgresql/README.md +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.g4 +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.interp +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.js +19 -21
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeLexer.tokens +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.g4 +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.interp +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.js +2 -2
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParser.tokens +0 -0
- package/lib/parse/ANTLR/parsers/snowflake/SnowflakeParserVisitor.js +19 -22
- package/lib/parse/Parser.js +9 -11
- package/lib/parse/buildParser.js +6 -6
- package/lib/parse/databaseGenerator.js +3 -4
- package/lib/parse/dbml/parser.pegjs +0 -0
- package/lib/parse/dbmlParser.js +11 -11
- package/lib/parse/error.js +8 -10
- package/lib/parse/mssql/base_parsers.js +0 -0
- package/lib/parse/mssql/column_definition/actions.js +0 -0
- package/lib/parse/mssql/column_definition/index.js +0 -0
- package/lib/parse/mssql/constraint_definition/actions.js +6 -7
- package/lib/parse/mssql/constraint_definition/index.js +0 -0
- package/lib/parse/mssql/expression.js +0 -0
- package/lib/parse/mssql/fk_definition/actions.js +0 -0
- package/lib/parse/mssql/fk_definition/index.js +0 -0
- package/lib/parse/mssql/index.js +0 -0
- package/lib/parse/mssql/index_definition/actions.js +0 -0
- package/lib/parse/mssql/index_definition/index.js +0 -0
- package/lib/parse/mssql/keyword_parsers.js +0 -0
- package/lib/parse/mssql/keyword_utils.js +0 -0
- package/lib/parse/mssql/statements/actions.js +0 -0
- package/lib/parse/mssql/statements/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/add/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/add/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/alter_table/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/comments/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/comments/index.js +5 -5
- package/lib/parse/mssql/statements/statement_types/create_index/actions.js +0 -0
- package/lib/parse/mssql/statements/statement_types/create_index/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/create_table/actions.js +6 -6
- package/lib/parse/mssql/statements/statement_types/create_table/index.js +0 -0
- package/lib/parse/mssql/statements/statement_types/index.js +0 -0
- package/lib/parse/mssql/utils.js +1 -1
- package/lib/parse/mssql/whitespaces.js +0 -0
- package/lib/parse/mssqlParser.js +2 -3
- package/lib/parse/mysql/parser.pegjs +0 -0
- package/lib/parse/mysqlParser.js +11 -11
- package/lib/parse/postgresParser.js +1 -1
- package/lib/parse/postgresql/Base_rules.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Alter_table/Alter_table.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Commands.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Comment.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_index.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_normal.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_of.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_table/Create_table_partition_of.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type_enum.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Create_type/Create_type_range.pegjs +0 -0
- package/lib/parse/postgresql/Commands/Ignore_syntax.pegjs +0 -0
- package/lib/parse/postgresql/Expression.pegjs +0 -0
- package/lib/parse/postgresql/InitializerUtils.pegjs +0 -0
- package/lib/parse/postgresql/Keywords.pegjs +0 -0
- package/lib/parse/postgresql/get_parser.js +1 -1
- package/lib/parse/postgresql/parser.pegjs +0 -0
- package/lib/parse/schemarb/parser.pegjs +0 -0
- package/lib/parse/schemarbParser.js +8 -10
- package/lib/utils/version.js +1 -2
- package/package.json +3 -3
- package/types/export/ModelExporter.d.ts +0 -0
- package/types/export/index.d.ts +0 -0
- package/types/import/index.d.ts +0 -0
- package/types/index.d.ts +0 -0
- package/types/model_structure/database.d.ts +0 -0
- package/types/model_structure/dbState.d.ts +0 -0
- package/types/model_structure/element.d.ts +0 -0
- package/types/model_structure/endpoint.d.ts +0 -0
- package/types/model_structure/enum.d.ts +0 -0
- package/types/model_structure/enumValue.d.ts +0 -0
- package/types/model_structure/field.d.ts +0 -0
- package/types/model_structure/indexColumn.d.ts +0 -0
- package/types/model_structure/indexes.d.ts +0 -0
- package/types/model_structure/ref.d.ts +0 -0
- package/types/model_structure/schema.d.ts +0 -0
- package/types/model_structure/stickyNote.d.ts +0 -0
- package/types/model_structure/table.d.ts +0 -0
- package/types/model_structure/tableGroup.d.ts +0 -0
- package/types/model_structure/tablePartial.d.ts +0 -0
- package/types/parse/Parser.d.ts +0 -0
- package/types/parse/error.d.ts +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by PEG.js 0.10.0.
|
|
3
3
|
*
|
|
4
4
|
* http://pegjs.org/
|
|
5
|
-
*/"use strict";function _typeof(
|
|
5
|
+
*/"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var _=require("lodash"),pluralize=require("pluralize");function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}function peg$SyntaxError(message,expected,found,location){this.message=message;this.expected=expected;this.found=found;this.location=location;this.name="SyntaxError";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,peg$SyntaxError);}}peg$subclass(peg$SyntaxError,Error);peg$SyntaxError.buildMessage=function(expected,found){var DESCRIBE_EXPECTATION_FNS={literal:function literal(expectation){return"\""+literalEscape(expectation.text)+"\"";},"class":function _class(expectation){var escapedParts="",i;for(i=0;i<expectation.parts.length;i++){escapedParts+=expectation.parts[i]instanceof Array?classEscape(expectation.parts[i][0])+"-"+classEscape(expectation.parts[i][1]):classEscape(expectation.parts[i]);}return"["+(expectation.inverted?"^":"")+escapedParts+"]";},any:function any(expectation){return"any character";},end:function end(expectation){return"end of input";},other:function other(expectation){return expectation.description;}};function hex(ch){return ch.charCodeAt(0).toString(16).toUpperCase();}function literalEscape(s){return s.replace(/\\/g,'\\\\').replace(/"/g,'\\"').replace(/\0/g,'\\0').replace(/\t/g,'\\t').replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/[\x00-\x0F]/g,function(ch){return'\\x0'+hex(ch);}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(ch){return'\\x'+hex(ch);});}function classEscape(s){return s.replace(/\\/g,'\\\\').replace(/\]/g,'\\]').replace(/\^/g,'\\^').replace(/-/g,'\\-').replace(/\0/g,'\\0').replace(/\t/g,'\\t').replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/[\x00-\x0F]/g,function(ch){return'\\x0'+hex(ch);}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(ch){return'\\x'+hex(ch);});}function describeExpectation(expectation){return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);}function describeExpected(expected){var descriptions=new Array(expected.length),i,j;for(i=0;i<expected.length;i++){descriptions[i]=describeExpectation(expected[i]);}descriptions.sort();if(descriptions.length>0){for(i=1,j=1;i<descriptions.length;i++){if(descriptions[i-1]!==descriptions[i]){descriptions[j]=descriptions[i];j++;}}descriptions.length=j;}switch(descriptions.length){case 1:return descriptions[0];case 2:return descriptions[0]+" or "+descriptions[1];default:return descriptions.slice(0,-1).join(", ")+", or "+descriptions[descriptions.length-1];}}function describeFound(found){return found?"\""+literalEscape(found)+"\"":"end of input";}return"Expected "+describeExpected(expected)+" but "+describeFound(found)+" found.";};function peg$parse(input,options){options=options!==void 0?options:{};var peg$FAILED={},peg$startRuleFunctions={parser:peg$parseparser},peg$startRuleFunction=peg$parseparser,peg$c0=function peg$c0(commands){commands.forEach(function(cmd){var command_name=cmd.command_name,_cmd$value=cmd.value,syntax_name=_cmd$value.syntax_name,value=_cmd$value.value,warning=cmd.warning;switch(command_name.toLowerCase()){case"create_table":var table=value;switch(syntax_name.toLowerCase()){case"create_table_normal":tables.push(table);var pkList=[];table.fields.forEach(function(field){// process inline_refs
|
|
6
6
|
if(field.inline_refs){refs.push.apply(refs,_toConsumableArray(field.inline_refs.map(function(ref){return{name:ref.name,endpoints:[{tableName:table.name,schemaName:table.schemaName,fieldNames:[field.name],relation:"*"},ref.endpoint],onDelete:ref.onDelete,onUpdate:ref.onUpdate};})));}// process composite primary key, if primary key is in composite form, push it into indexes
|
|
7
7
|
if(field.pk){pkList.push(field);}});if(pkList.length>1){table.fields=table.fields.map(function(field){delete field.pk;return field;});var index={columns:pkList.map(function(field){return{value:field.name,type:'column'};}),pk:true};if(table.indexes){table.indexes.push(index);}else{table.indexes=[index];}}break;case"create_table_of":break;case"create_table_partition_of":break;}break;case"create_index":var table_name=value.table_name;delete value.table_name;// remove table_name from column
|
|
8
8
|
var table_index=findTable(table_name.schemaName,table_name.name);if(table_index.indexes){table_index.indexes.push(value);}else{table_index.indexes=[value];}break;case"create_type":switch(syntax_name.toLowerCase()){case"create_type_enum":enums.push(value);break;case"create_type_range":break;}break;case"alter_table":switch(syntax_name.toLowerCase()){case"alter_table_action":value.forEach(function(v){var type=v.type;switch(type.toLowerCase()){case"fk":v.t_value.forEach(function(endpoints){refs.push(endpoints);});}});break;}break;case"comment":switch(syntax_name.toLowerCase()){case"column":{var schemaName=value.schemaName,tableName=value.tableName,columnName=value.columnName;var foundTable=findTable(schemaName,tableName);if(foundTable){var foundField=findField(foundTable,columnName);if(foundField)foundField.note=value.text?{value:value.text}:null;}break;}case"table":{var _value$table_name=value.table_name,_schemaName=_value$table_name.schemaName,_tableName=_value$table_name.name;var _foundTable=findTable(_schemaName,_tableName);if(_foundTable)_foundTable.note=value.text?{value:value.text}:null;break;}}break;case"ignore_syntax":// warnings.push(warning);
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _pegjsRequireImport = _interopRequireDefault(require("pegjs-require-import"));
|
|
4
|
-
function _interopRequireDefault(
|
|
4
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
5
5
|
var _pegjsRequire = (0, _pegjsRequireImport["default"])('./parser.pegjs', {
|
|
6
6
|
format: 'commonjs',
|
|
7
7
|
dependencies: {
|
|
File without changes
|
|
File without changes
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
|
-
function _typeof(
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _toPropertyKey(
|
|
14
|
-
function _toPrimitive(
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
var _ = require("lodash"),
|
|
16
16
|
pluralize = require("pluralize");
|
|
17
17
|
function peg$subclass(child, parent) {
|
|
@@ -161,7 +161,6 @@ function peg$parse(input, options) {
|
|
|
161
161
|
fields: addPrimaryKey(body.fields)
|
|
162
162
|
// index: _.union(...body.index)
|
|
163
163
|
};
|
|
164
|
-
|
|
165
164
|
return {
|
|
166
165
|
table: table,
|
|
167
166
|
refs: createRefFromTableWithReference(table, body.references)
|
|
@@ -2294,7 +2293,7 @@ function peg$parse(input, options) {
|
|
|
2294
2293
|
return table.name === referenceTable;
|
|
2295
2294
|
});
|
|
2296
2295
|
if (!toTable) {
|
|
2297
|
-
return
|
|
2296
|
+
return 1; // continue
|
|
2298
2297
|
}
|
|
2299
2298
|
// add field to table if not exists (`${reference}_id`)
|
|
2300
2299
|
// auto add type of new field to be varchar if primaryKey not found
|
|
@@ -2328,8 +2327,7 @@ function peg$parse(input, options) {
|
|
|
2328
2327
|
});
|
|
2329
2328
|
};
|
|
2330
2329
|
for (var i = 0; i < references.length; i += 1) {
|
|
2331
|
-
|
|
2332
|
-
if (_ret === "continue") continue;
|
|
2330
|
+
if (_loop()) continue;
|
|
2333
2331
|
}
|
|
2334
2332
|
return refs;
|
|
2335
2333
|
}
|
package/lib/utils/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.6",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublish": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dbml/parse": "^3.13.
|
|
35
|
+
"@dbml/parse": "^3.13.6",
|
|
36
36
|
"antlr4": "^4.13.1",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"parsimmon": "^1.13.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"\\.(?!json$)[^.]*$": "@glen/jest-raw-loader"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a36ce92fe9350c5a509aa37a3bb0bb35fb3e82a0",
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=16"
|
|
65
65
|
}
|
|
File without changes
|
package/types/export/index.d.ts
CHANGED
|
File without changes
|
package/types/import/index.d.ts
CHANGED
|
File without changes
|
package/types/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
|
package/types/parse/Parser.d.ts
CHANGED
|
File without changes
|
package/types/parse/error.d.ts
CHANGED
|
File without changes
|