Documentation
¶
Overview ¶
Package db provides some assistant functions about the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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.
func LogInterceptor ¶
func LogInterceptor(logargs bool) sqlx.Config
LogInterceptor returns a Config to set the log interceptor for sqlx.DB.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.