Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 插件数据库提供基于Gorm的存储结构 #1195

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

PaienNate
Copy link
Contributor

@PaienNate PaienNate commented Jan 14, 2025

采用了扩展的gokv的接口,以及部分它的实现方式。

暂时作为草稿,发出来各位品鉴一下#闭目

BTW: 这个是基于另一个缓存修改进行开发的。所以目前只能是个草稿。

bugtower100 and others added 11 commits January 9, 2025 17:49
- 修改 BuntDBPluginStorage 初始化逻辑,使用插件名称创建独立数据库文件
- 优化 ExtInfo.StorageSet 和 StorageGet 方法,修复潜在的空指针问题
-重构 buntdb 存储实现,移除未使用的编码器和解码器
- 优化 gorm 存储实现,改进记录未找到时的错误处理
- 添加日志记录,提高代码可读性和调试方便性
log.Infof("closing buntdb plugin storage")
b.KVMap.Range(func(key string, value *bunt.Store) bool {
v := value
value = nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
ineffectual assignment to value (ineffassign)

default:
d.Logger.Info("插件数据库初始化:BuntDB")
// 不需要定义名称
d.PluginStorage, err = plugin_store.NewBuntDBPluginStorage(d.GetExtDataDir(""))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci-lint] reported by reviewdog 🐶
ineffectual assignment to err (ineffassign)

@PaienNate PaienNate requested review from fy0 and Fripine January 14, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants