php-cypher-dsl icon indicating copy to clipboard operation
php-cypher-dsl copied to clipboard

Add support for comparison chains

Open marijnvanwezel opened this issue 3 years ago • 0 comments

Currently, all comparison operators only implement BooleanType. This means that the following is not allowed:

$a->gt($b)->gt($c)

That is because $a->gt($b) returns a BooleanType, which does not implement the gt method. We would like to support this, since it is supported in Cypher. That is, the following two expressions are equivalent:

a > b > c and a > b AND b > c

This extends to all comparison operators and is not limited to three terms.

marijnvanwezel avatar Jul 05 '22 14:07 marijnvanwezel