Skip to content

Conversation

@Shad0wKillar
Copy link

We were using .run() instead of .all()
If my knowledge is correct:

  1. we use .all() for SELECT queries to get the actual rows.
  2. we use .run() is for INSERT/UPDATE/DELETE and returns metadata.

In the description below, we were explaining for ".all()" but were using ".run()" in actual code.

Summary

Screenshots (optional)

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

We were using .run() instead of .all()
If my knowledge is correct:
1. we use .all() for SELECT queries to get the actual rows.
2. we use  .run() is for INSERT/UPDATE/DELETE and returns metadata.

In the description below, we were explaining for ".all()" but were using ".run()" in actual code.
@github-actions github-actions bot added the product:d1 D1: https://developers.cloudflare.com/d1/ label Aug 4, 2025
@Oxyjun
Copy link
Contributor

Oxyjun commented Aug 5, 2025

Hi, thanks for flagging that we're still describing the use of all() in the text below.

To clarify: .all() is an alias for .run(), as they are functionally identical.

I've created a PR here #24172 to align to run(), which is our recommended syntax.

I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:d1 D1: https://developers.cloudflare.com/d1/ size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants