Skip to content

Commit

Permalink
fix: unable to call stored routines from query tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Jan 19, 2021
1 parent 8ff6e70 commit 4923128
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/libs/clients/MySQLClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -1096,7 +1099,7 @@ export class MySQLClient extends AntaresCore {
orgTable: field.orgTable,
type: 'VARCHAR'
};
})
}).filter(Boolean)
: [];

if (args.details) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4923128

Please sign in to comment.