Skip to content

Commit

Permalink
Fix await position
Browse files Browse the repository at this point in the history
  • Loading branch information
BobdenOs committed Jul 11, 2024
1 parent e803cbd commit 0d2df8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-service/lib/SQLService.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class SQLService extends DatabaseService {
const isOne = cqn.SELECT.one || query.SELECT.from?.ref?.[0].cardinality?.max === 1

let ps = await this.prepare(sql)
let rows = await (hasPostProcessing === false || iterator) ? ps.stream(values, isOne, iterator) : ps.all(values)
let rows = (hasPostProcessing === false || iterator) ? await ps.stream(values, isOne, iterator) : await ps.all(values)
if (rows.length)
if (expand) rows = rows.map(r => (typeof r._json_ === 'string' ? JSON.parse(r._json_) : r._json_ || r))

Expand Down

0 comments on commit 0d2df8d

Please sign in to comment.