fix: unable to call stored routines from query tabs

This commit is contained in:
Fabio Di Stasio 2021-01-19 19:14:11 +01:00
parent 8ff6e70145
commit 4923128236
1 changed files with 5 additions and 2 deletions

View File

@ -1088,6 +1088,9 @@ export class MySQLClient extends AntaresCore {
else {
const remappedFields = fields
? fields.map(field => {
if (!field || Array.isArray(field))
return false;
return {
name: field.name,
orgName: field.orgName,
@ -1096,7 +1099,7 @@ export class MySQLClient extends AntaresCore {
orgTable: field.orgTable,
type: 'VARCHAR'
};
})
}).filter(Boolean)
: [];
if (args.details) {
@ -1173,7 +1176,7 @@ export class MySQLClient extends AntaresCore {
}
resolve({
rows: Array.isArray(queryResult) ? queryResult : false,
rows: Array.isArray(queryResult) ? queryResult.some(el => Array.isArray(el)) ? [] : queryResult : false,
report: !Array.isArray(queryResult) ? queryResult : false,
fields: fieldsArr.length ? fieldsArr : remappedFields,
keys: keysArr