mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 17:26:01 +00:00
fix
This commit is contained in:
@@ -172,6 +172,7 @@ class SqlDumper {
|
|||||||
* @param {(col: T) => void} lambda
|
* @param {(col: T) => void} lambda
|
||||||
*/
|
*/
|
||||||
putCollection(delimiter, collection, lambda) {
|
putCollection(delimiter, collection, lambda) {
|
||||||
|
if (!collection) return;
|
||||||
let first = true;
|
let first = true;
|
||||||
for (const item of collection) {
|
for (const item of collection) {
|
||||||
if (!first) this.put(delimiter);
|
if (!first) this.put(delimiter);
|
||||||
@@ -196,10 +197,12 @@ class SqlDumper {
|
|||||||
table.primaryKey.columns.map(x => x.columnName)
|
table.primaryKey.columns.map(x => x.columnName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
table.foreignKeys.forEach(fk => {
|
if (table.foreignKeys) {
|
||||||
this.put(",&n");
|
table.foreignKeys.forEach(fk => {
|
||||||
this.createForeignKeyFore(fk);
|
this.put(",&n");
|
||||||
});
|
this.createForeignKeyFore(fk);
|
||||||
|
});
|
||||||
|
}
|
||||||
// foreach (var cnt in table.Uniques)
|
// foreach (var cnt in table.Uniques)
|
||||||
// {
|
// {
|
||||||
// if (!first) this.put(", &n");
|
// if (!first) this.put(", &n");
|
||||||
|
|||||||
Reference in New Issue
Block a user