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

Add a nested compound predicate feature when fetching #5

Open
ABridoux opened this issue Nov 16, 2020 · 0 comments
Open

Add a nested compound predicate feature when fetching #5

ABridoux opened this issue Nov 16, 2020 · 0 comments

Comments

@ABridoux
Copy link
Contributor

ABridoux commented Nov 16, 2020

Currently, the fetch request predicate specification only allows flat compound predicates:

Player.request()
    .all()
    .where(\.name == "Toto")
    .and(\.age, .isIn(20, 30, 40))
    .or(\.score > 400)

Doing so, the predicate is name == "Toto && age IN {20,30,40} OR score > 400.
There is no way to specify this predicate: name == "Toto && (age IN {20,30,40} OR score > 400).
The goal is to add nested compound predicates, either by adding the possibility for an and predicate function to have another compound operator, or with another way.

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

No branches or pull requests

1 participant