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

Traits for making extensible queries #232

Closed
Brendonovich opened this issue Jan 2, 2023 · 2 comments · Fixed by #238
Closed

Traits for making extensible queries #232

Brendonovich opened this issue Jan 2, 2023 · 2 comments · Fixed by #238

Comments

@Brendonovich
Copy link
Owner

Traits like Where, Order etc for making wrapper functions that apply preset settings.

@Brendonovich Brendonovich added this to the 0.6.4 milestone Jan 2, 2023
@Brendonovich Brendonovich linked a pull request Jan 3, 2023 that will close this issue
@tingfeng-key
Copy link
Contributor

tingfeng-key commented Apr 7, 2023

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?

@Brendonovich
Copy link
Owner Author

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.

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

Successfully merging a pull request may close this issue.

2 participants