Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOption = option{ ParseTime: true, // contains filtered or unexported fields }
Functions ¶
func NewOption ¶
func NewOption(options ...OptionFunc) *option
Types ¶
type MysqlDriver ¶
func NewDriver ¶
func NewDriver(opt *option) (*MysqlDriver, error)
func (*MysqlDriver) Connection ¶
func (d *MysqlDriver) Connection() error
func (*MysqlDriver) CreateDatabase ¶
func (d *MysqlDriver) CreateDatabase(name string) error
CreateDatabase 创建新的数据库 指定名字,指定charset 引擎 之类
func (*MysqlDriver) DNS ¶
func (d *MysqlDriver) DNS(db bool) string
type OptionFunc ¶
type OptionFunc = func(o *option)
func WithDbName ¶
func WithDbName(dbname string) OptionFunc
func WithHost ¶
func WithHost(host string) OptionFunc
func WithLoggerLevel ¶
func WithLoggerLevel(l logger.LogLevel) OptionFunc
func WithLoggerOut ¶
func WithLoggerOut(w io.Writer) OptionFunc
func WithPassword ¶
func WithPassword(password string) OptionFunc
func WithUserName ¶
func WithUserName(username string) OptionFunc
Click to show internal directories.
Click to hide internal directories.