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.
Currently, the fetch request predicate specification only allows flat compound predicates:
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
andpredicate function to have another compound operator, or with another way.