Deprecations and additions

This chapter lists all the features that have been removed, deprecated, added or extended in the recent versions of APOC.

Version 5.0

Deprecated procedures and functions

Feature Details

Procedure

apoc.custom.declareFunction

Replaced by:

apoc.custom.installFunction

Procedure

apoc.custom.declareProcedure

Replaced by:

apoc.custom.installProcedure

Procedure

apoc.custom.removeFunction

Replaced by:

apoc.custom.dropFunction

Procedure

apoc.custom.removeProcedure

Replaced by:

apoc.custom.dropProcedure

Function Deprecated

RETURN apoc.create.uuid()

Replaced by Neo4j Function randomUUID():

RETURN randomUUID()

Procedure Deprecated

CALL apoc.create.uuids($count)

Replaced by Neo4j Function randomUUID():

UNWIND range(0,$count) AS row RETURN row, randomUUID() AS uuid

Removed procedures and functions

Feature Details

Function Removed

apoc.data.domain('url_or_email_address') YIELD domain

Replaced by ExtractEmail or ExtractURI:

apoc.data.email('email_address')
apoc.data.url('url')

Procedure Removed

apoc.algo.dijkstraWithDefaultWeight(startNode, endNode, 'KNOWS', 'distance', 10) YIELD path, weight

Use the following instead:

apoc.algo.dijkstra(startNode, endNode, 'KNOWS', 'distance', defaultValue, numberOfWantedResults) YIELD path, weight

Function Removed

apoc.date.parseAsZonedDateTime('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset')

Replaced by:

apoc.temporal.toZonedTemporal('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset')

Function Removed

apoc.coll.reverse(coll)

Replaced in Cypher with:

WITH [4923,'abc',521, null, 487] AS ids
RETURN reverse(ids)

Procedure Removed

apoc.export.cypherAll(file,config)

Replaced by:

apoc.export.cypher.all(file,config)

Procedure Removed

apoc.export.cypherData(nodes,rels,file,config)

Replaced by:

apoc.export.cypher.data(nodes,rels,file,config)

Procedure Removed

apoc.export.cypherGraph(graph,file,config)

Replaced by:

apoc.export.cypher.graph(graph,file,config)

Procedure Removed

apoc.export.cypherQuery(query,file,config)

Replaced by:

apoc.export.cypher.query(query,file,config)

Function Removed

apoc.meta.type(value)

Replaced by:

apoc.meta.cypher.type(value)

Function Removed

apoc.meta.types(node-relationship-map)

Replaced by:

apoc.meta.cypher.types(node-relationship-map)

Function Removed

apoc.meta.isType(value,type)

Replaced by:

apoc.meta.cypher.isType(value,type)

Function Removed

apoc.meta.typeName(value)

Replaced by:

apoc.meta.cypher.type(value)

Procedure Removed

apoc.periodic.rock_n_roll_while('some cypher for knowing when to stop', 'some cypher for iteration', 'some cypher as action on each iteration', 10000) YIELD batches, total

Partially replaced in Cypher with:

CALL {} IN TRANSACTIONS OF n ROWS

Procedure Removed

apoc.periodic.rock_n_roll('some cypher for iteration', 'some cypher as action on each iteration', 10000) YIELD batches, total

Replaced in Cypher with:

CALL {} IN TRANSACTIONS OF n ROWS

Procedure Removed

apoc.create.vPattern({_labels:['LabelA'],key:value},'KNOWS',{key:value,...}, {_labels:['LabelB'],key:value}) returns a virtual pattern

Replaced by:

apoc.create.virtualPath(['LabelA'],{key:value},'KNOWS',{key:value,...},['LabelB'],{key:value})

Procedure Removed

apoc.create.vPatternFull(['LabelA'],{key:value},'KNOWS',{key:value,...},['LabelB'],{key:value}) returns a virtual pattern

Replaced by:

apoc.create.virtualPath(['LabelA'],{key:value},'KNOWS',{key:value,...},['LabelB'],{key:value})

Procedure Removed

apoc.xml.import(url, config)

Replaced by:

apoc.import.xml(file,config)

Procedure Removed

apoc.refactor.cloneNodesWithRelationships([node1,node2,...])

Use the following instead, and set withRelationships = true:

apoc.refactor.cloneNodes(nodes, withRelationships, skipProperties)

Procedure Removed

CALL apoc.text.phonetic(value) yield value

Replaced by the function:

RETURN apoc.text.phonetic(text) yield value

Procedure Removed

CALL apoc.text.doubleMetaphone(value) yield value

Replaced by the function:

RETURN apoc.text.doubleMetaphone(text) yield value

Function Removed

apoc.math.round(value,[prec],mode=[CEILING,FLOOR,UP,DOWN,HALF_EVEN,HALF_DOWN,HALF_UP,DOWN,UNNECESSARY])

Replaced by the Neo4j round() function:

RETURN round(3.141592, 3)

Procedure Removed

apoc.warmup.run(loadProperties=false,loadDynamicProperties=false,loadIndexes=false)

This procedure duplicated functionality of page cache warm up which is a part of the DBMS.

Procedure Removed

apoc.date.expire(node,time,'time-unit')

Replaced by:

apoc.ttl.expire(node,time,'time-unit')

Procedure Removed

apoc.date.expireIn(node,time,'time-unit')

Replaced by:

apoc.ttl.expireIn(node,timeDelta,'time-unit')

Procedure Removed

apoc.mongodb.get()

Replaced by:

apoc.mongo.find(uri, query, $config) yield value

Procedure Removed

apoc.mongodb.count(host-or-key,db,collection,query) yield value

Replaced by:

apoc.mongo.count(uri, query, $config) yield value

Procedure Removed

apoc.mongodb.first() yield value

Procedure Removed

apoc.mongodb.find() yield value

Replaced by:

apoc.mongo.find(uri, query, $config) yield value

Procedure Removed

apoc.mongodb.insert(host-or-key,db,collection,documents)

Replaced by:

apoc.mongo.insert(uri, documents, $config) yield value

Procedure Removed

apoc.mongodb.delete(host-or-key,db,collection,query)

Replaced by:

apoc.mongo.delete(uri, query, $config)

Procedure Removed

apoc.mongodb.update(host-or-key,db,collection,query,update)

Replaced by:

apoc.mongo.update(uri, query, update, $config)

Procedure Removed

apoc.cluster.graph()

Procedure Removed

apoc.load.jdbcParams()

Replaced by:

apoc.load.jdbc('key or url','',[params]) YIELD row

Procedure Removed

apoc.custom.asProcedure(name, statement, mode, outputs, inputs, description)

Replaced by:

apoc.custom.declareProcedure(signature, statement, mode, description)

Procedure Removed

apoc.custom.asFunction(name, statement, outputs, inputs, forceSingle, description)

Replaced by:

apoc.custom.declareFunction(signature, statement, forceSingle, description)

Function Removed

apoc.cypher.runFirstColumn(statement, params, expectMultipleValues)

Replaced by:

apoc.cypher.runFirstColumnMany(statement, params)
apoc.cypher.runFirstColumnSingle(statement, params)

Removed Config Settings

Setting Details

Setting Removed apoc.initializer.cypher - a cypher statement to be executed once the database is started

This has been replaced by database-specific initializers. Use apoc.initializer.<database name> instead.