mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
refactor: 数据库meta使用注册方式,方便可插拔
This commit is contained in:
@@ -5,21 +5,12 @@ import (
|
||||
"fmt"
|
||||
"mayfly-go/internal/db/dbm/dbi"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
go_ora "github.com/sijms/go-ora/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
meta dbi.Meta
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
func GetMeta() dbi.Meta {
|
||||
once.Do(func() {
|
||||
meta = new(OraMeta)
|
||||
})
|
||||
return meta
|
||||
func init() {
|
||||
dbi.Register(dbi.DbTypeOracle, new(OraMeta))
|
||||
}
|
||||
|
||||
type OraMeta struct {
|
||||
|
||||
Reference in New Issue
Block a user