diff --git a/src/renderer/components/WorkspaceQueryTab.vue b/src/renderer/components/WorkspaceQueryTab.vue index 9bdef6e6..709dc206 100644 --- a/src/renderer/components/WorkspaceQueryTab.vue +++ b/src/renderer/components/WorkspaceQueryTab.vue @@ -89,11 +89,13 @@ export default { }), getResultParams (index) { const resultsWithRows = this.results.filter(result => result.rows); + let cachedTable; if (resultsWithRows[index] && resultsWithRows[index].fields && resultsWithRows[index].fields.length) { return resultsWithRows[index].fields.map(field => { + if (field.orgTable) cachedTable = field.orgTable;// Needed for some queries on information_schema return { - table: field.orgTable, + table: field.orgTable || cachedTable, schema: field.db || 'INFORMATION_SCHEMA' }; }).filter((val, i, arr) => arr.findIndex(el => el.schema === val.schema && el.table === val.table) === i); @@ -147,6 +149,11 @@ export default { return { ...field, alias: result.fields[fI++].name }; }); } + if (!fields.length) { + fields = response.map(field => { + return { ...field, alias: result.fields[fI++].name }; + }); + } fieldsArr[qI] = fieldsArr[qI] ? [...fieldsArr[qI], ...fields] : fields; } diff --git a/src/renderer/components/WorkspaceQueryTable.vue b/src/renderer/components/WorkspaceQueryTable.vue index ef762a0e..fc873d10 100644 --- a/src/renderer/components/WorkspaceQueryTable.vue +++ b/src/renderer/components/WorkspaceQueryTable.vue @@ -141,11 +141,14 @@ export default { resultsWithRows () { return this.results.filter(result => result.rows); }, + tabProperties () { + return this.getWorkspaceTab(this.tabUid); + }, fields () { - return this.getWorkspaceTab(this.tabUid) && this.getWorkspaceTab(this.tabUid).fields[this.resultsetIndex] ? this.getWorkspaceTab(this.tabUid).fields[this.resultsetIndex] : []; + return this.tabProperties && this.tabProperties.fields[this.resultsetIndex] ? this.tabProperties.fields[this.resultsetIndex] : []; }, keyUsage () { - return this.getWorkspaceTab(this.tabUid) && this.getWorkspaceTab(this.tabUid).keyUsage[this.resultsetIndex] ? this.getWorkspaceTab(this.tabUid).keyUsage[this.resultsetIndex] : []; + return this.tabProperties && this.tabProperties.keyUsage[this.resultsetIndex] ? this.tabProperties.keyUsage[this.resultsetIndex] : []; } }, watch: { diff --git a/src/renderer/store/modules/application.store.js b/src/renderer/store/modules/application.store.js index 812af3b8..5b316e26 100644 --- a/src/renderer/store/modules/application.store.js +++ b/src/renderer/store/modules/application.store.js @@ -3,7 +3,7 @@ export default { namespaced: true, strict: true, state: { - app_name: 'Antares - Database Client', + app_name: 'Antares - SQL Client', app_version: process.env.PACKAGE_VERSION || 0, is_loading: false, is_new_modal: false, diff --git a/src/renderer/store/modules/settings.store.js b/src/renderer/store/modules/settings.store.js index 5b6d0b6a..1751f8c1 100644 --- a/src/renderer/store/modules/settings.store.js +++ b/src/renderer/store/modules/settings.store.js @@ -7,7 +7,7 @@ export default { state: { locale: 'en-US', explorebar_size: null, - notifications_timeout: 10 + notifications_timeout: 5 }, getters: { getLocale: state => state.locale,