apoc.coll

Qualified Name Type

apoc.coll.elements(coll [Any], limit Integer, offset Integer) - deconstructs a list of mixed types into identifiers indicating their specific type.

Procedure

apoc.coll.split(coll [Any], value Any) - splits a collection by the given value. The value itself will not be part of the resulting lists.

Procedure

apoc.coll.zipToRows(list1 [Any], list2 [Any]) - returns the two lists zipped together, with one row per zipped pair.

Procedure

apoc.coll.avg(coll [Number]) - returns the average of the numbers in the list.

Function

apoc.coll.combinations(coll [Any], minSelect Integer, maxSelect Integer) - returns a collection of all combinations of list elements between the selection size minSelect and maxSelect (default: minSelect).

Function

apoc.coll.contains(coll [Any], value Any) - returns whether or not the given value exists in the given collection (using a HashSet).

Function

apoc.coll.containsAll(coll1 [Any], coll2 [Any]) - returns whether or not all of the given values exist in the given collection (using a HashSet).

Function

apoc.coll.containsAllSorted(coll1 [Any], coll2 [Any]) - returns whether or not all of the given values in the second list exist in an already sorted collection (using a binary search).

Function

apoc.coll.containsDuplicates(coll [Any]) - returns true if a collection contains duplicate elements.

Function

apoc.coll.containsSorted(coll [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 [Any]) - returns true if all the values in the given list are unique.

Function

apoc.coll.disjunction(list1 [Any], list2[Any]) - returns the disjunct set of two lists.

Function

apoc.coll.dropDuplicateNeighbors(list [Any]) - removes duplicate consecutive objects in the list.

Function

apoc.coll.duplicates(coll [Any]) - returns a list of duplicate items in the collection.

Function

apoc.coll.duplicatesWithCount(coll [Any]) - returns a list 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 with the given count of items.

Function

apoc.coll.flatten(coll [Any], recursive Boolean) - flattens the given list (to flatten nested lists, set recursive to true).

Function

apoc.coll.frequencies(coll [Any]) - returns a list of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.frequenciesAsMap(coll [Any]) - returns a map of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.indexOf(coll [Any], value Any) - returns the index for the first occurrence of the specified value in the list.

Function

apoc.coll.insert(coll [Any], index Integer, value Any) - inserts a value into the specified index in the list.

Function

apoc.coll.insertAll(coll [Any], index Integer, values [Any]) - inserts all of the values into the list, starting at the specified index.

Function

apoc.coll.intersection(list1 [Any], list2[Any]) - returns the distinct intersection of two lists.

Function

apoc.coll.isEqualCollection(coll [Any], values [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 [Any]) - returns the maximum of all values in the given list.

Function

apoc.coll.min(values [Any]) - returns the minimum of all values in the given list.

Function

apoc.coll.occurrences(coll [Any], item Any) - returns the count of the given item in the collection.

Function

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

Function

apoc.coll.pairsMin(list [Any]) - returns lists of adjacent elements in the list ([1,2],[2,3]), skipping the final element.

Function

apoc.coll.pairWithOffset(coll [Any], offset Integer) - returns a list of pairs defined by the offset.

Function

apoc.coll.partition(coll [Any], batchSize Integer) - partitions the original list into sub-lists of the given batch size. The final list may be smaller than the given batch size.

Function

apoc.coll.randomItem(coll [Any])- returns a random item from the list, or null on an empty or null list.

Function

apoc.coll.randomItems(coll [Any], itemCount Integer, allowRepick Boolean) - returns a list of itemCount random items from the original list (optionally allowing elements in the original list to be selected more than once).

Function

apoc.coll.remove(coll [Any], index Integer, length Integer) - removes a range of values from the list, beginning at position index for the given length of values.

Function

apoc.coll.removeAll(list1 [Any], list2 [Any]) - returns the first list with all elements of the second list removed.

Function

apoc.coll.runningTotal(list [Number]) - returns an accumulative array.

Function

apoc.coll.set(coll [Any], index Integer, value Any) - sets the element at the given index to the new value.

Function

apoc.coll.shuffle(coll [Any]) - returns the list shuffled.

Function

apoc.coll.sort(coll [Any]) - sorts the given list into ascending order.

Function

apoc.coll.sortMaps(list [Map<String, Any>], prop String) - sorts the given list into descending order, based on the map property indicated by prop.

Function

apoc.coll.sortMulti(coll [Map<String, Any>], orderFields [String], limit Integer, skip Integer) - sorts the given list of maps 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 and to skip values.

Function

apoc.coll.sortNodes(coll [Node], prop String) - sorts the given list of nodes by their property into descending order.

Function

apoc.coll.sortText(coll [String], conf Map<String, Any>) - sorts the given list of strings into ascending order.

Function

apoc.coll.stdev(list [Number], isBiasCorrected Boolean) - returns sample or population standard deviation with isBiasCorrected true or false respectively.

Function

apoc.coll.subtract(list1 [Any], list2 [Any]) - returns the first list as a set with all the elements of the second list removed.

Function

apoc.coll.sum(coll [Number]) - returns the sum of all the numbers in the list.

Function

apoc.coll.sumLongs(coll [Number]) - returns the sum of all the numbers in the list.

Function

apoc.coll.toSet(coll [Any]) - returns a unique list from the given list.

Function

apoc.coll.union(list1 [Any], list2 [Any]) - returns the distinct union of the two given lists.

Function

apoc.coll.unionAll(list1 [Any], list2 [Any]) - returns the full union of the two given lists (duplicates included).

Function

apoc.coll.zip(list1 [Any], list2 [Any]) - returns the two given lists zipped together as a list of lists.

Function