-
-
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
Documentation Guide - Querying / Filtering #1108
Comments
A guide would be great, but even a table of SQL <-> Diesel would be super helpful. For example, I had difficulty finding out how to emit |
@hobofan - Just checking in to see if you're still working on this issue (or need help?). I think it is still a good idea and would be helpful with the 1.0 release just around the corner. |
@notryanb Sorry, I got tied up in a fulltime freelancing contract the last two months. I'll be free again beginning next week, and this is one of the first things I'll work on! |
I'm so sorry everyone that I was holding up this important part of the documentation for so long. I'm sadly constantly finding myself busy with other stuff and also haven't used Diesel since writing my last comment here, so I don't think I can write the documentation at the level it deserves. It's probably best if someone else who is using this project more takes on this issue. |
I miss guides and docs about queries too. |
This really needs to be on both the homepage and getting started. There are no references to |
I found a good page from the docs: even just linking to this from the getting started page would help a lot: |
This is desperately needed. It's really difficult to figure how to do do any sort of querying with Diesel. |
I find it really hard to understand how to reuse pieces of queries. The Extending Diesel guide focus on solving one particular problem. And does it in a hard to understand way. And it also seems outdated, for example the sql_function! that is used there is deprecated. I would like to see some guides on how to turn a type into a query piece. How to reuse the same type on many columns, without rewriting it for every column. How to structure my code and write types to use them with the diesel type system. These are the main problems for me right now. So big thumb up for a guide like this...even if this issue is from nearly 3 years ago 😢 |
@matteosister I agree with you that this guides are (partially) missing and should be written. That brings me to the problem why they are not written yet: None of the current diesel maintainers had the bandwidth to do that. We all have a live to life beside diesel, so we only have a limited amount of time available to work on stuff. Additionally we are using diesel in our own projects. The result of that is that we prioritize stuff that's important for those projects. As hard as it sounds, but from that point of view documentation is nice, but not as useful as a specific feature I need by myself. Now for the concrete questions:
I would like to disagree here. This guide shows 3 ways how to extend diesel. Each of them is quite exemplary for it's use case.
Please elaborate which part you fund hard to understand.
I agree that the old syntax there should probably be fixed, otherwise this code continues to compile. Additionally the documentation of
That's basically part 2 (or 3) of the guide, how to write a custom query node and define custom operators. The general idea is the same. As this requires quite complex generic code I doubt that this will ever be part of same small good understandable official guide. It depends a bit how far you want to go, but in the end you need some good understanding about the rust trait system in general and how that is utilized by diesel. (There is an talk by Sean at rustconf and a workshop given by me at rustfest available, that contains some information on this topic.) Beside of that I can only offer to answer specific questions in our gitter channel or in our forum. You should be familiar with the details of rusts trait system, otherwise it will be quite hard. (This issue is not the right place to discuss concrete use cases). |
I didn't want in any way push anybody doing something. I know how hard it could be to be part of an open source project while using it at work. I used rust at work for a year now, I'm not an expert in any way. Still I wanted to share (without blaming) how hard it could be to approach this great library, and the frustration of not being able of doing things that seems simple in other languages (coming from elixir and ecto). So don't take it personally. I'll be glad to help if I could... |
Problem Description
Re: Better Documentation #853 Querying
What are you trying to accomplish?
Checklist
The text was updated successfully, but these errors were encountered: