Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxHelper ¶
type TxHelper[E error] struct { // contains filtered or unexported fields }
TxHelper is a helper for transaction management
func NewTxHelper ¶
NewTxHelper creates a new TxHelper, the errorPointer is used to detect if any error was set
func (*TxHelper[E]) Begin ¶
func (l *TxHelper[E]) Begin() dal.Transaction
Begin starts a transaction
func (*TxHelper[E]) End ¶
func (l *TxHelper[E]) End()
End ends a transaction and commits it if no error was set or it will try to rollback and release locked tables
func (*TxHelper[E]) LockTablesTimeout ¶
func (l *TxHelper[E]) LockTablesTimeout(timeout time.Duration, lockTables dal.LockTables) errors.Error
LockTablesTimeout locks tables with timeout
Click to show internal directories.
Click to hide internal directories.