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:
@@ -41,6 +41,11 @@ func (r *DatabaseRepository) Update(id string, info *model.DatabaseInfo) error {
|
||||
return r.db.Model(&model.DatabaseInfo{}).Where("id = ?", id).Updates(info).Error
|
||||
}
|
||||
|
||||
// UpdateFields 更新指定字段
|
||||
func (r *DatabaseRepository) UpdateFields(id string, fields map[string]interface{}) error {
|
||||
return r.db.Model(&model.DatabaseInfo{}).Where("id = ?", id).Updates(fields).Error
|
||||
}
|
||||
|
||||
// Delete 删除
|
||||
func (r *DatabaseRepository) Delete(id string) error {
|
||||
return r.db.Delete(&model.DatabaseInfo{}, "id = ?", id).Error
|
||||
|
||||
Reference in New Issue
Block a user