agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

Expressions: compact and/or chains #603

Closed andrus closed 1 year ago

andrus commented 1 year ago

If I am not mistaken, the current "and" and "or" expressions are binary and nested if more than two conditions are present:

      - and -
     |       |
   and       and
  |   |     |   |
cond cond cond cond

Let's try to compact them to something like this during parsing and composition (Exp.and(Exp)):

  ----- and -----
 |    |     |    |
cond cond cond cond