repository

package
v0.0.0-...-1f5b4f5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 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 DBTX

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

func NewDBTX

func NewDBTX(db Querier) *DBTX

func (*DBTX) DB

func (d *DBTX) DB() Querier

func (*DBTX) InTransaction

func (d *DBTX) InTransaction(ctx context.Context, fn TransactionFunc) error

type PaginationParams

type PaginationParams struct {
	Limit  uint64
	Offset uint64
}

type Querier

type Querier interface {
	Begin(ctx context.Context) (pgx.Tx, error)
	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
}

type QuerierTX

type QuerierTX interface {
	Querier
	Commit(ctx context.Context) error
	Rollback(ctx context.Context) error
}

type TransactionFunc

type TransactionFunc func(ctx context.Context, qe Querier) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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