From 3e13b9962d4d42246ce774186600c7b243a836f8 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 13 Jun 2020 18:14:32 +0200 Subject: [PATCH] Performance improvements --- src/main/index.js | 1 + src/main/libs/AntaresConnector.js | 1 + src/main/models/InformationSchema.js | 2 ++ src/renderer/components/WorkspaceQueryTab.vue | 1 + src/renderer/components/WorkspaceTableTab.vue | 19 ++++++++++++++++--- .../store/modules/workspaces.store.js | 3 ++- 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index ca21c1e8..8452565e 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -7,6 +7,7 @@ import { autoUpdater } from 'electron-updater'; import ipcHandlers from './ipc-handlers'; +if (module.hot) module.hot.accept(); const isDevelopment = process.env.NODE_ENV === 'development'; process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true'; diff --git a/src/main/libs/AntaresConnector.js b/src/main/libs/AntaresConnector.js index 6c2b40b7..aa4fd546 100644 --- a/src/main/libs/AntaresConnector.js +++ b/src/main/libs/AntaresConnector.js @@ -57,6 +57,7 @@ export class AntaresConnector { switch (this.client) { case 'maria': case 'mysql': { + console.log(mysql); const [rows, fields] = await this.connection.query(sql); return { rows, fields }; } diff --git a/src/main/models/InformationSchema.js b/src/main/models/InformationSchema.js index 507cb011..06047d16 100644 --- a/src/main/models/InformationSchema.js +++ b/src/main/models/InformationSchema.js @@ -7,4 +7,6 @@ export default class { static getStructure (connection) { return connection.raw('SELECT * FROM information_schema.TABLES ORDER BY TABLE_SCHEMA, TABLE_NAME ASC'); } + + // TODO: SELECT * FROM `information_schema`.`COLUMNS` WHERE TABLE_SCHEMA='fepcomdb' AND TABLE_NAME='macchine' ORDER BY ORDINAL_POSITION; } diff --git a/src/renderer/components/WorkspaceQueryTab.vue b/src/renderer/components/WorkspaceQueryTab.vue index 20465df7..de90563d 100644 --- a/src/renderer/components/WorkspaceQueryTab.vue +++ b/src/renderer/components/WorkspaceQueryTab.vue @@ -7,6 +7,7 @@