Closed Brendonovich closed 1 year ago
Can Query Traits
be used outside the library? Or an example of using Query Traits
?
For example, I have a query structure:
struct UserQuery {
name: Option<String>,
sex: Option<i32>,
}
If the name
is not none
, add the name
to the where
condition, and the sex
is the same. Is there any way to handle to where
conveniently?
Not currently, though that's a kinda similar idea to the partial_unchecked!
macro. I've got a couple of ideas but I'm not quite sure.
Traits like
Where
,Order
etc for making wrapper functions that apply preset settings.