postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 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 Caller

type Caller 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
	CopyFrom(
		ctx context.Context,
		tableName pgx.Identifier,
		columnNames []string,
		rowSrc pgx.CopyFromSource,
	) (int64, error)
}

type TxHandler

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

func NewTxHandler

func NewTxHandler(pool *pgxpool.Pool) *TxHandler

func (*TxHandler) Begin

func (t *TxHandler) Begin(ctx context.Context) (context.Context, error)

func (*TxHandler) Commit

func (t *TxHandler) Commit(ctx context.Context) error

func (*TxHandler) Pool

func (t *TxHandler) Pool() Caller

func (*TxHandler) Rollback

func (t *TxHandler) Rollback(ctx context.Context) error

func (*TxHandler) Try

func (t *TxHandler) Try(ctx context.Context) Caller

Jump to

Keyboard shortcuts

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