mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 18:46:02 +00:00
Fixed: does no longer work with Cockroach DB #1202
This commit is contained in:
@@ -357,7 +357,7 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
const [processes, variables, databases] = await Promise.all([
|
const [processes, variables, databases] = await Promise.all([
|
||||||
this.listProcesses(dbhan),
|
this.listProcesses(dbhan),
|
||||||
this.listVariables(dbhan),
|
this.listVariables(dbhan),
|
||||||
this.listDatabases(dbhan),
|
this.listDatabasesFull(dbhan),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** @type {import('dbgate-types').ServerSummary} */
|
/** @type {import('dbgate-types').ServerSummary} */
|
||||||
@@ -381,11 +381,16 @@ const drivers = driverBases.map(driverBase => ({
|
|||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
async listDatabases(dbhan) {
|
async listDatabasesFull(dbhan) {
|
||||||
const { rows } = await this.query(dbhan, sql.listDatabases);
|
const { rows } = await this.query(dbhan, sql.listDatabases);
|
||||||
return rows;
|
return rows;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async listDatabases(dbhan) {
|
||||||
|
const { rows } = await this.query(dbhan, 'SELECT datname AS name FROM pg_database WHERE datistemplate = false');
|
||||||
|
return rows;
|
||||||
|
},
|
||||||
|
|
||||||
async listVariables(dbhan) {
|
async listVariables(dbhan) {
|
||||||
const result = await this.query(dbhan, sql.listVariables);
|
const result = await this.query(dbhan, sql.listVariables);
|
||||||
return result.rows.map(row => ({
|
return result.rows.map(row => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user