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.26

Deprecated procedures and functions

Feature Details

Procedure Deprecated

apoc.export.arrow.all(file [, config ])
apoc.export.arrow.graph(file, graph [, config ])
apoc.export.arrow.query(file, query [, config ])
apoc.export.arrow.stream.all([ config ])
apoc.export.arrow.stream.graph(graph [, config ])
apoc.export.arrow.stream.query(query [, config ])
apoc.load.arrow(file [, config ])
apoc.load.arrow.stream(source [, config ])
apoc.load.jsonParams(urlOrKeyOrBinary, headers, payload [, path, config ])
apoc.log.stream(path [, config ])

All of these procedures will be migrated to the APOC Extended library in an upcoming major version.

Function Deprecated

apoc.map.setEntry

This function is a duplicate of apoc.map.setKey and will be removed in an upcoming major version.

Function Deprecated

apoc.text.regreplace

This function is a duplicate of apoc.text.replace and will be removed in an upcoming major version.

Function Deprecated

apoc.text.levenshteinDistance

This function is a duplicate of apoc.text.distance and will be removed in an upcoming major version.

Version 5.24

New procedures and functions

Feature Details

Function New

RETURN apoc.text.regexGroupsByName(text, regex)

Returns all groups with their group name matching the regular expression in the given text.

Version 5.20

Deprecated procedures and functions

Feature Details

Procedure Deprecated

CALL apoc.convert.toTree(paths LIST<PATH>, lowerCaseRels BOOLEAN, config MAP<STRING, ANY>)

Use the following instead:

CALL apoc.paths.toJsonTree(paths LIST<PATH>, lowerCaseRels BOOLEAN, config MAP<STRING, ANY>)

New procedures and functions

Feature Details

Procedure New

CALL apoc.paths.toJsonTree(paths LIST<PATH>, lowerCaseRels BOOLEAN, config MAP<STRING, ANY>)

Fixes several issues with the deprecated apoc.convert.toTree.

Version 5.4

Deprecated procedures and functions

Feature Details

Procedure Deprecated

CALL apoc.trigger.add(name STRING, statement STRING, selector MAP<STRING, ANY>, config MAP<STRING, ANY>)

Use the following instead:

CALL apoc.trigger.install(databaseName STRING, name STRING, statement STRING, selector MAP<STRING, ANY>, config MAP<STRING, ANY>)

Procedure Deprecated

CALL apoc.trigger.remove(name STRING)

Use the following instead:

CALL apoc.trigger.drop(databaseName STRING, name STRING)

Procedure Deprecated

CALL apoc.trigger.removeAll()

Use the following instead:

CALL apoc.trigger.dropAll(databaseName STRING)

Procedure Deprecated

CALL apoc.trigger.pause(name STRING)

Use the following instead:

CALL apoc.trigger.stop(databaseName STRING, name STRING)

Procedure Deprecated

CALL apoc.trigger.resume(name STRING)

Use the following instead:

CALL apoc.trigger.start(databaseName STRING, name STRING)

Updated procedures and functions

Feature Details

Procedure Updated

apoc.path.expandConfig(startNode ANY, config MAP<STRING, ANY>)
apoc.path.spanningTree(startNode ANY, config MAP<STRING, ANY>)
apoc.path.subgraphAll(startNode ANY, config MAP<STRING, ANY>)
apoc.path.subgraphNodes(startNode ANY, config MAP<STRING, ANY>)

Deprecated config fields:

Config {
  whitelistNodes: LIST<NODE>,
  blacklistNodes: LIST<NODE>
}

Use the following instead:

Config {
  allowlistNodes: LIST<NODE>,
  denylistNodes: LIST<NODE>
}

New procedures and functions

Feature Details

Procedure New

CALL apoc.trigger.drop(databaseName STRING, name STRING)

Eventually removes the given trigger.

Procedure New

CALL apoc.trigger.dropAll(databaseName STRING)

Eventually all triggers from the given database.

Procedure New

CALL apoc.trigger.install(databaseName STRING, name STRING, statement STRING, selector MAP<STRING, ANY>, config MAP<STRING, ANY>)

Eventually a trigger for a given database which is invoked when a successful transaction occurs.

Procedure New

CALL apoc.trigger.show(databaseName STRING)

Lists all eventually installed triggers for a database.

Procedure New

CALL apoc.trigger.stop(databaseName STRING, name STRING)

Eventually stops the given trigger.

Procedure New

CALL apoc.trigger.start(databaseName STRING, name STRING)

Eventually restarts the given paused trigger.

Version 5.1

Removed procedures and functions

Feature Details

Function Removed

apoc.convert.toBoolean(value)

Use the following instead:

toBoolean(value)

or

toBooleanOrNull(value)

Function Removed

apoc.convert.toBooleanList(value)

Use the following instead:

toBooleanList(value)

Function Removed

apoc.convert.toFloat(value)

Use the following instead:

toFloat(value)

or

toFloatOrNull(value)

Function Removed

apoc.convert.toIntList(value)

Use the following instead:

toIntegerList(value)

Function Removed

apoc.convert.toInteger(value)

Use the following instead:

toInteger(value)

or

toIntegerOrNull(value)

Function Removed

apoc.convert.toString(value)

Use the following instead:

toString(value)

or

toStringOrNull(value)

Function Removed

apoc.convert.toStringList(value)

Use the following instead:

toStringList(value)

Version 5.0

Config updates

Feature Details

Config Updated

APOC config settings are no longer supported in neo4j.conf.

All apoc.* settings should now be set via an environment variable or added to apoc.conf.

See here for more information.

Deprecated procedures and functions

Feature Details

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

Procedure Deprecated

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.

Removed procedures and functions

Feature Details

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)

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.