Versions in this module Expand all Collapse all v1 v1.0.3 Feb 2, 2021 Changes in this version + func CloseAllDb() + func CloseDbByName(name string) error + func GetDbObj(name string) (*gorm.DB, error) + type DbConf struct + Charset string + Collation string + Database string + Ip string + Loc string + Logger logger.Writer + LoggerConfig logger.Config + MaxIdleConns int + MaxLifetime int64 + MaxOpenConns int + ParseTime bool + Password string + Port int + ReadTimeout time.Duration + ShowSql bool + Timeout time.Duration + UsePool bool + User string + WriteTimeout time.Duration + func (conf *DbConf) Close() error + func (conf *DbConf) DSN() (string, error) + func (conf *DbConf) Db() *gorm.DB + func (conf *DbConf) InitInstance() error + func (conf *DbConf) SetDbPool() error + func (conf *DbConf) SetEngineName(name string) error + func (conf *DbConf) ShortConnect() error + func (conf *DbConf) SqlDB() (*sql.DB, error) + type Option func(conf *DbConf) + func WithDefaultStringSize(size uint) Option + func WithDisableDatetimePrecision(b bool) Option + func WithDontSupportRenameColumn(b bool) Option + func WithDontSupportRenameIndex(b bool) Option + func WithDriverName(name string) Option + func WithDsn(dsn string) Option + func WithGormConfig(config gorm.Config) Option + func WithGormConnPool(conn gorm.ConnPool) Option + func WithLogLevel(logLevel logger.LogLevel) Option + func WithLogger(gLogger logger.Writer) Option + func WithSkipInitializeWithVersion(b bool) Option