Update drizzle guide

This commit is contained in:
Colin McDonnell
2023-10-25 12:52:15 -07:00
parent c275cecfd1
commit 4fb5ab0ca8

View File

@@ -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);
```
---