Neo4j

连接到 Neo4j 图数据库

使用说明

将 Neo4j 图数据库集成到工作流程中。可以查询、创建、合并、更新和删除节点及关系。

工具

neo4j_query

执行 MATCH 查询以从 Neo4j 图数据库中读取节点和关系。为了获得最佳性能并防止结果集过大,请在查询中包含 LIMIT(例如,

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring要执行的 Cypher 查询 (通常是 MATCH 语句)
parametersobjectCypher 查询的参数,格式为 JSON 对象。用于任何动态值,包括 LIMIT (例如,查询:"MATCH (n) RETURN n LIMIT $limit", 参数:{limit: 100})。
parametersstring无描述

输出

参数类型描述
messagestring操作状态消息
recordsarray查询返回的记录数组
recordCountnumber返回的记录数量
summaryjson查询执行摘要,包括时间和计数器

neo4j_create

执行 CREATE 语句以向 Neo4j 图数据库添加新节点和关系

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring要执行的 Cypher CREATE 语句
parametersobjectCypher 查询的参数,格式为 JSON 对象

输出

参数类型描述
messagestring操作状态消息
summaryjson创建摘要,包括创建的节点和关系的计数

neo4j_merge

执行 MERGE 语句以在 Neo4j 中查找或创建节点和关系(插入或更新操作)

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring要执行的 Cypher MERGE 语句
parametersobjectCypher 查询的参数,格式为 JSON 对象

输出

参数类型描述
messagestring操作状态消息
summaryjson包含节点/关系创建或匹配计数的合并摘要

neo4j_update

执行 SET 语句以更新 Neo4j 中现有节点和关系的属性

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring包含 MATCH 和 SET 语句的 Cypher 查询以更新属性
parametersobjectCypher 查询的参数,格式为 JSON 对象

输出

参数类型描述
messagestring操作状态消息
summaryjson包含已设置属性计数的更新摘要

neo4j_delete

执行 DELETE 或 DETACH DELETE 语句以从 Neo4j 中删除节点和关系

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring包含 MATCH 和 DELETE/DETACH DELETE 语句的 Cypher 查询
parametersobjectCypher 查询的参数,格式为 JSON 对象
detachboolean是否使用 DETACH DELETE 在删除节点前移除关系

输出

参数类型描述
messagestring操作状态消息
summaryjson删除摘要,包括已删除的节点和关系的计数

neo4j_execute

在 Neo4j 图数据库上执行任意 Cypher 查询以进行复杂操作

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口 (默认:Bolt 协议为 7687)
databasestring要连接的数据库名称
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式 (启用,禁用)
cypherQuerystring要执行的 Cypher 查询 (任何有效的 Cypher 语句)
parametersobjectCypher 查询的参数,格式为 JSON 对象

输出

参数类型描述
messagestring操作状态消息
recordsarray查询返回的记录数组
recordCountnumber返回的记录数量
summaryjson执行摘要,包括时间和计数

注意

  • 分类:tools
  • 类型:neo4j

输出

参数类型描述
messagestring操作状态消息
recordsarray查询返回的记录数组
recordCountnumber返回的记录数
summaryjson执行摘要,包括计时和计数器

neo4j_introspect

分析 Neo4j 数据库,发现其架构,包括节点标签、关系类型、属性、约束和索引。

输入

参数类型必需描述
hoststringNeo4j 服务器主机名或 IP 地址
portnumberNeo4j 服务器端口(默认:Bolt 协议为 7687)
databasestring要连接的数据库名称(例如:"neo4j"、"movies"、"social")
usernamestringNeo4j 用户名
passwordstringNeo4j 密码
encryptionstring连接加密模式(启用,禁用)

输出

参数类型描述
messagestring操作状态消息
labelsarray数据库中的节点标签数组
relationshipTypesarray数据库中的关系类型数组
nodeSchemasarray节点模式及其属性数组
relationshipSchemasarray关系模式及其属性数组
constraintsarray数据库约束数组
indexesarray数据库索引数组

On this page

Start building today
Trusted by over 60,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started