func (e *ExpectedQuery) WillDelayFor(duration time.Duration) *ExpectedQuery {
	e.delay = duration
	return e
}
WillDelayFor allows to specify duration for which it will delay
result. May be used together with Context
package sqlmock
import (
	"database/sql/driver"
	"fmt"
	"regexp"
	"strings"
	"sync"
	"time"
)
type expectation interface {
	fulfilled() bool
	Lock()
	Unlock()
	String() string
}
type commonExpectation struct {
	sync.Mutex
	triggered bool
	err       error
}
func (e *commonExpectation) fulfilled() bool {
	return e.triggered
}
type ExpectedClose struct {
	commonExpectation
}
func (e *ExpectedClose) WillReturnError(err error) *ExpectedClose {
	e.err = err
	return e
}
func (e *ExpectedClose) String() string {
	msg := "ExpectedClose => expecting database Close"
	if e.err != nil {
		msg += fmt.Sprintf(", which should return error: %s", e.err)
	}
	return msg
}
type ExpectedBegin struct {
	commonExpectation
	delay time.Duration
}
func (e *ExpectedBegin) WillReturnError(err error) *ExpectedBegin {
	e.err = err
	return e
}
func (e *ExpectedBegin) String() string {
	msg := "ExpectedBegin => expecting database transaction Begin"
	if e.err != nil {
		msg += fmt.Sprintf(", which should return error: %s", e.err)
	}
	return msg
}
func (e *ExpectedBegin) WillDelayFor(duration time.Duration) *ExpectedBegin {
	e.delay = duration
	return e
}
type ExpectedCommit struct {
	commonExpectation
}
func (e *ExpectedCommit) WillReturnError(err error) *ExpectedCommit {
	e.err = err
	return e
}
func (e *ExpectedCommit) String() string {
	msg := "ExpectedCommit => expecting transaction Commit"
	if e.err != nil {
		msg += fmt.Sprintf(", which should return error: %s", e.err)
	}
	return msg
}
type ExpectedRollback struct {
	commonExpectation
}
func (e *ExpectedRollback) WillReturnError(err error) *ExpectedRollback {
	e.err = err
	return e
}
func (e *ExpectedRollback) String() string {
	msg := "ExpectedRollback => expecting transaction Rollback"
	if e.err != nil {
		msg += fmt.Sprintf(", which should return error: %s", e.err)
	}
	return msg
}
type ExpectedQuery struct {
	queryBasedExpectation
	rows  driver.Rows
	delay time.Duration
}
func (e *ExpectedQuery) WithArgs(args ...driver.Value) *ExpectedQuery {
	e.args = args
	return e
}
func (e *ExpectedQuery) WillReturnError(err error) *ExpectedQuery {
	e.err = err
	return e
}