Collection Functions
APOC has a wide variety of Collection and List functions.
sum of all values in a list |
|
avg of all values in a list |
|
minimum of all values in a list |
|
maximum of all values in a list |
|
sums all numeric values in a list |
|
partitions a list into sublists of |
|
all values in a list |
|
[1,2],[2,3],[3,null] |
|
[1,2],[2,3] |
|
returns a unique list backed by a set |
|
sort on Collections |
|
sort nodes by property, ascending sorting by adding ^ in front of the sorting field |
|
sort maps by map key, ascending sorting by adding ^ in front of the sorting field |
|
returns the reversed list |
|
returns true if collection contains the value |
|
optimized contains-all operation (using a HashSet) returns true or false |
|
optimized contains on a sorted list operation (Collections.binarySearch) (returns true or false) |
|
optimized contains-all on a sorted list operation (Collections.binarySearch) (returns true or false) |
|
return true if two collections contain the same elements with the same cardinality in any order (using a HashMap) |
|
creates the distinct union of the 2 lists |
|
creates the full union with duplicates of the two lists |
|
returns unique set of first list with all elements of second list removed |
|
returns first list with all elements of second list removed |
|
returns the unique intersection of the two lists |
|
returns the disjunct set of the two lists |
|
splits collection on given values rows of lists, value itself will not be part of resulting lists |
|
position of value in the list |
|
returns the shuffled list |
|
returns a random item from the list |
|
returns a list of |
|
returns true if a collection contains duplicate elements |
|
returns a list of duplicate items in the collection |
|
returns a list of duplicate items in the collection and their count, keyed by |
|
returns the count of the given item in the collection |
|
returns a list of frequencies of the items in the collection, keyed by |
|
return a map of frequencies of the items in the collection, keyed by |
|
sort list of maps by several sort fields (ascending with ^ prefix) and optionally applies limit and skip |
|
flattens a nested list |
|
|
Returns collection of all combinations of list elements of selection size between minSelect and maxSelect (default:minSelect), inclusive |
|
deconstruct subset of mixed list into identifiers of the correct type |
set index to value |
|
insert value at index |
|
insert values at index |
|
remove range of values from index to length |
|
returns true if value are different |
|
returns a list with the given count of items |
|
sort on string based collections |
|
returns a list of pairs defined by the offset |