-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
base: master
Are you sure you want to change the base?
feat: 插件数据库提供基于Gorm的存储结构 #1195
Conversation
(cherry picked from commit a1acb183d6c656aa0c63b244368f0dde01c5c13a)
- 修改 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 |
There was a problem hiding this comment.
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("")) |
There was a problem hiding this comment.
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)
采用了扩展的gokv的接口,以及部分它的实现方式。
暂时作为草稿,发出来各位品鉴一下#闭目
BTW: 这个是基于另一个缓存修改进行开发的。所以目前只能是个草稿。