Skip to content

Commit

Permalink
QFIX: PG query
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
  • Loading branch information
haiodo committed Jan 18, 2025
1 parent 9daab4d commit 67ca63d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/postgres/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,8 @@ abstract class PostgresAdapterBase implements DbAdapter {
switch (type) {
case 'common':
if (Array.isArray(val) && val.includes(null)) {
res.push(`(${tkey} = ANY(${vars.addArray(val, inferType(val))})) OR ${tkey} IS NULL`)
const vv = vars.addArray(val, inferType(val))
res.push(`(${tkey} = ANY(${vv}) OR ${tkey} IS NULL)`)
} else {
if (val.length > 0) {
res.push(`${tkey} = ANY(${vars.addArray(val, inferType(val))})`)
Expand Down

0 comments on commit 67ca63d

Please sign in to comment.