1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: enhanced automatic schema selection

This commit is contained in:
2020-09-29 16:43:20 +02:00
parent 96f38297c1
commit 52449e0420
5 changed files with 27 additions and 10 deletions

View File

@ -27,8 +27,7 @@ export class MySQLClient extends AntaresCore {
* @memberof MySQLClient
*/
use (schema) {
const sql = `USE \`${schema}\``;
return this.raw(sql);
return this.raw(`USE \`${schema}\``);
}
/**
@ -48,7 +47,7 @@ export class MySQLClient extends AntaresCore {
return databases.map(db => {
return {
name: db.Database,
tables: tables.filter(table => table.TABLE_SCHEMA === db.Database)
tables: tables.filter(table => table.TABLE_SCHEMA === db.Database)// TODO: remap tables objects
};
});
}