Skip to content

Commit

Permalink
fix: fixed getSqlSelectFromRow
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKorneevGA committed Nov 28, 2023
1 parent e6becc4 commit 926ede7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ const getSqlSelectFromRow = (config) => {
} else if (value === null) {
return `${value} AS ${key}`;
} else if (value instanceof Array) {
return `[${getSelectStatement(value)}] AS ${key}`;
return `[${getSqlSelectFromRow(value)}] AS ${key}`;
} else {
if (isStringInteger(key)) return `STRUCT(${getSelectStatement(value)})`;
else return `STRUCT(${getSelectStatement(value)}) AS ${key}`;
if (isStringInteger(key)) return `STRUCT(${getSqlSelectFromRow(value)})`;
else return `STRUCT(${getSqlSelectFromRow(value)}) AS ${key}`;
}
})
.join(", ");
Expand Down

0 comments on commit 926ede7

Please sign in to comment.