also looking at this
fix(client)!: bind db.raw and db.sql fragment values or refuse them
#1152
16 files
+455
-118
| @@ -49,7 +49,7 @@ const meta = buildSchemaMeta(models) | ||
| 49 | 49 | |--------|-------------|---------| |
| 50 | 50 | | `selectFrom(table)` | Start a SELECT query | `db.selectFrom('users')` | |
| 51 | 51 | | `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`)`` | | |
| 53 | 53 | | `distinct()` | Add DISTINCT modifier | `.distinct()` | |
| 54 | 54 | | `distinctOn(columns)` | DISTINCT ON (PostgreSQL) | `.distinctOn('email')` | |
| 55 | 55 | |