apoc.coll

Qualified Name Type Release

apoc.coll.elements(list,limit,offset) yield _1,_2,..,_10,_1s,_2i,_3f,_4m,_5l,_6n,_7r,_8p - deconstruct subset of mixed list into identifiers of the correct type

Procedure

APOC Core

apoc.coll.pairWithOffset(values, offset) - returns a list of pairs defined by the offset

Procedure

APOC Core

apoc.coll.partition(list,batchSize)

Procedure

APOC Core

apoc.coll.split(list,value) | splits collection on given values rows of lists, value itself will not be part of resulting lists

Procedure

APOC Core

apoc.coll.zipToRows(list1,list2) - creates pairs like zip but emits one row per pair

Procedure

APOC Core

apoc.coll.avg([0.5,1,2.3])

Function

APOC Core

apoc.coll.avgDuration([duration('P2DT3H'), duration('PT1H45S'), …​]) - returns the average of a list of duration values

Function

APOC Full

apoc.coll.combinations(coll, minSelect, maxSelect:minSelect) - Returns collection of all combinations of list elements of selection size between minSelect and maxSelect (default:minSelect), inclusive

Function

APOC Core

apoc.coll.contains(coll, value) optimized contains operation (using a HashSet) (returns single row or not)

Function

APOC Core

apoc.coll.containsAll(coll, values) optimized contains-all operation (using a HashSet) (returns single row or not)

Function

APOC Core

apoc.coll.containsAllSorted(coll, value) optimized contains-all on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

APOC Core

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

Function

APOC Core

apoc.coll.containsSorted(coll, value) optimized contains on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

APOC Core

apoc.coll.different(values) - returns true if values are different

Function

APOC Core

apoc.coll.disjunction(first, second) - returns the disjunct set of the two lists

Function

APOC Core

apoc.coll.dropDuplicateNeighbors(list) - remove duplicate consecutive objects in a list

Function

APOC Core

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

Function

APOC Core

apoc.coll.duplicatesWithCount(coll) - returns a list of duplicate items in the collection and their count, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}])

Function

APOC Core

apoc.coll.fill(item, count) - returns a list with the given count of items

Function

APOC Core

apoc.coll.fillObject(item, count) - returns a list of equals items with the given size

Function

APOC Core

apoc.coll.flatten(coll, [recursive]) - flattens list (nested if recursive is true)

Function

APOC Core

apoc.coll.frequencies(coll) - returns a list of frequencies of the items in the collection, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}, {item:abc, count:1}])

Function

APOC Core

apoc.coll.frequenciesAsMap(coll) - return a map of frequencies of the items in the collection, key item, value count (e.g., {1:2, 2:1})

Function

APOC Core

apoc.coll.indexOf(coll, value) | position of value in the list

Function

APOC Core

apoc.coll.insert(coll, index, value) | insert value at index

Function

APOC Core

apoc.coll.insertAll(coll, index, values) | insert values at index

Function

APOC Core

apoc.coll.intersection(first, second) - returns the unique intersection of the two lists

Function

APOC Core

apoc.coll.isEqualCollection(coll, values) return true if two collections contain the same elements with the same cardinality in any order (using a HashMap)

Function

APOC Core

apoc.coll.max([0.5,1,2.3])

Function

APOC Core

apoc.coll.min([0.5,1,2.3])

Function

APOC Core

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

Function

APOC Core

apoc.coll.pairWithOffset(values, offset) - returns a list of pairs defined by the offset

Function

APOC Core

apoc.coll.pairs([1,2,3]) returns [1,2],[2,3],[3,null]

Function

APOC Core

apoc.coll.pairsMin([1,2,3]) returns [1,2],[2,3]

Function

APOC Core

apoc.coll.partition(list,batchSize)

Function

APOC Core

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

Function

APOC Core

apoc.coll.randomItems(coll, itemCount, allowRepick: false) - returns a list of itemCount random items from the original list, optionally allowing picked elements to be picked again

Function

APOC Core

apoc.coll.remove(coll, index, [length=1]) | remove range of values from index to length

Function

APOC Core

apoc.coll.removeAll(first, second) - returns first list with all elements of second list removed

Function

APOC Core

apoc.coll.reverse(coll) - returns reversed list

Function

APOC Core

apoc.coll.runningTotal(list1) - returns an accumulative array. For example apoc.coll.runningTotal([1,2,3.5]) return [1,3,6.5]

Function

APOC Core

apoc.coll.set(coll, index, value) | set index to value

Function

APOC Core

apoc.coll.shuffle(coll) - returns the shuffled list

Function

APOC Core

apoc.coll.sort(coll) sort on Collections

Function

APOC Core

apoc.coll.sortMaps([maps], 'name') - sort maps by property

Function

APOC Core

apoc.coll.sortMulti(coll, ['^name','age'],[limit],[skip]) - sort list of maps by several sort fields (ascending with ^ prefix) and optionally applies limit and skip

Function

APOC Core

apoc.coll.sortNodes([nodes], 'name') sort nodes by property

Function

APOC Core

apoc.coll.sortText(coll) sort on string based collections

Function

APOC Core

apoc.coll.stdev(list, isBiasCorrected) - returns the sample or population standard deviation with isBiasCorrected true or false respectively. For example apoc.coll.stdev([10, 12, 23]) return 7

Function

APOC Core

apoc.coll.subtract(first, second) - returns unique set of first list with all elements of second list removed

Function

APOC Core

apoc.coll.sum([0.5,1,2.3])

Function

APOC Core

apoc.coll.sumLongs([1,3,3])

Function

APOC Core

apoc.coll.toSet([list]) returns a unique list backed by a set

Function

APOC Core

apoc.coll.union(first, second) - creates the distinct union of the 2 lists

Function

APOC Core

apoc.coll.unionAll(first, second) - creates the full union with duplicates of the two lists

Function

APOC Core

apoc.coll.zip([list1],[list2])

Function

APOC Core