Documentation
¶
Index ¶
- Variables
- type MysqlClient
- func (m *MysqlClient) Check() error
- func (m *MysqlClient) Close()
- func (m *MysqlClient) GetConnection(dbName ...string) (*gorm.DB, error)
- func (m *MysqlClient) Init(mysqlConfigData []byte)
- func (m *MysqlClient) InitWithError(mysqlConfigData []byte) error
- func (m *MysqlClient) IsMultiDB() bool
- func (m *MysqlClient) ListConnNames() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("mysql client is closed")
Functions ¶
This section is empty.
Types ¶
type MysqlClient ¶
type MysqlClient struct {
// contains filtered or unexported fields
}
func (*MysqlClient) Check ¶
func (m *MysqlClient) Check() error
func (*MysqlClient) Close ¶
func (m *MysqlClient) Close()
func (*MysqlClient) GetConnection ¶
func (m *MysqlClient) GetConnection(dbName ...string) (*gorm.DB, error)
func (*MysqlClient) Init ¶
func (m *MysqlClient) Init(mysqlConfigData []byte)
Init 保留旧 MginPlugin 签名;新调用方应使用 InitWithError 获取初始化错误。
func (*MysqlClient) InitWithError ¶ added in v2.0.18
func (m *MysqlClient) InitWithError(mysqlConfigData []byte) error
func (*MysqlClient) IsMultiDB ¶
func (m *MysqlClient) IsMultiDB() bool
func (*MysqlClient) ListConnNames ¶
func (m *MysqlClient) ListConnNames() []string
Click to show internal directories.
Click to hide internal directories.