Versions in this module Expand all Collapse all v0 v0.1.0 Aug 31, 2024 Changes in this version + type Connection struct + func Connect(ctx context.Context, dsn string) (*Connection, error) + func NewConnection(conn *pgx.Conn) *Connection + func (conn *Connection) BeginTx(ctx context.Context, opts *dbal.TxOptions) (dbal.Tx, error) + func (conn *Connection) ExecuteCommand(ctx context.Context, sql string, args ...any) error + func (conn *Connection) ExecuteQuery(ctx context.Context, sql string, args ...any) (dbal.Rows, error) + type Pool struct + func ConnectPool(ctx context.Context, dsn string) (*Pool, error) + func NewPool(pool *pgxpool.Pool) *Pool + func (pool *Pool) BeginTx(ctx context.Context, opts *dbal.TxOptions) (dbal.Tx, error) + func (pool *Pool) Close() error + func (pool *Pool) ExecuteCommand(ctx context.Context, sql string, args ...any) error + func (pool *Pool) ExecuteQuery(ctx context.Context, sql string, args ...any) (dbal.Rows, error) + type Rows struct + func NewRows(rows pgx.Rows) *Rows + func (rows *Rows) Close() error + func (rows *Rows) Next() bool + func (rows *Rows) Scan(dest ...interface{}) error + type Tx struct + func NewTx(tx pgx.Tx) *Tx + func (tx *Tx) Commit(ctx context.Context) error + func (tx *Tx) ExecuteCommand(ctx context.Context, sql string, args ...interface{}) error + func (tx *Tx) ExecuteQuery(ctx context.Context, sql string, args ...interface{}) (dbal.Rows, error) + func (tx *Tx) Rollback(ctx context.Context) error