运行 Cypher 脚本文件

运行文件中的每个语句 / 每个文件,所有语句均以分号分隔

这些过程可用于运行通常由 cypher-shell 运行的文件。由于每个文件都在一个事务中执行,它们会自动跳过 :begin/:commit/:rollback 操作。

过程概述

可用的过程和函数在下表中描述

限定名称 类型 发布版本

apoc.cypher.runFileReadOnly

apoc.cypher.runFileReadOnly(file or url,[{timeout:10,parameters:{}}]) - 运行文件中的每个 READ 语句,所有语句均以分号分隔

过程

Apoc Extended

apoc.cypher.runFilesReadOnly

apoc.cypher.runFilesReadOnly([files or urls],[{timeout:10,parameters:{}}])) - 运行文件中的每个 READ 语句,所有语句均以分号分隔

过程

Apoc Extended

apoc.cypher.runFile

apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) - 运行文件中的每个语句,所有语句均以分号分隔

过程

Apoc Extended

apoc.cypher.runFiles

apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}])) - 运行文件中的每个语句,所有语句均以分号分隔

过程

Apoc Extended

apoc.cypher.runSchemaFile

apoc.cypher.runSchemaFile(file or url,[{statistics:true,timeout:10}]) - 仅允许执行模式操作,运行文件中的每个模式语句,所有语句均以分号分隔

过程

Apoc Extended

apoc.cypher.runSchemaFiles

apoc.cypher.runSchemaFiles([files or urls],{statistics:true,timeout:10}) - 仅允许执行模式操作,运行文件中的每个模式语句,所有语句均以分号分隔

过程

Apoc Extended

仅读取操作

  • apoc.cypher.runFileReadOnly(file or url,[{config}])

  • apoc.cypher.runFilesReadOnly([files or urls],[{config})])

仅数据操作

  • apoc.cypher.runFile(file or url,[{config}])

  • apoc.cypher.runFiles([files or urls],[{config})])

apoc.cypher.run*File(s) 过程有一些可选配置

  • {statistics:true/false} 用于输出每个语句的更新统计信息行,默认为 true

  • {timeout:1 or 10} 流等待新数据的时间长度,默认为 10

仅模式操作

  • apoc.cypher.runSchemaFile(file or url,[{config}])

  • apoc.cypher.runSchemaFiles([files or urls],[{config})])

© . All rights reserved.