Versions in this module Expand all Collapse all v1 v1.0.3 Sep 14, 2020 Changes in this version type DB + Idx int64 + Master *DB + Read *conn + Write *conn v1.0.2 Sep 14, 2020 Changes in this version + const FILEPATH + func Connect(c *Config, dataSourceName string) (*sql.DB, error) + func FormatConfig(c *BaseConfig) string + type BaseConfig struct + Addr string + DBName string + PassWord string + Port string + UserName string + func InitReadConfig(KeyName, FilePath string) BaseConfig + type Config struct + Active int + DSN string + ExecTimeout time.Duration + Idle int + IdleTimeout time.Duration + QueryTimeout time.Duration + ReadDSN string + TranTimeout time.Duration + type DB struct + func ConnectMysql(WriteKey, ReadKey, FilePath string) (db *DB) + func Open(c *Config) (*DB, error) + func OpenMySQL(c *Config) (db *DB) + func (db *DB) Close() (err error) + type Rows struct