-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Docs: update query!()
documentation WRT casting parameters using _
#1133
Comments
I had a look at the linked repo. You have this: sqlx::query!("INSERT INTO foo (email) VALUES ($1)", email) since your sqlx::query!("INSERT INTO foo (email) VALUES ($1)", email as _) |
@jplatte Thank you, that did the trick!
Is it forbidden or not? Because I can definitely use it. Maybe an update to the docs is in order? |
Yeah, seems like it. I think first sentence after the codeblock applies (i.e. |
query!()
documentation WRT casting parameters using _
Yeah, now we just treat |
closed by #1619 |
I have trouble using (or understanding how to use)
sqlx::Type
. I have derived it for a wrapper around aString
.As far as I understand, this should implement
Encode
andDecode
traits for the wrapper type and as a consequence I should be able to pass an instance of the wrapper type toquery!
macro, but I get an error stating that the drivers expects an&str
instead of the wrapper type.The description on the
Encode
trait made me think that this is how it should work. If it is not please help me understand.See this repo for a minimal example that leads to error.
The text was updated successfully, but these errors were encountered: