mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-01 18:06:53 +01:00
fix(MySQL): procedures exportation
This commit is contained in:
parent
832fb0fb03
commit
4276586e11
@ -285,7 +285,9 @@ ${footer}
|
|||||||
|
|
||||||
const routine = routines[0];
|
const routine = routines[0];
|
||||||
|
|
||||||
const { sql_mode: sqlMode, 'Create Function': createProcedure } = routine;
|
const fieldName = `Create ${type === 'PROCEDURE' ? 'Procedure' : 'Function'}`;
|
||||||
|
const sqlMode = routine.sql_mode;
|
||||||
|
const createProcedure = routine[fieldName];
|
||||||
|
|
||||||
const startOffset = createProcedure.indexOf(type);
|
const startOffset = createProcedure.indexOf(type);
|
||||||
const procedureBody = createProcedure.substring(startOffset);
|
const procedureBody = createProcedure.substring(startOffset);
|
||||||
@ -302,7 +304,7 @@ ${footer}
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _queryStream (sql) {
|
async _queryStream (sql) {
|
||||||
console.log(sql);
|
if (process.env.NODE_ENV === 'development') console.log(sql);
|
||||||
const isPool = typeof this._client._connection.getConnection === 'function';
|
const isPool = typeof this._client._connection.getConnection === 'function';
|
||||||
const connection = isPool ? await this._client._connection.getConnection() : this._client._connection;
|
const connection = isPool ? await this._client._connection.getConnection() : this._client._connection;
|
||||||
const stream = connection.connection.query(sql).stream();
|
const stream = connection.connection.query(sql).stream();
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { app } from 'electron';
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { BaseExporter } from '../BaseExporter';
|
import { BaseExporter } from '../BaseExporter';
|
||||||
|
|
||||||
@ -128,7 +127,7 @@ export class SqlExporter extends BaseExporter {
|
|||||||
const serverVersion = await this.getServerVersion();
|
const serverVersion = await this.getServerVersion();
|
||||||
const header = `************************************************************
|
const header = `************************************************************
|
||||||
Antares - SQL Client
|
Antares - SQL Client
|
||||||
Version ${app.getVersion()}
|
Version ${process.env.PACKAGE_VERSION}
|
||||||
|
|
||||||
https://antares-sql.app/
|
https://antares-sql.app/
|
||||||
https://github.com/Fabio286/antares
|
https://github.com/Fabio286/antares
|
||||||
|
Loading…
x
Reference in New Issue
Block a user