libpgx

package
v0.0.0-...-9dbd826 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PSQL = sq.StatementBuilder.PlaceholderFormat(sq.Dollar)
)

Functions

func NewPoolWrapper

func NewPoolWrapper(ctx context.Context, dsn string, tracerName string) (*pgxpool.Pool, error)

Types

type Connector

type Connector interface {
	Transactable
	Executable
	Queryable
	Close()
}

type Executable

type Executable interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
}

type Queryable

type Queryable interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Transactable

type Transactable interface {
	Begin(ctx context.Context) (pgx.Tx, error)
	BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error)
}

Jump to

Keyboard shortcuts

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