QFIX: PG query
Some checks failed
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / build (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / test (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-01-18 23:38:46 +07:00
parent 9daab4d749
commit 67ca63dace
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -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))})`)