yikkwong
yikkwong
DTDrizzle Team
Created by yikkwong on 10/28/2023 in #help
Broken query when parametized query is undefined
Postgres dialect generates broken query when one of the parametized query is undefined
sql`SELECT 1 FROM test WHERE a = ${true} AND b = ${undefined} AND c = {1}`
sql`SELECT 1 FROM test WHERE a = ${true} AND b = ${undefined} AND c = {1}`
generates
SELECT 1 FROM test WHERE a = $1 AND b = AND c = $2;
SELECT 1 FROM test WHERE a = $1 AND b = AND c = $2;
28 replies