Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 96bcc93

Browse files
committed
Fix @miniflare/d1 README.md
In #480, we updated the D1 implementation to use the same D1 shim injected by Wrangler. This caused the `@miniflare/d1` API to change a little, but we didn't update the `README`. :(
1 parent 539b33c commit 96bcc93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/d1/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ fun, full-featured, fully-local simulator for Cloudflare Workers. See
77
## Example
88

99
```js
10-
import { BetaDatabase } from "@miniflare/d1";
1110
import { createSQLiteDB } from "@miniflare/shared";
11+
import { D1Database, D1DatabaseAPI } from "@miniflare/d1";
1212

13-
const db = new BetaDatabase(await createSQLiteDB(":memory:"));
13+
const sqliteDb = await createSQLiteDB(":memory:");
14+
const db = new D1Database(new D1DatabaseAPI(sqliteDb));
1415
await db.exec(
1516
`CREATE TABLE my_table (cid INTEGER PRIMARY KEY, name TEXT NOT NULL);`
1617
);

0 commit comments

Comments
 (0)