We don't substitute prepared statements parameters when converting to SQL, e.x.
SELECT count(*) AS "count"
FROM "PUBLIC"."PRODUCTS"
WHERE "PUBLIC"."PRODUCTS"."CATEGORY" = ?
This results in a somewhat confusing Parameter "#1" is not set error.
Ideally we should substitute the actually parameters, but if we can't do that we should provide a more helpful warning of some kind.