Skip to content

Commit

Permalink
fix: error with import/export tools, fixes #541
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Feb 27, 2023
1 parent 6bd8667 commit d1297a0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/libs/clients/MySQLClient.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import * as antares from 'common/interfaces/antares';
import * as mysql from 'mysql2/promise';
import * as Store from 'electron-store';
import { AntaresCore } from '../AntaresCore';
import dataTypes from 'common/data-types/mysql';
import SSH2Promise = require('ssh2-promise');
import SSHConfig from 'ssh2-promise/lib/sshConfig';

Store.initRenderer();
const settingsStore = new Store({ name: 'settings' });

export class MySQLClient extends AntaresCore {
private _schema?: string;
private _runningConnections: Map<string, number>;
Expand Down Expand Up @@ -309,10 +305,15 @@ export class MySQLClient extends AntaresCore {
const triggersArr: ShowTriggersResult[] = [];
let schemaSize = 0;

const Store = require('electron-store');

Store.initRenderer();
const settingsStore = new Store({ name: 'settings' });

for (const db of filteredDatabases) {
if (!schemas.has(db.Database)) continue;

const showTableSize = settingsStore.get('show_table_size');
const showTableSize = settingsStore.get('show_table_size', false);

if (showTableSize) {
let { rows: tables } = await this.raw<antares.QueryResult<ShowTableResult>>(`
Expand Down

0 comments on commit d1297a0

Please sign in to comment.