Documentation
¶
Index ¶
- Variables
- func NewSqlxRowWithError(err error) *sqlx.Row
- type MasterConnection
- type Pool
- func (p Pool) Close() error
- func (p Pool) Exec(query string, args ...interface{}) (sql.Result, error)
- func (p Pool) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (p Pool) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (p Pool) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (p Pool) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (p Pool) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func (p Pool) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- func (p Pool) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- type Queryer
- type QueryerCloser
- type QueryerExecer
- type QueryerExecerCloser
- type QueryerExecerMock
- func (m QueryerExecerMock) Exec(query string, args ...interface{}) (sql.Result, error)
- func (m QueryerExecerMock) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (m QueryerExecerMock) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (m QueryerExecerMock) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- type SlaveConnection
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoFound = errors.New("not found")
Functions ¶
func NewSqlxRowWithError ¶
NewSqlxRowWithError uses for testing.
Types ¶
type MasterConnection ¶
type MasterConnection struct {
QueryerExecerCloser
}
type QueryerCloser ¶
type QueryerExecer ¶
type QueryerExecer interface { sqlx.Queryer sqlx.QueryerContext sqlx.Execer sqlx.ExecerContext }
type QueryerExecerCloser ¶
type QueryerExecerCloser interface { QueryerExecer io.Closer }
type QueryerExecerMock ¶
QueryerExecerMock is an mock type for the type QueryerExecer
func NewQueryerExecerMock ¶
func NewQueryerExecerMock() *QueryerExecerMock
NewQueryerExecerMock is a constructor.
func (QueryerExecerMock) Exec ¶
func (m QueryerExecerMock) Exec(query string, args ...interface{}) (sql.Result, error)
func (QueryerExecerMock) Query ¶
func (m QueryerExecerMock) Query(query string, args ...interface{}) (*sql.Rows, error)
type SlaveConnection ¶
type SlaveConnection struct {
QueryerCloser
}
Click to show internal directories.
Click to hide internal directories.