apoc.coll

Qualified Name Type

apoc.coll.elements(coll LIST<ANY>, limit INTEGER, offset INTEGER) - deconstructs a LIST<ANY> into identifiers indicating their specific type.

Procedure

apoc.coll.split(coll LIST<ANY>, value ANY) - splits a collection by the given value. The value itself will not be part of the resulting LIST<ANY> values.

Procedure

apoc.coll.zipToRows(list1 LIST<ANY>, list2 LIST<ANY>) - returns the two LIST<ANY> values zipped together, with one row per zipped pair.

Procedure

apoc.coll.avg(coll LIST<INTEGER | FLOAT>) - returns the average of the numbers in the LIST<INTEGER | FLOAT>.

Function

apoc.coll.combinations(coll LIST<ANY>, minSelect INTEGER, maxSelect INTEGER) - returns a collection of all combinations of LIST<ANY> elements between the selection size minSelect and maxSelect (default: minSelect).

Function

apoc.coll.contains(coll LIST<ANY>, value ANY) - returns whether or not the given value exists in the given collection (using a HashSet).

Function

apoc.coll.containsAll(coll1 LIST<ANY>, coll2 LIST<ANY>) - returns whether or not all of the given values exist in the given collection (using a HashSet).

Function

apoc.coll.containsAllSorted(coll1 LIST<ANY>, coll2 LIST<ANY>) - returns whether or not all of the given values in the second LIST<ANY> exist in an already sorted collection (using a binary search).

Function

apoc.coll.containsDuplicates(coll LIST<ANY>) - returns true if a collection contains duplicate elements.

Function

apoc.coll.containsSorted(coll LIST<ANY>, value ANY) - returns whether or not the given value exists in an already sorted collection (using a binary search).

Function

apoc.coll.different(coll LIST<ANY>) - returns true if all the values in the given LIST<ANY> are unique.

Function

apoc.coll.disjunction(list1 LIST<ANY>, list2 LIST<ANY>) - returns the disjunct set from two LIST<ANY> values.

Function

apoc.coll.dropDuplicateNeighbors(list LIST<ANY>) - removes duplicate consecutive objects in the LIST<ANY>.

Function

apoc.coll.duplicates(coll LIST<ANY>) - returns a LIST<ANY> of duplicate items in the collection.

Function

apoc.coll.duplicatesWithCount(coll LIST<ANY>) - returns a LIST<ANY> of duplicate items in the collection and their count, keyed by item and count.

Function

apoc.coll.fill(items STRING, count INTEGER) - returns a LIST<ANY> with the given count of items.

Function

apoc.coll.flatten(coll LIST<ANY>, recursive BOOLEAN) - flattens the given LIST<ANY> (to flatten nested LIST<ANY> values, set recursive to true).

Function

apoc.coll.frequencies(coll LIST<ANY>) - returns a LIST<ANY> of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.frequenciesAsMap(coll LIST<ANY>) - returns a MAP of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.indexOf(coll LIST<ANY>, value ANY) - returns the index for the first occurrence of the specified value in the LIST<ANY>.

Function

apoc.coll.insert(coll LIST<ANY>, index INTEGER, value ANY) - inserts a value into the specified index in the LIST<ANY>.

Function

apoc.coll.insertAll(coll LIST<ANY>, index INTEGER, values LIST<ANY>) - inserts all of the values into the LIST<ANY>, starting at the specified index.

Function

apoc.coll.intersection(list1 LIST<ANY>, list2 LIST<ANY>) - returns the distinct intersection of two LIST<ANY> values.

Function

apoc.coll.isEqualCollection(coll LIST<ANY>, values LIST<ANY>) - returns true if the two collections contain the same elements with the same cardinality in any order (using a HashMap).

Function

apoc.coll.max(values LIST<ANY>) - returns the maximum of all values in the given LIST<ANY>.

Function

apoc.coll.min(values LIST<ANY>) - returns the minimum of all values in the given LIST<ANY>.

Function

apoc.coll.occurrences(coll LIST<ANY>, item ANY) - returns the count of the given item in the collection.

Function

apoc.coll.pairs(list LIST<ANY>) - returns a LIST<ANY> of adjacent elements in the LIST<ANY> ([1,2],[2,3],[3,null]).

Function

apoc.coll.pairsMin(list LIST<ANY>) - returns LIST<ANY> values of adjacent elements in the LIST<ANY> ([1,2],[2,3]), skipping the final element.

Function

apoc.coll.pairWithOffset(coll LIST<ANY>, offset INTEGER) - returns a LIST<ANY> of pairs defined by the offset.

Function

apoc.coll.partition(coll LIST<ANY>, batchSize INTEGER) - partitions the original LIST<ANY> into a new LIST<ANY> of the given batch size. The final LIST<ANY> may be smaller than the given batch size.

Function

apoc.coll.randomItem(coll LIST<ANY>)- returns a random item from the LIST<ANY>, or null on LIST<NOTHING> or LIST<NULL>.

Function

apoc.coll.randomItems(coll LIST<ANY>, itemCount INTEGER, allowRepick BOOLEAN) - returns a LIST<ANY> of itemCount random items from the original LIST<ANY> (optionally allowing elements in the original LIST<ANY> to be selected more than once).

Function

apoc.coll.remove(coll LIST<ANY>, index INTEGER, length INTEGER) - removes a range of values from the LIST<ANY>, beginning at position index for the given length of values.

Function

apoc.coll.removeAll(list1 LIST<ANY>, list2 LIST<ANY>) - returns the first LIST<ANY> with all elements also present in the second LIST<ANY> removed.

Function

apoc.coll.runningTotal(list LIST<INTEGER | FLOAT>) - returns an accumulative LIST<INTEGER | FLOAT>.

Function

apoc.coll.set(coll LIST<ANY>, index INTEGER, value ANY) - sets the element at the given index to the new value.

Function

apoc.coll.shuffle(coll LIST<ANY>) - returns the LIST<ANY> shuffled.

Function

apoc.coll.sort(coll LIST<ANY>) - sorts the given LIST<ANY> into ascending order.

Function

apoc.coll.sortMaps(list LIST<MAP<STRING, ANY>>, prop STRING) - sorts the given LIST<MAP<STRING, ANY>> into descending order, based on the MAP property indicated by prop.

Function

apoc.coll.sortMulti(coll LIST<MAP<STRING, ANY>>, orderFields LIST<STRING>, limit INTEGER, skip INTEGER) - sorts the given LIST<MAP<STRING, ANY>> by the given fields. To indicate that a field should be sorted according to ascending values, prefix it with a caret (^). It is also possible to add limits to the LIST<MAP<STRING, ANY>> and to skip values.

Function

apoc.coll.sortNodes(coll LIST<NODE>, prop STRING) - sorts the given LIST<NODE> by the property of the nodes into descending order.

Function

apoc.coll.sortText(coll LIST<STRING>, conf MAP<STRING, ANY>) - sorts the given LIST<STRING> into ascending order.

Function

apoc.coll.stdev(list LIST<INTEGER | FLOAT>, isBiasCorrected BOOLEAN) - returns sample or population standard deviation with isBiasCorrected true or false respectively.

Function

apoc.coll.subtract(list1 LIST<ANY>, list2 LIST<ANY>) - returns the first LIST<ANY> as a set with all the elements of the second LIST<ANY> removed.

Function

apoc.coll.sum(coll LIST<INTEGER | FLOAT>) - returns the sum of all the INTEGER | FLOAT in the LIST<INTEGER | FLOAT>.

Function

apoc.coll.sumLongs(coll LIST<INTEGER | FLOAT>) - returns the sum of all the INTEGER | FLOAT in the LIST<INTEGER | FLOAT>.

Function

apoc.coll.toSet(coll LIST<ANY>) - returns a unique LIST<ANY> from the given LIST<ANY>.

Function

apoc.coll.union(list1 LIST<ANY>, list2 LIST<ANY>) - returns the distinct union of the two given LIST<ANY> values.

Function

apoc.coll.unionAll(list1 LIST<ANY>, list2 LIST<ANY>) - returns the full union of the two given LIST<ANY> values (duplicates included).

Function

apoc.coll.zip(list1 LIST<ANY>, list2 LIST<ANY>) - returns the two given LIST<ANY> values zipped together as a LIST<LIST<ANY>>.

Function