stdtxpgxv5

package
v0.0.121 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package stdtxpgxv5 implements the stdtx.Driver for pgx/v5 postgres driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *pgxpool.Pool, opts ...Option) stdtx.Driver[pgx.Tx]

New implements the driver for pgx v5.

Types

type Option

type Option func(o *options)

Option configures the pgxv5 driver.

func AccessMode

func AccessMode(v pgx.TxAccessMode) Option

AccessMode configure the access mode for transactions created for the driver.

func BeginWithSQL

func BeginWithSQL(v TxBeginSQLFunc) Option

BeginWithSQL configure the access mode for transactions created for the driver.

func DiscourageSeqScan

func DiscourageSeqScan(v bool) Option

DiscourageSeqScan configure the access mode for transactions created for the driver.

func IsolationMode

func IsolationMode(v pgx.TxIsoLevel) Option

IsolationMode configure the access mode for transactions created for the driver.

type TxBeginSQLFunc

type TxBeginSQLFunc = func(context.Context, *strings.Builder, pgx.Tx) (*strings.Builder, error)

TxBeginSQLFunc is the signature for determining custom sql run at the start of the transaction.

Jump to

Keyboard shortcuts

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