Documentation ¶
Index ¶
- Constants
- Variables
- func IsErrorIn(err error, expectedErrorNumbers ...int) bool
- func Retry(ctx context.Context, db DB, retries int, expectedErrorNumbers ...int) func(f func(*sql.Tx) error) error
- func RetryDefault(ctx context.Context, db *sql.DB, retries int) func(f func(*sql.Tx) error) error
- type DB
Constants ¶
View Source
const ( ERROR_DUP_ENTRY = 1062 ERROR_LOCK_WAIT_TIMEOUT = 1205 ERROR_LOCK_DEADLOCK = 1213 ERROR_QUERY_INTERRUPTED = 1317 ERROR_NO_SUCH_TABLE = 1146 )
Variables ¶
View Source
var ErrForceRetry = errors.New("mysqlutils force retry")
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.