Documentation ¶
Index ¶
Constants ¶
View Source
const (
Driver drivers.DBDriver = "mysql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Driver drivers.DBDriver `json:"driver"` Host string `json:"host"` Port int `json:"port"` Database string `json:"database"` Username string `json:"username"` Password string `json:"password"` Charset string `json:"charset"` Collation string `json:"collation"` Prefix string `json:"prefix"` ParseTime bool `json:"parse_time"` Location string `json:"location"` Debug bool `json:"debug"` Pool *ConnectionPool `json:"pool"` HealthCheck *ConnectionHealthCheck `json:"health_check"` }
func (*Connection) GetDriver ¶
func (i *Connection) GetDriver() drivers.DBDriver
func (*Connection) IsDebug ¶
func (i *Connection) IsDebug() bool
func (*Connection) NewConnector ¶
func (i *Connection) NewConnector(name string) (drivers.ConnectorInterface, error)
type ConnectionHealthCheck ¶
type ConnectionPool ¶
type MysqlConnector ¶
func NewMysqlConnector ¶
func NewMysqlConnector(connection string, config *Connection) (*MysqlConnector, error)
func (*MysqlConnector) Connect ¶
func (i *MysqlConnector) Connect() error
func (*MysqlConnector) GetConnection ¶
func (i *MysqlConnector) GetConnection() string
func (*MysqlConnector) GetDB ¶
func (i *MysqlConnector) GetDB() any
func (*MysqlConnector) GetDriver ¶
func (i *MysqlConnector) GetDriver() drivers.DriverInterface
Click to show internal directories.
Click to hide internal directories.