Documentation ¶
Index ¶
- func NewRedisPool(redisURL string) *redis.Pool
- type DBLogger
- func (db *DBLogger) Beginx() (*TxLogger, error)
- func (db *DBLogger) Exec(query string, args ...interface{}) (sql.Result, error)
- func (db *DBLogger) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (db *DBLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (db *DBLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- type TxLogger
- func (q *TxLogger) Exec(query string, args ...interface{}) (sql.Result, error)
- func (q *TxLogger) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (q *TxLogger) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (q *TxLogger) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisPool ¶
NewRedisPool returns a new Redis connection pool.
Types ¶
type DBLogger ¶
DBLogger is a DB wrapper which logs the executed sql queries and their duration.
func OpenDatabase ¶
OpenDatabase opens the database and performs a ping to make sure the database is up.
type TxLogger ¶
TxLogger logs the executed sql queries and their duration.
Click to show internal directories.
Click to hide internal directories.