Neo4j: Predicate Functions Cheat Sheet

all()

returns true if the predicate holds for all elements in the given list. null is returned if the list is null or all of its elements are null

all(variable IN list WHERE predicate)

any()

returns true if the predicate holds for at least one element in the given list. null is returned if the list is null or all of its elements are null

any(variable IN list WHERE predicate)

exists()

returns true if a match for the given pattern exists in the graph, or if the specified property exists in the node, relationship or map. null is returned if the input argument is null

exists(pattern-or-property)

none()

returns true if the predicate holds for no element in the given list. null is returned if the list is null or all of its elements are null

none(variable IN list WHERE predicate)

single()

returns true if the predicate holds for exactly one of the elements in the given list. null is returned if the list is null or all of its elements are null

single(variable IN list WHERE predicate)

Leave a Reply

Your email address will not be published. Required fields are marked *