Versions in this module Expand all Collapse all v2 v2.2.3 Nov 5, 2021 v2.2.2 Nov 5, 2021 Changes in this version + func Execute(fn func() error) (err error) + func ExecuteInTx(ctx context.Context, tx Tx, fn func() error) (err error) + func ExecuteTx(ctx context.Context, db *sql.DB, opts *sql.TxOptions, fn func(*sql.Tx) error) error + func ExecuteTxGenericTest(ctx context.Context, framework WriteSkewTest) error + type AmbiguousCommitError struct + func (e *AmbiguousCommitError) Cause() error + func (e *AmbiguousCommitError) Error() string + func (e *AmbiguousCommitError) Unwrap() error + type MaxRetriesExceededError struct + func (e *MaxRetriesExceededError) Cause() error + func (e *MaxRetriesExceededError) Error() string + func (e *MaxRetriesExceededError) Unwrap() error + type Tx interface + Commit func(context.Context) error + Exec func(context.Context, string, ...interface{}) error + Rollback func(context.Context) error + type TxnRestartError struct + func (e *TxnRestartError) Cause() error + func (e *TxnRestartError) Error() string + func (e *TxnRestartError) RetryCause() error + func (e *TxnRestartError) Unwrap() error + type WriteSkewTest interface + ExecuteTx func(ctx context.Context, fn func(tx interface{}) error) error + GetBalances func(ctx context.Context, tx interface{}) (bal1, bal2 int, err error) + Init func(context.Context) error + UpdateBalance func(ctx context.Context, tx interface{}, acct, delta int) error