Versions in this module Expand all Collapse all v0 v0.37.0 May 27, 2026 Changes in this version + type Connection struct + Config *config.DatabaseConfig + DB *sql.DB + Logger logger.Logger + MetricsCleanup func() + Name string + func (c *Connection) Begin(ctx context.Context) (types.Tx, error) + func (c *Connection) BeginTx(ctx context.Context, opts *sql.TxOptions) (types.Tx, error) + func (c *Connection) Close() error + func (c *Connection) Exec(ctx context.Context, query string, args ...any) (sql.Result, error) + func (c *Connection) Health(ctx context.Context) error + func (c *Connection) Prepare(ctx context.Context, query string) (types.Statement, error) + func (c *Connection) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error) + func (c *Connection) QueryRow(ctx context.Context, query string, args ...any) types.Row + func (c *Connection) Stats() (map[string]any, error) + type Statement struct + func NewStatement(stmt *sql.Stmt) *Statement + func (s *Statement) Close() error + func (s *Statement) Exec(ctx context.Context, args ...any) (sql.Result, error) + func (s *Statement) Query(ctx context.Context, args ...any) (*sql.Rows, error) + func (s *Statement) QueryRow(ctx context.Context, args ...any) types.Row + type Transaction struct + func NewTransaction(tx *sql.Tx) *Transaction + func (t *Transaction) Commit(_ context.Context) error + func (t *Transaction) Exec(ctx context.Context, query string, args ...any) (sql.Result, error) + func (t *Transaction) Prepare(ctx context.Context, query string) (types.Statement, error) + func (t *Transaction) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error) + func (t *Transaction) QueryRow(ctx context.Context, query string, args ...any) types.Row + func (t *Transaction) Rollback(_ context.Context) error