mirror of https://github.com/Fabio286/antares.git
fix(MySQL): multiple queries non properly split in some cases
This commit is contained in:
parent
6e332da425
commit
5208ec171b
|
@ -1278,7 +1278,7 @@ export class MySQLClient extends AntaresCore {
|
||||||
const nestTables = args.nest ? '.' : false;
|
const nestTables = args.nest ? '.' : false;
|
||||||
const resultsArr = [];
|
const resultsArr = [];
|
||||||
let paramsArr = [];
|
let paramsArr = [];
|
||||||
const queries = args.split ? sql.split(/(?!\B['"][^'"]*);(?![^'"]*['"]\B)/gm) : [sql];
|
const queries = args.split ? sql.split(/((?:[^;'"]*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*')[^;'"]*)+)|;/gm) : [sql];
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') this._logger(sql);// TODO: replace BLOB content with a placeholder
|
if (process.env.NODE_ENV === 'development') this._logger(sql);// TODO: replace BLOB content with a placeholder
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue