Skip to content

Commit 3336488

Browse files
authored
fix(sql): missing field in code sql select example
1 parent 2121f65 commit 3336488

File tree

1 file changed

+3
-3
lines changed
  • src/content/documentation/docs

1 file changed

+3
-3
lines changed

src/content/documentation/docs/sql.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ import { usersTable } from 'schema'
386386

387387
await db.select({
388388
id: usersTable.id,
389-
lowerName: sql<string>`lower(${usersTable})`,
390-
aliasedName: sql<string>`lower(${usersTable})`.as('aliased_column'),
389+
lowerName: sql<string>`lower(${usersTable.name})`,
390+
aliasedName: sql<string>`lower(${usersTable.name})`.as('aliased_column'),
391391
count: sql<number>`count(*)`.mapWith(Number)
392392
}).from(usersTable)
393393
```
@@ -483,4 +483,4 @@ await db.select({
483483
```sql
484484
select "project_id", count("users"."id") from users group by "users"."project_id" having count("users"."id") > 300;
485485
```
486-
</Section>
486+
</Section>

0 commit comments

Comments
 (0)