txpostgres

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package txpostgres provides convenience wiring around the Postgres transaction adapter.

The package aliases transaction helpers for applications that want short import paths during bootstrap. Missing pool wiring fails closed through the underlying adapter rather than panicking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsPgError

func AsPgError(err error) (*pgconn.PgError, bool)

AsPgError converts an error to a pgconn.PgError when possible.

func IsNoRows

func IsNoRows(err error) bool

IsNoRows reports whether the error is pgx.ErrNoRows.

func New

New constructs a transaction manager over a pgx pool.

Types

type DBer

type DBer = txpostgres.DBer

DBer aliases the transaction-aware query interface.

func FromCtx

func FromCtx(ctx context.Context, pool ports.DatabasePool) DBer

FromCtx retrieves the active connection/tx from context.

type Manager

type Manager = txpostgres.Manager

Manager aliases the transaction manager type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL