-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Faillible Queryable - Non-generic Queryable version experiment #2559
Conversation
can't with the others
Just to drop a note here: I'm currently busy with other work related stuff, so I will likely not be able to look at this for the next week or so. |
So the test fails there seems to highlight a compatibility break with type inference where the compiler cannot infer "oh there's a single type I know for deserializing BigInt, that's If going for this approach, |
Another important change here is that we cannot anymore write different impls depending on the type returned by some query or the backend. Doing that is basically required to port |
64aeebd
to
d0dee9c
Compare
d0dee9c
to
c460715
Compare
From #2523 (comment):
As it turns out, we're actually using a bit of genericity here: diesel/diesel_cli/src/infer_schema_internals/data_structures.rs Lines 78 to 82 in a312528
but for some reason it still works. (Maybe thanks to the local |
One more downside of the non-generic version: rust error messages suggest less correct approaches to fixing -error[E0277]: the trait bound `UserWithToFewFields: diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Nullable<diesel::sql_types::Text>), _>` is not satisfied
+error[E0277]: the trait bound `(i32, std::string::String): diesel::deserialize::FromSql<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Nullable<diesel::sql_types::Text>), _>` is not satisfied |
Closed as I would like to go with #2599 |
One approach to fixing #2523