You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust documentation for PreparedStatement::run say that it only returns metadata, In reality it is returning the result rows too, checking the run implementation and comparing it with all, and it invokes the respective JS native run and all implementations, but run does an extra step not done by all:
let result = cast_to_d1_error(result)?;
On the JS documentation side, it says that run and all should be treated as aliases, there is no mention of one only returning metadada, and as these are the basis of the Rust wrappers, the Rust side always returns the results too.
D1PreparedStatement::run is functionally equivalent to D1PreparedStatement::all, and can be treated as an alias.
Note: I wish the documentation clarified a little more when meta data fields aren't present, there are many Option metadata fields.
Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
What version of
workers-rs
are you using?0.5.0
What version of
wrangler
are you using?3.99.0
Describe the bug
The Rust documentation for
PreparedStatement::run
say that it only returns metadata, In reality it is returning the result rows too, checking therun
implementation and comparing it withall
, and it invokes the respective JS native run and all implementations, but run does an extra step not done by all:On the JS documentation side, it says that run and all should be treated as aliases, there is no mention of one only returning metadada, and as these are the basis of the Rust wrappers, the Rust side always returns the results too.
Note: I wish the documentation clarified a little more when meta data fields aren't present, there are many Option metadata fields.
Steps To Reproduce
No response
The text was updated successfully, but these errors were encountered: