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.
1 parent 18cba31 commit a85ccaeCopy full SHA for a85ccae
src/content/docs/workers/testing/miniflare/storage/d1.md
@@ -11,9 +11,9 @@ Specify D1 Databases to add to your environment as follows:
11
12
```js
13
const mf = new Miniflare({
14
- d1Databases: {
15
- DB: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
16
- },
+ "d1Databases":{
+ "DB":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ }
17
});
18
```
19
@@ -24,7 +24,8 @@ bound to a Worker. You can do this with the `getD1Database` method:
24
25
26
const db = await mf.getD1Database("DB");
27
-const { results } = await db.prepare("<Query>");
+const stmt = await db.prepare("<Query>");
28
+const returnValue = await stmt.run();
29
-console.log(await res.json(results));
30
+return Response.json(returnValue.results);
31
0 commit comments