mirror of https://github.com/Fabio286/antares.git
fix: error with import/export tools, fixes #541
This commit is contained in:
parent
6bd8667f43
commit
d1297a0085
|
@ -1,14 +1,10 @@
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
import * as Store from 'electron-store';
|
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { AntaresCore } from '../AntaresCore';
|
||||||
import dataTypes from 'common/data-types/mysql';
|
import dataTypes from 'common/data-types/mysql';
|
||||||
import SSH2Promise = require('ssh2-promise');
|
import SSH2Promise = require('ssh2-promise');
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
||||||
|
|
||||||
Store.initRenderer();
|
|
||||||
const settingsStore = new Store({ name: 'settings' });
|
|
||||||
|
|
||||||
export class MySQLClient extends AntaresCore {
|
export class MySQLClient extends AntaresCore {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
|
@ -309,10 +305,15 @@ export class MySQLClient extends AntaresCore {
|
||||||
const triggersArr: ShowTriggersResult[] = [];
|
const triggersArr: ShowTriggersResult[] = [];
|
||||||
let schemaSize = 0;
|
let schemaSize = 0;
|
||||||
|
|
||||||
|
const Store = require('electron-store');
|
||||||
|
|
||||||
|
Store.initRenderer();
|
||||||
|
const settingsStore = new Store({ name: 'settings' });
|
||||||
|
|
||||||
for (const db of filteredDatabases) {
|
for (const db of filteredDatabases) {
|
||||||
if (!schemas.has(db.Database)) continue;
|
if (!schemas.has(db.Database)) continue;
|
||||||
|
|
||||||
const showTableSize = settingsStore.get('show_table_size');
|
const showTableSize = settingsStore.get('show_table_size', false);
|
||||||
|
|
||||||
if (showTableSize) {
|
if (showTableSize) {
|
||||||
let { rows: tables } = await this.raw<antares.QueryResult<ShowTableResult>>(`
|
let { rows: tables } = await this.raw<antares.QueryResult<ShowTableResult>>(`
|
||||||
|
|
Loading…
Reference in New Issue