ReviewOS

also looking at this

stacks/bun-query-builder

fix(client)!: bind db.raw and db.sql fragment values or refuse them

#1152
Merged glennmichael123 wants to merge fix/db-sql-raw-bindings into main
16 files +455 -118
docs/api/reference.mdmodified+1-1
Changes to docs/api/reference.md
@@ -49,7 +49,7 @@ const meta = buildSchemaMeta(models)
4949|--------|-------------|---------|
5050| `selectFrom(table)` | Start a SELECT query | `db.selectFrom('users')` |
5151| `select(columns)` | Select specific columns | `.select(['id', 'name'])` |
52| `selectRaw(sql)` | Select with raw SQL | `.selectRaw('COUNT(*) as count')` |
52| `selectRaw(fragment)` | Select with raw SQL (one fragment, no bindings) | ``.selectRaw(raw`COUNT(*) as count`)`` |
5353| `distinct()` | Add DISTINCT modifier | `.distinct()` |
5454| `distinctOn(columns)` | DISTINCT ON (PostgreSQL) | `.distinctOn('email')` |
5555