Files
X-Agents/teams/web/neo4j-support.md
2026-03-11 14:26:47 +08:00

43 lines
1020 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 后端需求 - 支持 Neo4j 图数据库
## 需求描述
添加 Neo4j 图数据库类型支持。
## Neo4j 连接参数
Neo4j 连接需要以下参数:
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|------|------|------|------|--------|
| uri | string | 是 | 连接地址 | bolt://localhost:7687 |
| username | string | 是 | 用户名 | neo4j |
| password | string | 是 | 密码 | - |
| database | string | 否 | 数据库名 | neo4j默认数据库 |
### 连接示例
- `bolt://localhost:7687`
- `neo4j://localhost:7687`
- `bolt://192.168.1.100:7687`
## 需要修改的地方
### 1. 数据库类型列表
在前端和后端添加 "Neo4j" 选项
### 2. 连接表单
Neo4j 只需要 3-4 个字段:
- URI连接地址
- Username用户名
- Password密码
- Database数据库名可选
### 3. 数据库服务
- `server/internal/service/database_service.go`
- 新增 `connectNeo4j` 方法
- 新增 `getNeo4jTables` 方法
## 优先级
中 - 扩展数据库类型支持