-
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
pg query! err #47
Comments
@243011068 Thank you for reporting the issue. We'll look into resolving this, nicely, if possible. @abonander I think we can make this work without the tuple impls. Maybe we should just iterate over the bind arguments and run |
What I wanted to accomplish with using the tuple is having some sort of typestate that blocks the user from accidentally adding superfluous binds. Right now I do see the limitation here, I'm just wondering how do we prevent the aforementioned or if we care. |
@abonander What about an "anonymous" (scoped) tuple struct that you manually implement |
That would certainly work, no one's complaining about metadata bloat yet so we can probably get away with it. |
It's still a lot less than if we added x32 tuple impls. |
Certainly. |
Oh, no it won't work for MySQL because we can't know the types. I guess we could generate a struct where every field is generic over |
Alternatively, what if we used |
We decided to build the actual |
when parameters more than 10 I get a err
error[E0271]: type mismatch resolving
<sqlx_core::postgres::database::Postgres as sqlx_core::database::Database>::Arguments == (&std::string::String, &std::string::String, &i32, &i32, &i32, &i32, &std::string::String, &std::string::String, &i64, &i32)
expected struct
sqlx_core::postgres::arguments::PgArguments
, found tupleThe text was updated successfully, but these errors were encountered: