存储过程与函数
apoc.agg
限定名称 | 类型 |
---|---|
返回与给定 |
函数 |
返回与给定 |
存储过程 |
apoc.agg
限定名称 | 类型 |
---|---|
apoc.agg.multiStats(nodeOrRel, keys) - 返回多维聚合 |
存储过程 |
apoc.agg.rollup(<ANY>, [groupKeys], [aggKeys]) 模拟 Oracle/Mysql rollup 命令:`ROLLUP groupKeys, SUM(aggKey1), AVG(aggKey1), COUNT(aggKey1), SUM(aggKey2), AVG(aggKey2), … ` |
存储过程 |
apoc.bolt
限定名称 | 类型 |
---|---|
apoc.bolt.load(url-or-key, kernelTransaction, params, config) - 通过 bolt 访问其他数据库以进行读取 |
存储过程 |
存储过程 |
apoc.coll
apoc.coll.avgDuration apoc.coll.avgDuration([duration('P2DT3H'), duration('PT1H45S'), …]) - 返回持续时间值列表的平均值 | 函数 | apoc.coll.fillObject apoc.coll.fillObject(item, count) - 返回指定大小的相同项列表 |
---|
apoc.config
限定名称 | 类型 |
---|---|
apoc.config.list | 将 Neo4j 配置列为键值表 |
存储过程 |
apoc.config.map | 将 Neo4j 配置列为 map |
存储过程 |
apoc.convert
限定名称 | 类型 |
---|---|
apoc.convert.toYaml(value, $config) - 将给定值序列化为 YAML 字符串 |
函数 |
apoc.convert.fromYaml(value, $config) - 将 YAML 字符串反序列化为 Neo4j 值 |
函数 |
apoc.couchbase
限定名称 | 类型 |
---|---|
apoc.couchbase.append(hostOrKey, bucket, documentId, content, config) yield id, expiry, cas, mutationToken, content - 将 couchbase json 文档追加到现有文档中。 |
存储过程 |
apoc.couchbase.exists(hostOrKey, bucket, documentId, config) yield value - 检查具有给定 ID 的 couchbase json 文档是否存在。 |
存储过程 |
apoc.couchbase.get(hostOrKey, bucket, documentId, config) yield id, expiry, cas, mutationToken, content - 通过其唯一 ID 检索 couchbase json 文档。 |
存储过程 |
apoc.couchbase.insert(hostOrKey, bucket, documentId, jsonDocument, config) yield id, expiry, cas, mutationToken, content - 插入具有唯一 ID 的 couchbase json 文档。 |
存储过程 |
apoc.couchbase.namedParamsQuery(hostkOrKey, bucket, statement, paramNames, paramValues, config) yield queryResult - 执行带有命名参数的 N1QL 语句。 |
存储过程 |
apoc.couchbase.posParamsQuery(hostOrKey, bucket, statement, params, config) yield queryResult - 执行带有位置参数的 N1QL 语句。 |
存储过程 |
apoc.couchbase.prepend(hostOrKey, bucket, documentId, content, config) yield id, expiry, cas, mutationToken, content - 将 couchbase json 文档前置到现有文档中。 |
存储过程 |
apoc.couchbase.query(hostOrKey, bucket, statement, config) yield queryResult - 执行普通的无参数 N1QL 语句。 |
存储过程 |
apoc.couchbase.remove(hostOrKey, bucket, documentId, config) yield id, expiry, cas, mutationToken, content - 移除由其唯一 ID 标识的 couchbase json 文档。 |
存储过程 |
apoc.couchbase.replace(hostOrKey, bucket, documentId, jsonDocument, config) yield id, expiry, cas, mutationToken, content - 替换由其唯一 ID 标识的 couchbase json 文档的内容。 |
存储过程 |
apoc.couchbase.upsert(hostOrKey, bucket, documentId, jsonDocument) yield id, expiry, cas, mutationToken, content - 插入或覆盖具有唯一 ID 的 couchbase json 文档。 |
存储过程 |
apoc.custom
限定名称 | 类型 |
---|---|
apoc.custom.declareFunction(signature, statement, forceSingle, description) - 注册自定义 cypher 函数 |
存储过程 |
apoc.custom.declareProcedure(signature, statement, mode, description) - 注册自定义 cypher 存储过程 |
存储过程 |
apoc.custom.list() - 提供注册的自定义存储过程/函数列表 |
存储过程 |
apoc.custom.removeFunction(name, type) - 移除目标自定义函数 |
存储过程 |
apoc.custom.removeProcedure(name) - 移除目标自定义存储过程 |
存储过程 |
apoc.cypher
限定名称 | 类型 |
---|---|
apoc.cypher.mapParallel(fragment, params, list-to-parallelize) yield value - 并行执行 fragment 批次,列表段被分配给 _ |
存储过程 |
apoc.cypher.mapParallel2(fragment, params, list-to-parallelize) yield value - 并行执行 fragment 批次,列表段被分配给 _ |
存储过程 |
apoc.cypher.parallel(fragment, |
存储过程 |
apoc.cypher.parallel2(fragment, |
存储过程 |
apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) - 运行文件中的每个语句,全部以分号分隔 - 当前不支持 schema 操作 |
存储过程 |
apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}])) - 运行文件中的每个语句,全部以分号分隔 |
存储过程 |
apoc.cypher.runFileReadOnly(file or url,[{timeout:10,parameters:{}}]) - 运行文件中的每个 |
存储过程 |
apoc.cypher.runFilesReadOnly([files or urls],[{timeout:10,parameters:{}}])) - 运行文件中的每个 |
存储过程 |
apoc.cypher.runSchemaFile(file or url,[{statistics:true,timeout:10}]) - 只允许 schema 操作,运行文件中的每个 schema 语句,全部以分号分隔 |
存储过程 |
apoc.cypher.runSchemaFiles([files or urls],{statistics:true,timeout:10}) - 只允许 schema 操作,运行文件中的每个 schema 语句,全部以分号分隔 |
存储过程 |
apoc.diff
限定名称 | 类型 |
---|---|
返回一个 Map,详细说明两个给定关系之间的属性差异 |
函数 |
apoc.data
限定名称 | 类型 |
---|---|
apoc.data.email('email_address') as {personal,user,domain} - 将个人姓名、用户和域提取为 map |
函数 |
apoc.dv
限定名称 | 类型 |
---|---|
添加虚拟化资源配置 |
存储过程 |
列出所有虚拟化资源配置 |
存储过程 |
按名称删除虚拟化资源配置 |
存储过程 |
按名称查询虚拟化资源并返回虚拟节点 |
存储过程 |
按名称查询虚拟化资源,并使用虚拟关系链接到作为第一个参数传入的节点,返回虚拟节点 |
存储过程 |
apoc.es
限定名称 | 类型 |
---|---|
apoc.es.get(host-or-key,index-or-null,type-or-null,id-or-null,query-or-null,payload-or-null,$config) yield value - 对 elastic search 执行 GET 操作 |
存储过程 |
apoc.es.getRaw(host-or-key,path,payload-or-null,$config) yield value - 对 elastic search 执行原始 GET 操作 |
存储过程 |
apoc.es.post(host-or-key,index-or-null,type-or-null,query-or-null,payload-or-null,$config) yield value - 对 elastic search 执行 POST 操作 |
存储过程 |
apoc.es.postRaw(host-or-key,path,payload-or-null,$config) yield value - 对 elastic search 执行原始 POST 操作 |
存储过程 |
apoc.es.put(host-or-key,index-or-null,type-or-null,id-or-null,query-or-null,payload-or-null,$config) yield value - 对 elastic search 执行 PUT 操作 |
存储过程 |
apoc.es.query(host-or-key,index-or-null,type-or-null,query-or-null,payload-or-null,$config) yield value - 对 elastic search 执行 SEARCH 操作 |
存储过程 |
apoc.es.stats(host-or-key,$config) - elastic search 统计信息 |
存储过程 |
apoc.es.delete(host-or-key,index-or-null,type-or-null,id-or-null,query-or-null,$config) yield value - 对 elastic search 执行 DELETE 操作 |
存储过程 |
apoc.export
限定名称 | 类型 |
---|---|
apoc.export.xls.all(file,config) - 将整个数据库作为 xls 导出到指定文件 |
存储过程 |
apoc.export.xls.data(nodes,rels,file,config) - 将给定节点和关系作为 xls 导出到指定文件 |
存储过程 |
apoc.export.xls.graph(graph,file,config) - 将给定 graph 对象作为 xls 导出到指定文件 |
存储过程 |
apoc.export.xls.query(query,file,{config,…,params:{params}}) - 将 cypher 语句的结果作为 xls 导出到指定文件 |
存储过程 |
apoc.generate
限定名称 | 类型 |
---|---|
apoc.generate.ba(noNodes, edgesPerNode, label, type) - 根据 Barabasi-Albert 模型生成随机图 |
存储过程 |
apoc.generate.complete(noNodes, label, type) - 生成随机完全图 |
存储过程 |
apoc.generate.er(noNodes, noEdges, label, type) - 根据 Erdos-Renyi 模型生成随机图 |
存储过程 |
apoc.generate.simple(degrees, label, type) - 根据给定度分布生成简单随机图 |
存储过程 |
apoc.generate.ws(noNodes, degree, beta, label, type) - 根据 Watts-Strogatz 模型生成随机图 |
存储过程 |
apoc.gephi
限定名称 | 类型 |
---|---|
apoc.gephi.add(url-or-key, workspace, data, weightproperty, ['exportproperty']) | 将传入数据流式传输到 Gephi |
存储过程 |
apoc.get
限定名称 | 类型 |
---|---|
apoc.get.nodes(node|id|[ids]) - 快速返回所有具有这些 id 的节点 |
存储过程 |
apoc.get.rels(rel|id|[ids]) - 快速返回所有具有这些 id 的关系 |
存储过程 |
apoc.import
限定名称 | 类型 |
---|---|
apoc.import.arrow(input, $config) - 从提供的 arrow 文件或字节数组导入 arrow |
存储过程 |
apoc.load
限定名称 | 类型 |
---|---|
apoc.load.csv('urlOrBinary',{config}) YIELD lineNo, list, map - 从 URL 加载 CSV 作为值流,config 包含以下任意选项:{skip:1,limit:5,header:false,sep:'TAB',ignore:['tmp'],nullValues:['na'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false}} |
存储过程 |
apoc.load.csvParams('urlOrBinary', {httpHeader: value}, payload, {config}) YIELD lineNo, list, map - 从 CSV URL(例如 web-api)加载数据,同时发送 header / payload,将 CSV 从 URL 加载为值流,config 包含以下任意选项:{skip:1,limit:5,header:false,sep:'TAB',ignore:['tmp'],nullValues:['na'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false}} |
存储过程 |
apoc.load.directory('pattern', 'urlDir', {config}) YIELD value - 加载参数 urlDir 指定文件夹中符合给定模式的所有文件列表。如果未指定或为空 urlDir 参数,则加载 import 文件夹中的文件。 |
存储过程 |
apoc.load.directory.async.add(name, cypher, pattern, urlDir, {}) YIELD name, status, pattern, cypher, urlDir, config, error - 添加或替换具有特定名称的文件夹监听器,该监听器会针对所有具有给定模式的文件触发,并在触发时执行指定的 Cypher 查询。返回所有监听器列表。可以在 config 参数中指定事件类型。 |
存储过程 |
apoc.load.directory.async.list() YIELD name, status, pattern, cypher, urlDir, config, error - 列出所有文件夹监听器 |
存储过程 |
apoc.load.directory.async.remove(name) YIELD name, status, pattern, cypher, urlDir, config, error - 按名称移除文件夹监听器,并返回所有剩余监听器(如果有) |
存储过程 |
apoc.load.directory.async.removeAll() - 移除所有文件夹监听器 |
存储过程 |
apoc.load.driver('org.apache.derby.jdbc.EmbeddedDriver') 注册源数据库的 JDBC 驱动程序 |
存储过程 |
apoc.load.html('url',{name: jquery, name2: jquery}, config) YIELD value - 加载 Html 页面并以 Map 形式返回结果 |
存储过程 |
apoc.load.htmlPlainText('urlOrHtml',{name: jquery, name2: jquery}, config) YIELD value - 加载 Html 页面并以 Map 形式返回结果 |
存储过程 |
apoc.load.jdbc('key or url','table or statement', params, config) YIELD row - 从关系数据库加载,可以是完整表或 SQL 语句 |
存储过程 |
apoc.load.jdbcUpdate('key or url','statement',[params],config) YIELD row - 更新关系数据库,使用带有可选参数的 SQL 语句 |
存储过程 |
apoc.load.ldap("key" or {connectionMap},{searchMap}) 从 ldap 源加载条目 (yield entry) |
存储过程 |
apoc.load.xls('url','selector',{config}) YIELD lineNo, list, map - 从 URL 加载 XLS 作为行值流,config 包含以下任意选项:{skip:1,limit:5,header:false,ignore:['tmp'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false, dateFormat:'iso_date', dateParse:['dd-MM-yyyy']}} |
存储过程 |
apoc.log
限定名称 | 类型 |
---|---|
apoc.log.debug(message, params) - 记录 debug 消息 |
存储过程 |
apoc.log.error(message, params) - 记录 error 消息 |
存储过程 |
apoc.log.info(message, params) - 记录 info 消息 |
存储过程 |
apoc.log.warn(message, params) - 记录 warn 消息 |
存储过程 |
apoc.map
限定名称 | 类型 |
---|---|
重命名 |
函数 |
apoc.metrics
限定名称 | 类型 |
---|---|
apoc.metrics.get(metricName, {}) - 按指标名称检索系统指标。可以传递与 apoc.load.csv 可用选项匹配的附加配置选项。 |
存储过程 |
apoc.metrics.list() - 获取可用指标列表 |
存储过程 |
apoc.metrics.storage(directorySetting) - 检索关于 Neo4j 用于数据存储的设备的存储指标。directorySetting 可以是任何有效的 neo4j 目录设置名称,例如 'server.directories.data'。如果提供 null 作为 directorySetting,您将获得所有可用的目录设置。有关可用目录设置列表,请参阅 Neo4j 操作手册关于配置设置的参考。目录设置不是路径,它们是 neo4j.conf 设置键名 |
存储过程 |
apoc.model
限定名称 | 类型 |
---|---|
apoc.model.jdbc('key or url', {schema:'<schema>', write: <true/false>, filters: { tables:[], views: [], columns: []}) YIELD nodes, relationships - 从关系数据库加载 schema |
存储过程 |
apoc.mongo
限定名称 | 类型 |
---|---|
apoc.mongo.aggregate(uri, pipeline, $config) yield value - 对 mongodb collection 执行 aggregate 操作 |
存储过程 |
apoc.mongo.count(uri, query, $config) yield value - 对 mongodb collection 执行 count 操作 |
存储过程 |
apoc.mongo.delete(uri, query, $config) - 从 mongodb collection 删除给定文档并返回受影响文档的数量 |
存储过程 |
apoc.mongo.find(uri, query, $config) yield value - 对 mongodb collection 执行 find 操作 |
存储过程 |
apoc.mongo.insert(uri, documents, $config) yield value - 将给定文档插入 mongodb collection |
存储过程 |
apoc.mongo.update(uri, query, update, $config) - 更新 mongodb collection 中的给定文档并返回受影响文档的数量 |
存储过程 |
apoc.mongodb
限定名称 | 类型 |
---|---|
apoc.mongodb.get.byObjectId(hostOrKey, db, collection, objectIdValue, config(default:{})) - 按 Object id 值获取文档 |
存储过程 |
apoc.monitor
限定名称 | 类型 |
---|---|
apoc.monitor.ids() 返回此 neo4j 实例使用的对象 id |
存储过程 |
apoc.monitor.kernel() 返回关于 neo4j 内核的信息 |
存储过程 |
apoc.monitor.store() 返回关于 neo4j 图存储不同部分大小的信息 |
存储过程 |
apoc.monitor.tx() 返回关于 neo4j 事务管理器信息 |
存储过程 |
apoc.nlp
限定名称 | 类型 |
---|---|
为提供的文本创建(虚拟)实体图 |
存储过程 |
返回提供的文本的实体流 |
存储过程 |
为提供的文本创建(虚拟)关键短语图 |
存储过程 |
返回提供的文本的关键短语流 |
存储过程 |
为提供的文本创建(虚拟)情感图 |
存储过程 |
返回提供的文本项的情感流 |
存储过程 |
为提供的文本创建(虚拟)实体图 |
存储过程 |
为提供的文本提供实体分析 |
存储过程 |
为提供的文本创建(虚拟)关键短语图 |
存储过程 |
为提供的文本提供实体分析 |
存储过程 |
为提供的文本创建(虚拟)情感图 |
存储过程 |
为提供的文本提供情感分析 |
存储过程 |
将文档分类到不同类别。 |
存储过程 |
将文档分类到不同类别。 |
存储过程 |
为提供的文本创建(虚拟)实体图 |
存储过程 |
返回提供的文本的实体流 |
存储过程 |
apoc.redis
限定名称 | 类型 |
---|---|
apoc.redis.append(uri, key, value, {config}) | 执行 'APPEND key value' 命令 |
存储过程 |
apoc.redis.configGet(uri, parameter, {config}) | 执行 'CONFIG GET parameter' 命令 |
存储过程 |
apoc.redis.configSet(uri, parameter, {config}) | 执行 'CONFIG SET parameter value' 命令 |
存储过程 |
apoc.redis.copy(uri, source, destination, {config}) | 执行 'COPY source destination' 命令,如果复制成功则返回 true,否则返回 false |
存储过程 |
apoc.redis.eval(uri, script, outputType, keys, values, {config}) | 执行 'EVAL script' 命令。在提供给存储过程的参数中,keys 绑定到 Lua 脚本的 KEYS[n] 特殊数组,values 绑定到 Lua 脚本的 ARGV[n] 特殊数组。 |
存储过程 |
apoc.redis.exists(uri, keys, {config}) | 执行 'EXISTS keys' 命令 |
存储过程 |
apoc.redis.get(uri, key, {config}) | 执行 'GET key' 命令 |
存储过程 |
apoc.redis.hdel(uri, key, fields, {config}) | 执行 'HDEL key fields' 命令 |
存储过程 |
apoc.redis.hexists(uri, key, field, {config}) | 执行 'HEXISTS key field' 命令 |
存储过程 |
apoc.redis.hget(uri, key, field, {config}) | 执行 'HGET key field' 命令 |
存储过程 |
apoc.redis.hgetall(uri, key, {config}) | 执行 'HGETALL key' 命令 |
存储过程 |
apoc.redis.hincrby(uri, key, field, amount, {config}) | 执行 'HINCRBY key field amount' 命令 |
存储过程 |
apoc.redis.hset(uri, key, field, value, {config}) | 执行 'HSET key field value' 命令,如果字段是哈希中的新字段则返回 true,如果字段已存在则返回 false |
存储过程 |
apoc.redis.incrby(uri, key, amount, {config}) | 执行 'INCRBY key increment' 命令 |
存储过程 |
apoc.redis.info(uri, {config}) | 执行 'INFO' 命令 |
存储过程 |
apoc.redis.lrange(uri, key, start, stop, {config}) | 执行 'LRANGE key start stop' 命令 |
存储过程 |
apoc.redis.persist(uri, key, {config}) | 执行 'PERSIST key' 命令 |
存储过程 |
apoc.redis.pexpire(uri, key, time, isExpireAt {config}) | 执行 'PEXPIRE key time' 命令,如果 isExpireAt=true 则执行 'PEPXPIREAT' 命令 |
存储过程 |
apoc.redis.pop(uri, key, {config}) | 执行 'LPOP key' 命令,如果 config right=true (默认) 则执行 'RPOP' 命令 |
存储过程 |
apoc.redis.pttl(uri, key, {config}) | 执行 'PTTL key' 命令 |
存储过程 |
apoc.redis.push(uri, key, values, {config}) | 执行 'LPUSH key field values' 命令,如果 config right=true (默认) 则执行 'RPUSH' 命令 |
存储过程 |
apoc.redis.sadd(uri, key, members, {config}) | 执行 'SADD key members' 命令 |
存储过程 |
apoc.redis.scard(uri, key, {config}) | 执行 'SCARD key' 命令 |
存储过程 |
apoc.redis.smembers(uri, key, {config}) | 执行 'SMEMBERS key' 命令 |
存储过程 |
apoc.redis.spop(uri, key, {config}) | 执行 'SPOP key' 命令 |
存储过程 |
apoc.redis.sunion(uri, keys, {config}) | 执行 'SUNION keys' 命令 |
存储过程 |
apoc.redis.zadd(uri, keys, scoresAndMembers, {config}) | 执行 'ZADD key scoresAndMembers' 命令,其中 scoresAndMembers 是一个 score,member,score,member,… 的列表 |
存储过程 |
apoc.redis.zcard(uri, key, {config}) | 执行 'ZCARD key' 命令 |
存储过程 |
apoc.redis.zrangebyscore(uri, key, min, max, {config}) | 执行 'ZRANGEBYSCORE key min max' 命令 |
存储过程 |
apoc.redis.zrem(uri, key, members, {config}) | 执行 'ZREM key members' 命令 |
存储过程 |
apoc.static
限定名称 | 类型 |
---|---|
apoc.static.list(prefix) - 返回 config (apoc.static.<prefix>.*) 或服务器生命周期存储中的静态存储值 |
存储过程 |
apoc.static.set(name, value) - 将值存储在 key 下用于服务器生命周期存储,返回之前存储或配置的值 |
存储过程 |
apoc.static.get(name) - 返回 config (apoc.static.<key>) 或服务器生命周期存储中的静态存储值 |
函数 |
apoc.static.getAll(prefix) - 返回 config (apoc.static.<prefix>.*) 或服务器生命周期存储中的静态存储值 |
函数 |
apoc.systemdb
限定名称 | 类型 |
---|---|
存储过程 |
|
存储过程 |
|
存储过程 |
apoc.temporal
限定名称 | 类型 |
---|---|
函数 |
apoc.ttl
限定名称 | 类型 |
---|---|
CALL apoc.ttl.expire(node,time,'time-unit') - 通过设置 :TTL label 和 |
存储过程 |
CALL apoc.ttl.expireIn(node,timeDelta,'time-unit') - 通过设置 :TTL label 和 |
存储过程 |
函数 |
apoc.util
限定名称 | 类型 |
---|---|
apoc.util.hashCode(value) - 返回值的 java.lang.Object#hashCode() |
函数 |
apoc.uuid
限定名称 | 类型 |
---|---|
CALL apoc.uuid.drop(label, databaseName) yield label, installed, properties | 最终移除之前添加的 UUID 处理器并返回 uuid 信息 |
存储过程 |
CALL apoc.uuid.dropAll(databaseName) yield label, installed, properties | 最终移除所有之前添加的 UUID 处理器并返回 uuid 信息 |
存储过程 |
CALL apoc.uuid.install(label, {addToExistingNodes: true/false, uuidProperty: 'uuid'}) yield label, installed, properties, batchComputationResult | 它将为提供的 |
存储过程 |
CALL apoc.uuid.list() yield label, installed, properties | 提供已安装的所有 uuid 处理器及其相关配置的列表 |
存储过程 |
CALL apoc.uuid.remove(label) yield label, installed, properties | 移除之前添加的 uuid 处理器并返回 uuid 信息。所有现有 uuid 属性保持不变 |
存储过程 |
CALL apoc.uuid.removeAll() yield label, installed, properties | 移除所有之前添加的 uuid 处理器并返回 uuid 信息。所有现有 uuid 属性保持不变 |
存储过程 |
CALL apoc.uuid.setup(label, databaseName, $config) | 最终为提供的 |
存储过程 |
CALL apoc.uuid.show(databaseName) | 列出数据库中所有最终安装的 UUID 处理器 |
存储过程 |