Documentation ¶
Index ¶
- Variables
- type Db
- func (db *Db) Connect() (err error)
- func (db *Db) Exec(sql string, args ...interface{}) (pgconn.CommandTag, error)
- func (db *Db) LoopCheckConnection()
- func (db *Db) Query(sql string, args ...interface{}) (pgx.Rows, error)
- func (db *Db) QueryFunc(sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error)
- func (db *Db) QueryRow(sql string, args ...interface{}) (pgx.Row, error)
- func (db *Db) Reconnect()
- func (db *Db) WaitForConnection()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDatabaseDown = errors.New("database down")
Functions ¶
This section is empty.
Types ¶
type Db ¶
type Db struct { Once *sync.Once Ctx *context.Context ReopenConn chan bool IsWaiting bool Conn *pgxpool.Pool // contains filtered or unexported fields }
func (*Db) LoopCheckConnection ¶
func (db *Db) LoopCheckConnection()
func (*Db) WaitForConnection ¶
func (db *Db) WaitForConnection()
Click to show internal directories.
Click to hide internal directories.