From 6d0724dc90cdebb10e0342d2c472bdd07aa345f8 Mon Sep 17 00:00:00 2001 From: Fabio Date: Fri, 14 Aug 2020 11:25:50 +0200 Subject: [PATCH] fix: wrong schema passed in query tab when selected a different database --- src/renderer/components/WorkspaceQueryTab.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/WorkspaceQueryTab.vue b/src/renderer/components/WorkspaceQueryTab.vue index 79160cc6..a9bce245 100644 --- a/src/renderer/components/WorkspaceQueryTab.vue +++ b/src/renderer/components/WorkspaceQueryTab.vue @@ -75,6 +75,11 @@ export default { if (this.results.fields.length) return this.results.fields[0].orgTable; return ''; + }, + schema () { + if (this.results.fields.length) + return this.results.fields[0].db; + return ''; } }, methods: { @@ -91,8 +96,7 @@ export default { try { const params = { uid: this.connection.uid, - query, - schema: this.workspace.breadcrumbs.schema + query }; const { status, response } = await Connection.rawQuery(params); @@ -110,7 +114,7 @@ export default { try { const params = { uid: this.connection.uid, - schema: this.workspace.breadcrumbs.schema, + schema: this.schema, table: this.table };