-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add comment on relevance of order for Queryable #3376
base: master
Are you sure you want to change the base?
Conversation
As suggested by @weiznich over on Matrix
This looks like an sqlite-specialized example. Do we have equivalents for the other backends? If that's the case we probably want to add this comment here as well no? |
Thanks for opening this PR 👍 The relevant examples for are here for mysql and here for postgresql. I agree that we should add the comment there as well. The CI currently fails due to a change in clap. That's unrelated to this PR. I pushed a fix for that here, but that's not merged to master yet. |
@@ -1,5 +1,8 @@ | |||
use diesel::prelude::*; | |||
|
|||
// Order matters here! | |||
// Queryable assumes that the order of field on the struct matches the columns in the corresponding table. | |||
// See https://docs.diesel.rs/diesel/deserialize/trait.Queryable.html#derivingfor details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should point to the current documentation, instead to the old diesel 1.4 documentation here.
// See https://docs.diesel.rs/diesel/deserialize/trait.Queryable.html#derivingfor details | |
// See https://docs.diesel.rs/master/diesel/deserialize/derive.Queryable.html for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me so long as this is changed!
As suggested by @weiznich over on Matrix