|
|
@ -13,6 +13,7 @@ class Xsql { |
|
|
|
this.pool = {}; |
|
|
|
this.pool = {}; |
|
|
|
this.metaDb = {}; |
|
|
|
this.metaDb = {}; |
|
|
|
this.metaDb.tables = {}; |
|
|
|
this.metaDb.tables = {}; |
|
|
|
|
|
|
|
this.metaDb.routines = {} |
|
|
|
|
|
|
|
|
|
|
|
this.sqlConfig = sqlConfig; |
|
|
|
this.sqlConfig = sqlConfig; |
|
|
|
this.pool = pool; |
|
|
|
this.pool = pool; |
|
|
@ -49,10 +50,11 @@ class Xsql { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
self.iterateToCacheTables(results); |
|
|
|
self.iterateToCacheTables(results) |
|
|
|
self.iterateToCacheTablePks(results); |
|
|
|
self.iterateToCacheTablePks(results) |
|
|
|
self.iterateToCacheTableColumns(results); |
|
|
|
self.iterateToCacheTableColumns(results) |
|
|
|
self.iterateToCacheTableFks(results); |
|
|
|
self.iterateToCacheTableFks(results) |
|
|
|
|
|
|
|
self.iterateToCacheRoutines(results) |
|
|
|
|
|
|
|
|
|
|
|
// osx mysql server has limitations related to open_tables
|
|
|
|
// osx mysql server has limitations related to open_tables
|
|
|
|
self.pool.query("FLUSH TABLES", [], (err, results) => { |
|
|
|
self.pool.query("FLUSH TABLES", [], (err, results) => { |
|
|
@ -741,6 +743,14 @@ class Xsql { |
|
|
|
return schemaRoutes; |
|
|
|
return schemaRoutes; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getProcList() { |
|
|
|
|
|
|
|
let procRoutes = [] |
|
|
|
|
|
|
|
for (var procName in this.metaDb.routines) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return procRoutes |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getJoinType(joinInQueryParams) { |
|
|
|
getJoinType(joinInQueryParams) { |
|
|
|
//console.log('joinInQueryParams',joinInQueryParams);
|
|
|
|
//console.log('joinInQueryParams',joinInQueryParams);
|
|
|
|
|
|
|
|
|
|
|
|