Documentation ¶
Index ¶
- func Execute[Stmt StmtHolder, D Doer[Stmt]](ctx context.Context, mod Module[Stmt], doer D, ...) (D, error)
- func ExecuteOnce[D txn.Doer[Options, Beginner]](ctx context.Context, beginner Beginner, do D, ...) error
- func ExecuteRo[Stmt StmtHolder, D Doer[Stmt]](ctx context.Context, mod Module[Stmt], do D, ...) (D, error)
- func ExecuteRw[Stmt StmtHolder, D Doer[Stmt]](ctx context.Context, mod Module[Stmt], do D, ...) (D, error)
- func Ping(beginner Beginner, limit int, count txn.PingCount) (int, error)
- type Beginner
- type Doer
- type DoerBase
- type Module
- type ModuleBase
- type Options
- type RawTx
- type RawTxn
- type StmtHolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteOnce ¶ added in v0.0.8
func ExecuteOnce[ D txn.Doer[Options, Beginner], ](ctx context.Context, beginner Beginner, do D, fn txn.DoFunc[Options, Beginner, D]) error
ExecuteOnce executes a pgx transaction.
Types ¶
type Doer ¶ added in v0.0.8
type Doer[Stmt any] interface { txn.Doer[Options, Beginner] ReadOnlySetters(title string) []txn.DoerFieldSetter ReadWriteSetters(title string) []txn.DoerFieldSetter Stmt() Stmt SetStmt(Stmt) }
Doer defines the interface for PGX transaction operations.
type DoerBase ¶ added in v0.0.8
type DoerBase[Stmt any] struct { txn.DoerBase[Options, Beginner] // contains filtered or unexported fields }
DoerBase provides a base implementation for the Doer interface.
func (*DoerBase[_]) ReadOnlySetters ¶ added in v0.0.8
func (do *DoerBase[_]) ReadOnlySetters(title string) []txn.DoerFieldSetter
func (*DoerBase[_]) ReadWriteSetters ¶ added in v0.0.8
func (do *DoerBase[_]) ReadWriteSetters(title string) []txn.DoerFieldSetter
type Module ¶ added in v0.0.8
type Module[Stmt StmtHolder] interface { Beginner() Beginner }
type ModuleBase ¶ added in v0.0.8
type ModuleBase[Stmt StmtHolder] struct { // contains filtered or unexported fields }
func (*ModuleBase[_]) Beginner ¶ added in v0.0.8
func (b *ModuleBase[_]) Beginner() Beginner
func (*ModuleBase[_]) Init ¶ added in v0.0.8
func (b *ModuleBase[_]) Init(beginner Beginner)
type StmtHolder ¶ added in v0.0.8
type StmtHolder = any
Click to show internal directories.
Click to hide internal directories.