Documentation
¶
Overview ¶
Package db provides some assistant functions about the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogLevel is the level to log the sql statement and args. LogLevel = new(slog.LevelVar) // LogArgs is used to decide whether log args when logging the sql statement. LogArgs = new(atomic.Bool) )
View Source
var Connection = gconf.StrOpt("connection", "The URL connection to the sql database, user:password@tcp(ip:port)/db.")
Connection is the configuration option to connect to the sql database.
Functions ¶
func InitMysqlDB ¶
func InitMysqlDB(connURL string, configs ...sqlx.Config) *sqlx.DB
InitMysqlDB initializes the mysql connection.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.