feat: 添加Neo4j图数据库支持及前端代码重构
- 新增 Neo4j 图数据库 handler、service、model - 后端添加 SaveGraph API 接口 - 前端 Database.vue 重构,拆分为独立组件 - 新增 web/src/views/database/ 组件目录 - 删除临时文件 (temp_*.go) - 添加 Neo4j 相关 API 需求文档 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
42
team-require/web/neo4j-support.md
Normal file
42
team-require/web/neo4j-support.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 后端需求 - 支持 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` 方法
|
||||
|
||||
## 优先级
|
||||
|
||||
中 - 扩展数据库类型支持
|
||||
Reference in New Issue
Block a user