pgxadapter

package module
v0.0.0-...-54e4a58 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 6 Imported by: 0

README

pgxadapter

pgxpool wrapper to match sqlc dbtx interface

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn

func New

func New(ctx context.Context, dsn string, opts ...Option) (Conn, error)

New

type Option

type Option func(*pgxpool.Config)

Option pgxpool config option

func WithMaxConns

func WithMaxConns(conns int32) Option

WithMaxConns

func WithTraceLogger

func WithTraceLogger(tracer pgx.QueryTracer) Option

WithTraceLogger

type Pool

type Pool interface {
	Acquire(context.Context) (Conn, error)
	Begin(context.Context) (Tx, error)

	Ping(context.Context) error

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

	Close(context.Context) error
}

Pool

type Result

type Result pgx.BatchResults

Result

type Row

type Row pgx.Row

Row

type Rows

type Rows pgx.Rows

Rows

type Tx

type Tx pgx.Tx

Tx

Jump to

Keyboard shortcuts

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