uow

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
	Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
	QueryRow(ctx context.Context, sql string, args ...any) pgx.Row

	SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
}

type UnitOfWork

type UnitOfWork struct {
	// contains filtered or unexported fields
}

func New

func New(pool *pgxpool.Pool) *UnitOfWork

func (*UnitOfWork) Executor

func (u *UnitOfWork) Executor(ctx context.Context) Executor

func (*UnitOfWork) WithTx

func (u *UnitOfWork) WithTx(ctx context.Context, fn func(context.Context) error) error

removed nested transactions support for simplicity

Jump to

Keyboard shortcuts

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