Documentation
¶
Index ¶
- type Pool
- func (p *Pool) Begin(ctx context.Context) (*sql.Tx, error)
- func (p *Pool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- func (p *Pool) Close() error
- func (p *Pool) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (p *Pool) GetDB() *sql.DB
- func (p *Pool) Health(ctx context.Context) error
- func (p *Pool) Ping(ctx context.Context) error
- func (p *Pool) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (p *Pool) QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (p *Pool) Stats() sql.DBStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages database connections
func NewPool ¶
func NewPool(cfg *config.DatabaseConfig) (*Pool, error)
NewPool creates a new database connection pool
Click to show internal directories.
Click to hide internal directories.