1 Star 0 Fork 0

hbgo/dameng

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dm.go 991 Bytes
一键复制 编辑 原始数据 按行查看 历史
VioletFlame 提交于 2024-11-07 08:44 . complete
// Package dameng implements gdb.Driver, which supports operations for database Kingbase.
package dameng
import (
_ "gitee.com/hbgo/dameng/godm"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
type Driver struct {
*gdb.Core
}
const (
quoteChar = `"`
)
func init() {
var (
err error
driverObj = New()
driverNames = g.SliceStr{"dm"}
)
for _, driverName := range driverNames {
if err = gdb.Register(driverName, driverObj); err != nil {
panic(err)
}
}
}
// New create and returns a driver that implements gdb.Driver, which supports operations for dameng.
func New() gdb.Driver {
return &Driver{}
}
// New creates and returns a database object for dameng.
func (d *Driver) New(core *gdb.Core, _ *gdb.ConfigNode) (gdb.DB, error) {
return &Driver{
Core: core,
}, nil
}
// GetChars returns the security char for this type of database.
func (d *Driver) GetChars() (charLeft string, charRight string) {
return quoteChar, quoteChar
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/hbgo/dameng.git
git@gitee.com:hbgo/dameng.git
hbgo
dameng
dameng
v1.0.4

搜索帮助