|
|
@ -57,10 +57,16 @@ class Xsql { |
|
|
|
self.iterateToCacheRoutines(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) => { |
|
|
|
cbk(null, null); |
|
|
|
self.pool.query(dataHelp.getRoutines(), [this.sqlConfig.database], (err, results) => { |
|
|
|
}); |
|
|
|
if (err) { |
|
|
|
|
|
|
|
cbk(err, results) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
self.iterateToCacheRoutines(results) |
|
|
|
|
|
|
|
cbk(null, null) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -82,6 +88,15 @@ class Xsql { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iterateToCacheRoutines(routineResults) { |
|
|
|
|
|
|
|
for (let i = 0; i < routineResults.length; i++) { |
|
|
|
|
|
|
|
const routine = routineResults[i] |
|
|
|
|
|
|
|
const routineName = routine['routine_name'] |
|
|
|
|
|
|
|
this.metaDb.routines[routineName] = {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(JSON.stringify(this.metaDb)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
iterateToCacheTableColumns(schemaResults) { |
|
|
|
iterateToCacheTableColumns(schemaResults) { |
|
|
|
for (let i = 0; i < schemaResults.length; ++i) { |
|
|
|
for (let i = 0; i < schemaResults.length; ++i) { |
|
|
|
let schemaRow = schemaResults[i]; |
|
|
|
let schemaRow = schemaResults[i]; |
|
|
|