mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Update drizzle guide
This commit is contained in:
@@ -34,8 +34,9 @@ To see the database in action, add these lines to `index.ts`.
|
||||
import { db } from "./db";
|
||||
import { sql } from "drizzle-orm";
|
||||
|
||||
const query = sql`select "hello world" as text;`
|
||||
console.log(await db.get<string>(query));
|
||||
const query = sql`select "hello world" as text`;
|
||||
const result = db.get<{ text: string }>(query);
|
||||
console.log(result);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user