1 Star 0 Fork 0

zhoujin826/tidb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xconfig.go 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Jack Yu 提交于 2017-10-11 00:28 . add mysqlx driver (#4748)
package mysql
import (
"crypto/tls"
"time"
)
type xconfig struct {
user string
passwd string
net string
addr string
dbname string
params map[string]string
loc *time.Location
tls *tls.Config
timeout time.Duration
collation uint8
allowAllFiles bool
allowCleartextPasswords bool
columnsWithAlias bool
interpolateParams bool
useXProtocol bool // use X protocol rather than native protocol
useGetCapabilities bool // for X protocol, do we send a GetCapabilities message to query server capabilities? default: true
}
func NewXconfigFromConfig(cfg *config) *xconfig {
return &xconfig{
user: cfg.user,
passwd: cfg.passwd,
net: cfg.net,
addr: cfg.addr,
dbname: cfg.dbname,
params: cfg.params,
loc: cfg.loc,
tls: cfg.tls,
timeout: cfg.timeout,
collation: cfg.collation,
allowAllFiles: cfg.allowAllFiles,
allowCleartextPasswords: cfg.allowCleartextPasswords,
columnsWithAlias: cfg.columnsWithAlias,
interpolateParams: cfg.interpolateParams,
useXProtocol: true,
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoujin826/tidb.git
git@gitee.com:zhoujin826/tidb.git
zhoujin826
tidb
tidb
v1.0.1

搜索帮助