fix: filtered queries with Postgres
The build_where_sql() function always started parameter numbering from 1, regardless of how many parameters were already bound before calling it. This caused placeholder collisions on Postgres (which uses numbered $1, $2 placeholders) but worked on SQLite (which uses ? and ignores indices).
For example, a filtered query would generate:
WHERE record.collection = $1 AND json->>'uri' = $1
Instead of:
WHERE record.collection = $1 AND json->>'uri' = $2
This follows the same pattern as the pagination fix in commit d2dd4a0.
Fixes #7
authored by
tangled.org
2d178be0
1803dbd3