Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example code for D1 storage #18928

Open
ss49919201 opened this issue Dec 24, 2024 · 0 comments
Open

Fix example code for D1 storage #18928

ss49919201 opened this issue Dec 24, 2024 · 0 comments
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product

Comments

@ss49919201
Copy link

Existing documentation URL(s)

What changes are you suggesting?

const db = await mf.getD1Database("DB");
const { results } = await db.prepare("<Query>");

The above code in the document is incorrect.
D1Database.prepare returns D1PreparedStatement.
But it looks as if it is returning D1Result.
Should call run or all!

Additional information

No response

@ss49919201 ss49919201 added content:edit Request for content edits documentation Documentation edits labels Dec 24, 2024
@github-actions github-actions bot added the product:workers Related to Workers product label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product
Projects
None yet
Development

No branches or pull requests

6 participants