savepointutil

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MPL-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeginOnlyOnce

type BeginOnlyOnce struct {
	// contains filtered or unexported fields
}

BeginOnlyOnce is a small utility struct to help with safety. It's not strictly necessary, but designed to help us out problems when implementing savepoints in non-Pgx drivers (e.g. `database/sql` for Postgres or SQLite) where `Begin` might be called multiple times on the same subtransaction, which would silently produce the wrong result.

func NewBeginOnlyOnce

func NewBeginOnlyOnce(parent *BeginOnlyOnce) *BeginOnlyOnce

func (*BeginOnlyOnce) Begin

func (t *BeginOnlyOnce) Begin() error

func (*BeginOnlyOnce) Done

func (t *BeginOnlyOnce) Done()

func (*BeginOnlyOnce) IsDone

func (t *BeginOnlyOnce) IsDone() bool

Jump to

Keyboard shortcuts

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