Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pinpox
Copy link

@pinpox pinpox commented Oct 19, 2022

As suggested by @weiznich over on Matrix

@weiznich weiznich requested a review from a team October 19, 2022 14:00
@Ten0
Copy link
Member

Ten0 commented Oct 19, 2022

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?

@weiznich
Copy link
Member

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
Copy link
Member

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.

Suggested change
// 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

Copy link

@Jaffa-Cakes Jaffa-Cakes left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants