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

Document Diesel usage guidelines and edge cases #1038

Closed
killercup opened this issue Jul 24, 2017 · 4 comments
Closed

Document Diesel usage guidelines and edge cases #1038

killercup opened this issue Jul 24, 2017 · 4 comments

Comments

@killercup
Copy link
Member

We don't (yet) have a good way to document general guidelines on how to use Diesel or, put another way, how we expect it to be used. There are a lot of implicit assumption and various edge cases to keep track of. For many, Diesel there are answers in this issue tracker, but the issues have been closed.

This meta issue wants to keep track of these undocumented pieces.

If you want to help out, we'd love to get PRs to add more information to our API docs. The linked issues usually contain the necessary information, but feel free to ask on gitter for more details.

We might also want to move some of this to a new section of the website. Either a new guide on Best Practices or a good ol' FAQ page.


@killercup will try to update this issue semi-regularly. Ping him on Gitter or in the issue tracker if you have suggestions or questions.

@lancecarlson
Copy link
Contributor

lancecarlson commented Aug 15, 2017

@killercup For the last one, perhaps adding language to end of this section would make sense?

http://docs.diesel.rs/diesel/macro.table.html#dsl

Something along the lines of: Only import this into the scope of a function you a building the query in otherwise it will pollute the namespace.

Perhaps an example could be provided that looked something like this:

// bad
use diesel_demo::schema::posts::dsl::*;
fn main() {
    // good
    use diesel_demo::schema::posts::dsl::*;
}

If you're cool with this, I'll make a PR.

@killercup
Copy link
Member Author

@lancecarlson sounds good!

@wt
Copy link

wt commented Jan 19, 2025

The issues that were tracked by this issue appear to be closed. Should this issue also be closed?

@wowinter13
Copy link
Member

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

No branches or pull requests

4 participants