Skip to content

Help with converting a Complex SQL query to Diesel #4437

Answered by weiznich
Mohana-Manikandan asked this question in Q&A
Discussion options

You must be logged in to vote

In that case you want to use BoxableExpression in combination with BoolExpressionMethods::or and QueryDsl::filter. You likely need to use an Option of the boxed type to guard against no elements.

I'm on currently writing this from my mobile, so it's hard to adjust the example, but hopefully it's clear from the documentation to get this working.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@weiznich
Comment options

@Mohana-Manikandan
Comment options

@weiznich
Comment options

Answer selected by Mohana-Manikandan
@Mohana-Manikandan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants