Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a pool of zero or more underlying connections to the neuron database.
func (*DB) Execute ¶
Execute and executes a function. Any error that is returned from the function is returned from the Execute() method.
func (*DB) ExecuteTransactionWithRetry ¶
func (db *DB) ExecuteTransactionWithRetry( ctx context.Context, maxRetries uint, delay, maxJitter time.Duration, errorMsg string, fn func(tx *sqlx.Tx) error) (err error)
ExecuteTransactionWithRetry wrapper for executing queries in a transaction and retries the transaction if transaction deadlock or transaction timeout.
Click to show internal directories.
Click to hide internal directories.