Documentation ¶
Index ¶
- type DBHandler
- func (m *DBHandler) BeginTx(ctx context.Context, opts *sql.TxOptions) (*database.Tx, error)
- func (m *DBHandler) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (m *DBHandler) QueryContext(ctx context.Context, query string, args ...interface{}) (*database.Rows, error)
- func (m *DBHandler) QueryRowContext(ctx context.Context, query string, args ...interface{}) *database.Row
- type RowHandler
- type RowsHandler
- type Transactor
- type TxHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBHandler ¶
type DBHandler struct { QueryContextFunc func(ctx context.Context, query string, args ...interface{}) (*database.Rows, error) QueryRowContextFunc func(ctx context.Context, query string, args ...interface{}) *database.Row ExecContextFunc func(ctx context.Context, query string, args ...interface{}) (sql.Result, error) BeginTxFunc func(ctx context.Context, opts *sql.TxOptions) (*database.Tx, error) }
DBHandler is a mock implementation of the database.DBHandler interface.
func (*DBHandler) ExecContext ¶
func (*DBHandler) QueryContext ¶
type RowHandler ¶
type RowHandler struct { NextFunc func() bool ErrFunc func() error ScanFunc func(dest ...interface{}) error }
RowHandler is a mock implementation of the database.RowHandler interface.
func (*RowHandler) Err ¶
func (m *RowHandler) Err() error
func (*RowHandler) Next ¶
func (m *RowHandler) Next() bool
func (*RowHandler) Scan ¶
func (m *RowHandler) Scan(dest ...interface{}) error
type RowsHandler ¶
type RowsHandler struct { CloseFunc func() error ErrFunc func() error NextFunc func() bool ScanFunc func(dest ...interface{}) error }
RowsHandler is a mock implementation of the database.RowsHandler interface.
func (*RowsHandler) Close ¶
func (m *RowsHandler) Close() error
func (*RowsHandler) Err ¶
func (m *RowsHandler) Err() error
func (*RowsHandler) Next ¶
func (m *RowsHandler) Next() bool
func (*RowsHandler) Scan ¶
func (m *RowsHandler) Scan(dest ...interface{}) error
type Transactor ¶
type Transactor struct {
BeginTxFunc func(ctx context.Context, opts *sql.TxOptions) (*database.Tx, error)
}
Tx is a mock implementation of the database.Tx interface.
Click to show internal directories.
Click to hide internal directories.