workers-rs
workers-rs copied to clipboard
[BUG] D1 `EXISTS` Query Fails to Parse Bool
Is there an existing issue for this?
- [X] I have searched the existing issues
What version of workers-rs are you using?
0.5.0
What version of wrangler are you using?
3.99.0
Describe the bug
Using .first with this type of query fails to parse the result as a bool.
db
.prepare("SELECT EXISTS(SELECT 1 FROM users WHERE email = $1)")
.bind(&[email.to_string().into()])
.unwrap()
.first::<bool>(None)
.await
Steps To Reproduce
- Setup a d1 db with a schema that allows you to use an
existsquery - Attempt to run the code in the description
Parsing fails