Skip to content

Commit

Permalink
fix: make name for columns for ordinality unique (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
larslutz96 authored Jul 18, 2024
1 parent 6ed7ce4 commit d3f9b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hana/lib/HANAService.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class HANAService extends SQLService {
// Making each row a maximum size of 2gb instead of the whole result set to be 2gb
// Excluding binary columns as they are not supported by FOR JSON and themselves can be 2gb
const rawJsonColumn = sql.length
? `(SELECT ${sql} FROM JSON_TABLE('[{}]', '$' COLUMNS(I FOR ORDINALITY)) FOR JSON ('format'='no', 'omitnull'='no', 'arraywrap'='no') RETURNS NVARCHAR(2147483647))`
? `(SELECT ${sql} FROM JSON_TABLE('[{}]', '$' COLUMNS("'$$FaKeDuMmYCoLuMn$$'" FOR ORDINALITY)) FOR JSON ('format'='no', 'omitnull'='no', 'arraywrap'='no') RETURNS NVARCHAR(2147483647))`
: `'{}'`

let jsonColumn = rawJsonColumn
Expand Down

0 comments on commit d3f9b23

Please sign in to comment.