Documentation ¶
Overview ¶
Package dbutil provides db utilities, complementing the more common ones in the original package.
Index ¶
- type RedisPool
- type SQLDB
- func (d *SQLDB) Begin(ctx context.Context) (*SQLTx, error)
- func (d *SQLDB) Close() error
- func (d *SQLDB) Exec(ctx context.Context, query string, args ...interface{}) (Result, error)
- func (d *SQLDB) Ping(ctx context.Context) error
- func (d *SQLDB) Prepare(ctx context.Context, query string) (*SQLStmt, error)
- func (d *SQLDB) Query(ctx context.Context, query string, args ...interface{}) (*Rows, error)
- func (d *SQLDB) QueryRow(ctx context.Context, query string, args ...interface{}) (*Row, error)
- type SQLStmt
- type SQLTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisPool ¶
type RedisPool struct {
// contains filtered or unexported fields
}
RedisPool is a contexted redis pool.
func NewRedisPool ¶
type SQLDB ¶
type SQLDB struct {
// contains filtered or unexported fields
}
SQLDB is a contexted sql DB.
Click to show internal directories.
Click to hide internal directories.