Skip to content

Commit

Permalink
fix: render empty tuple as (NULL)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Sep 16, 2022
1 parent fc93391 commit 586a516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/postgres/internal/token.ts
Expand Up @@ -96,7 +96,7 @@ function renderList(
ctx
)
const sql = tokens.join(token.concat ? '' : ', ')
return token.tuple ? `(${sql})` : sql
return token.tuple ? `(${sql || 'NULL'})` : sql
}

function mapTokensToSql(this: Query.Context, arg: Token | TokenArray) {
Expand Down

0 comments on commit 586a516

Please sign in to comment.