mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 01:03:58 +00:00
Merge branch 'master' of https://github.com/dbgate/dbgate
This commit is contained in:
@@ -25,7 +25,7 @@ Supported databases:
|
|||||||
* Master/detail views
|
* Master/detail views
|
||||||
* Query designer
|
* Query designer
|
||||||
* Form view for comfortable work with tables with many columns
|
* Form view for comfortable work with tables with many columns
|
||||||
* JSON view on MognoDB collections
|
* JSON view on MongoDB collections
|
||||||
* Explore tables, views, procedures, functions, MongoDB collections
|
* Explore tables, views, procedures, functions, MongoDB collections
|
||||||
* SQL editor, execute SQL script, SQL code formatter, SQL code completion, SQL join wizard
|
* SQL editor, execute SQL script, SQL code formatter, SQL code completion, SQL join wizard
|
||||||
* Mongo JavaScript editor, execute Mongo script (with NodeJs syntax)
|
* Mongo JavaScript editor, execute Mongo script (with NodeJs syntax)
|
||||||
|
|||||||
@@ -79,8 +79,13 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
async getViewTexts(allViewNames) {
|
async getViewTexts(allViewNames) {
|
||||||
const res = {};
|
const res = {};
|
||||||
for (const viewName of this.getRequestedViewNames(allViewNames)) {
|
for (const viewName of this.getRequestedViewNames(allViewNames)) {
|
||||||
|
try {
|
||||||
const resp = await this.driver.query(this.pool, `SHOW CREATE VIEW \`${viewName}\``);
|
const resp = await this.driver.query(this.pool, `SHOW CREATE VIEW \`${viewName}\``);
|
||||||
res[viewName] = resp.rows[0]['Create View'];
|
res[viewName] = resp.rows[0]['Create View'];
|
||||||
|
} catch(err) {
|
||||||
|
console.log('ERROR', err);
|
||||||
|
res[viewName] = `${err}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user