Documentation
¶
Index ¶
- func Connect(DBHost string, DBPort int, DBUserName string, DBPassword string, ...) (*gorm.DB, error)
- func SetConnMaxLifetime(conns int) mysqlOption
- func SetMaxIdleConns(conns int) mysqlOption
- func SetMaxOpenConns(conns int) mysqlOption
- func SetNamingStrategy(namingStrategy schema.Namer) mysqlOption
- func SetPrintLog(isenable bool, level logger.LogLevel, latencyThreshold time.Duration) mysqlOption
- func SetTimezone(timezone string) mysqlOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetConnMaxLifetime ¶
func SetConnMaxLifetime(conns int) mysqlOption
func SetMaxIdleConns ¶
func SetMaxIdleConns(conns int) mysqlOption
func SetMaxOpenConns ¶
func SetMaxOpenConns(conns int) mysqlOption
func SetNamingStrategy ¶
func SetPrintLog ¶
SetPrintLog level: 1=silent, 2=Error, 3=Warn, 4=Info. latencyThreshold: suggestion 200ms.
func SetTimezone ¶
func SetTimezone(timezone string) mysqlOption
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.