1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-02-17 12:10:39 +01:00

fix: wrong schema passed in query tab when selected a different database

This commit is contained in:
Fabio 2020-08-14 11:25:50 +02:00
parent 59e4a79f42
commit 6d0724dc90

View File

@ -75,6 +75,11 @@ export default {
if (this.results.fields.length) if (this.results.fields.length)
return this.results.fields[0].orgTable; return this.results.fields[0].orgTable;
return ''; return '';
},
schema () {
if (this.results.fields.length)
return this.results.fields[0].db;
return '';
} }
}, },
methods: { methods: {
@ -91,8 +96,7 @@ export default {
try { try {
const params = { const params = {
uid: this.connection.uid, uid: this.connection.uid,
query, query
schema: this.workspace.breadcrumbs.schema
}; };
const { status, response } = await Connection.rawQuery(params); const { status, response } = await Connection.rawQuery(params);
@ -110,7 +114,7 @@ export default {
try { try {
const params = { const params = {
uid: this.connection.uid, uid: this.connection.uid,
schema: this.workspace.breadcrumbs.schema, schema: this.schema,
table: this.table table: this.table
}; };