mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 01:26:01 +00:00
safe mysql analyser
This commit is contained in:
@@ -229,6 +229,17 @@ export class DatabaseAnalyser {
|
||||
return [..._compact(res), ...this.getDeletedObjects(snapshot)];
|
||||
}
|
||||
|
||||
async safeQuery(sql) {
|
||||
try {
|
||||
return await this.driver.query(this.pool, sql);
|
||||
} catch (err) {
|
||||
console.log('Error running analyser query', err.message);
|
||||
return {
|
||||
rows: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static createEmptyStructure(): DatabaseInfo {
|
||||
return {
|
||||
tables: [],
|
||||
|
||||
Reference in New Issue
Block a user