弃用与新增

本章列出了 APOC 近期版本中所有已移除、弃用、新增或扩展的功能。

5.0 版本

已弃用的过程与函数

特性 详细信息

过程

apoc.custom.declareFunction

替换为

apoc.custom.installFunction

过程

apoc.custom.declareProcedure

替换为

apoc.custom.installProcedure

过程

apoc.custom.removeFunction

替换为

apoc.custom.dropFunction

过程

apoc.custom.removeProcedure

替换为

apoc.custom.dropProcedure

函数 已弃用

RETURN apoc.create.uuid()

由 Neo4j 函数 randomUUID() 替代

RETURN randomUUID()

过程 已弃用

CALL apoc.create.uuids($count)

由 Neo4j 函数 randomUUID() 替代

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

已移除的过程与函数

特性 详细信息

函数 已移除

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

由 ExtractEmail 或 ExtractURI 替代

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

过程 已移除

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

请改用以下内容

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

函数 已移除

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

替换为

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

函数 已移除

apoc.coll.reverse(coll)

已在 Cypher 中替换为

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

过程 已移除

apoc.export.cypherAll(file,config)

替换为

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

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

函数 已移除

apoc.meta.type(value)

替换为

apoc.meta.cypher.type(value)

函数 已移除

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

替换为

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

函数 已移除

apoc.meta.isType(value,type)

替换为

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

函数 已移除

apoc.meta.typeName(value)

替换为

apoc.meta.cypher.type(value)

过程 已移除

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

已在 Cypher 中部分替换为

CALL {} IN TRANSACTIONS OF n ROWS

过程 已移除

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

已在 Cypher 中替换为

CALL {} IN TRANSACTIONS OF n ROWS

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

过程 已移除

apoc.xml.import(url, config)

替换为

apoc.import.xml(file,config)

过程 已移除

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

请改用以下内容,并设置 withRelationships = true

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

过程 已移除

CALL apoc.text.phonetic(value) yield value

由该函数替代

RETURN apoc.text.phonetic(text) yield value

过程 已移除

CALL apoc.text.doubleMetaphone(value) yield value

由该函数替代

RETURN apoc.text.doubleMetaphone(text) yield value

函数 已移除

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

由 Neo4j round() 函数替代

RETURN round(3.141592, 3)

过程 已移除

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

此过程的功能与 DBMS 自带的页面缓存预热(page cache warm up)功能重复。

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

过程 已移除

apoc.mongodb.get()

替换为

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

过程 已移除

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

替换为

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

过程 已移除

apoc.mongodb.first() yield value

过程 已移除

apoc.mongodb.find() yield value

替换为

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

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

过程 已移除

apoc.cluster.graph()

过程 已移除

apoc.load.jdbcParams()

替换为

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

过程 已移除

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

替换为

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

过程 已移除

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

替换为

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

函数 已移除

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

替换为

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

已移除的配置设置

设置 详细信息

设置 已移除 apoc.initializer.cypher - 数据库启动时执行一次的 Cypher 语句

此项已被特定于数据库的初始化程序取代。请改用 apoc.initializer.<数据库名称>。

© . This site is unofficial and not affiliated with Neo4j, Inc.