Closed stariy95 closed 1 year ago
5.x-expressions
branch looks great. The approach is the best I can think of. Once we merge it, we can decide how much of the deprecated API we need to keep. For now a few comments:
CompositeExp.and
and CompositeExp.or
do.
The last part that is still require Cayenne is complex expressions. To fully decouple everything we should implement own full-featured parser. It still could be based on the Cayenne grammar for the max compatibility.
There's already a working prototype with Cayenne backend switched to the new Expressions in the 5.x-expressions branch. This implementation deprecates old code in the
io.agrest.exp
package and introducesio.agrest.exp.parser
.Grammar file is here: https://github.com/agrestio/agrest/blob/5.x-expressions/agrest-engine/src/main/jjtree/io/agrest/exp/parser/AgExpressionParser.jjt