transaction

package
v0.0.0-...-832932f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

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

Transaction represents an sql transaction

func Build

func Build(tx *sql.Tx, id int64, rollbackFlag bool) *Transaction

Build Creates a new transaction object

func (*Transaction) Commit

func (tx *Transaction) Commit() error

func (*Transaction) MarkedForRollback

func (tx *Transaction) MarkedForRollback() bool

MarkedForRollback returns true if a transaction is flagged for rollback and false otherwise.

func (*Transaction) Rollback

func (tx *Transaction) Rollback() error

rollback ends the transaction by rolling back

func (*Transaction) SetRollbackFlag

func (tx *Transaction) SetRollbackFlag(flag bool)

func (*Transaction) Tx

func (tx *Transaction) Tx() *sql.Tx

func (*Transaction) TxID

func (tx *Transaction) TxID() int64

Jump to

Keyboard shortcuts

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