Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uphow to add filter dynamic? #381
Comments
This comment has been minimized.
|
Can you give the full code that you're trying to write? Is |
This comment has been minimized.
Matrix-Zhang
commented
Jul 26, 2016
|
posts is integer, the sever will recive the user input as filter, su as "1,2,5-8" |
This comment has been minimized.
|
http://docs.diesel.rs/diesel/prelude/trait.BoxedDsl.html will help you dynamically build the query. As for parsing the string, that's not something Diesel can help with. |
sgrif
closed this
Aug 1, 2016
This comment has been minimized.
Gisleburt
commented
Jul 18, 2018
|
Updated link to BoxedDsl: http://docs.diesel.rs/diesel/query_dsl/methods/trait.BoxedDsl.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Matrix-Zhang commentedJul 20, 2016
•
edited
i want to select rows with much filters.
how to write the code ? because of the rust static type system, i don't know the right type of the filter
like posts.eq(1).or(posts.between(5..8))