apoc.coll.containsAll
Function APOC Core
apoc.coll.containsAll(coll, values) optimized contains-all operation (using a HashSet) (returns single row or not)
Usage Examples
The following checks if a collection contains all the values from another collection:
RETURN apoc.coll.containsAll([1,2,3,4,5], [3,7]) AS output;
Output |
---|
FALSE |
RETURN apoc.coll.containsAll([1,2,3,4,5], [1,3]) AS output;
Output |
---|
TRUE |
RETURN apoc.coll.containsAll([1,2,3,4,5], [4,1]) AS output;
Output |
---|
TRUE |