ReviewOS

also looking at this

stacks/bun-query-builder

fix(postgres): skip literals and comments when numbering placeholders

#1151
Merged glennmichael123 wants to merge fix/pg-placeholders-skip-literals into main
7 files +224 -45
docs/guide/where.mdmodified+5-0
Changes to docs/guide/where.md
@@ -239,6 +239,11 @@ const tagged = await Post.query()
239239 .get()
240240```
241241
242A `?` inside a string literal, quoted identifier or comment is not a
243placeholder. Postgres' jsonb `?`, `?|` and `?&` operators can't be told apart
244from placeholders, so use their function forms, `jsonb_exists(tags, ?)`,
245`jsonb_exists_any(tags, ?)` and `jsonb_exists_all(tags, ?)`.
246
242247## Date Conditions
243248
244249```typescript