We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sql select
1 parent 2121f65 commit 3336488Copy full SHA for 3336488
src/content/documentation/docs/sql.mdx
@@ -386,8 +386,8 @@ import { usersTable } from 'schema'
386
387
await db.select({
388
id: usersTable.id,
389
- lowerName: sql<string>`lower(${usersTable})`,
390
- aliasedName: sql<string>`lower(${usersTable})`.as('aliased_column'),
+ lowerName: sql<string>`lower(${usersTable.name})`,
+ aliasedName: sql<string>`lower(${usersTable.name})`.as('aliased_column'),
391
count: sql<number>`count(*)`.mapWith(Number)
392
}).from(usersTable)
393
```
@@ -483,4 +483,4 @@ await db.select({
483
```sql
484
select "project_id", count("users"."id") from users group by "users"."project_id" having count("users"."id") > 300;
485
486
-</Section>
+</Section>
0 commit comments