Documentation ¶
Index ¶
- type Conn
- type Option
- type PGXQuerier
- type PGXQuerierConn
- type PGXQuerierPool
- type PGXQuerierPoolConn
- type PGXQuerierTx
- type PGXQuerierWithPrepare
- type Pool
- func (d *Pool[T]) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (*Tx[pgx.Tx], error)
- func (d Pool) Exec(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgconn.CommandTag, error)
- func (d Pool) Handler() T
- func (d Pool) Query(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Rows, error)
- func (d Pool) QueryRow(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Row, error)
- type PoolConn
- func (d *PoolConn[T]) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (*Tx[pgx.Tx], error)
- func (d PoolConn) Exec(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgconn.CommandTag, error)
- func (d PoolConn) Handler() T
- func (d PoolConn) Query(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Rows, error)
- func (d PoolConn) QueryRow(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Row, error)
- type Querier
- type QuerierConn
- type QuerierPool
- type QuerierPoolConn
- type QuerierStmt
- type QuerierTx
- type QuerierWithPrepare
- type Stmt
- func (d *Stmt[T]) Exec(ctx context.Context, params litsql.ArgValues) (pgconn.CommandTag, error)
- func (d *Stmt[T]) Handler() T
- func (d *Stmt[T]) Query(ctx context.Context, params litsql.ArgValues) (pgx.Rows, error)
- func (d *Stmt[T]) QueryRow(ctx context.Context, params litsql.ArgValues) (pgx.Row, error)
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn[T PGXQuerierConn] struct { // contains filtered or unexported fields }
Conn wraps any implementation of PGXQuerierConn.
func NewConn ¶
func NewConn[T PGXQuerierConn](querier T, options ...Option) *Conn[T]
NewConn wraps any implementation of PGXQuerierConn.
type PGXQuerier ¶
type PGXQuerier interface { Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row Exec(ctx context.Context, sql string, args ...any) (commandTag pgconn.CommandTag, err error) }
PGXQuerier is implemented by pgx.Conn, pgx.Tx, pgxpool.Pool, pgxpool.Conn and pgxpool.Tx.
type PGXQuerierConn ¶
type PGXQuerierConn interface { PGXQuerierWithPrepare PGXQuerierPoolConn }
PGXQuerierConn is implemented by pgx.Conn.
type PGXQuerierPool ¶
type PGXQuerierPool interface { PGXQuerier BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) }
PGXQuerierPool is implemented by pgx.Conn, pgxpool.Pool and pgxpool.Conn.
type PGXQuerierPoolConn ¶
type PGXQuerierPoolConn interface { PGXQuerier PGXQuerierPool }
PGXQuerierPoolConn is implemented by pgx.Conn and pgxpool.Conn.
type PGXQuerierTx ¶
type PGXQuerierTx interface { PGXQuerierWithPrepare Begin(ctx context.Context) (pgx.Tx, error) Commit(ctx context.Context) error Rollback(ctx context.Context) error }
PGXQuerierTx is implemented by pgx.Tx and pgxpool.Tx.
type PGXQuerierWithPrepare ¶
type PGXQuerierWithPrepare interface { PGXQuerier Prepare(ctx context.Context, name, sql string) (sd *pgconn.StatementDescription, err error) }
PGXQuerierWithPrepare is implemented by pgx.Conn, pgx.Tx and pgxpool.Tx.
type Pool ¶
type Pool[T PGXQuerierPool] struct { // contains filtered or unexported fields }
Pool wraps any implementation of PGXQuerierPool.
func NewPool ¶
func NewPool[T PGXQuerierPool](querier T, options ...Option) *Pool[T]
NewPool wraps any implementation of PGXQuerierPool.
type PoolConn ¶
type PoolConn[T PGXQuerierPoolConn] struct { // contains filtered or unexported fields }
PoolConn wraps any implementation of PGXQuerierPoolConn.
func NewPoolConn ¶
func NewPoolConn[T PGXQuerierPoolConn](querier T, options ...Option) *PoolConn[T]
NewPoolConn wraps any implementation of PGXQuerierPoolConn.
type Querier ¶
type Querier interface { Query(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Rows, error) QueryRow(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgx.Row, error) Exec(ctx context.Context, query litsql.Query, params litsql.ArgValues) (pgconn.CommandTag, error) }
type QuerierConn ¶
type QuerierConn[T PGXQuerier] interface { QuerierWithPrepare[T] QuerierPoolConn }
type QuerierPool ¶
type QuerierPoolConn ¶
type QuerierStmt ¶
type QuerierWithPrepare ¶
type Stmt ¶
type Stmt[T PGXQuerier] struct { // contains filtered or unexported fields }
Stmt wraps a PGXQuerier with a statement description from a Prepare call.
func NewStmt ¶
func NewStmt[T PGXQuerier](querier T, desc *pgconn.StatementDescription, args []any, options ...Option) *Stmt[T]
NewStmt wraps a PGXQuerier with a statement description from a Prepare call.
type Tx ¶
type Tx[T PGXQuerierTx] struct { // contains filtered or unexported fields }
Tx wraps any implementation of PGXQuerierTx.
func NewTx ¶
func NewTx[T PGXQuerierTx](querier T, options ...Option) *Tx[T]
NewTx wraps any implementation of PGXQuerierTx.