Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotImplemented = errors.New("not implemented") ErrMockClosed = errors.New("mock connection closed") )
Functions ¶
This section is empty.
Types ¶
type MockConnection ¶
type MockConnection struct { ExecReq chan *QueryRequest ExecResp chan *SQLResultErrorPair GetReq chan *QueryRequest GetResp chan error SelectReq chan *QueryRequest SelectResp chan error }
func (*MockConnection) Exec ¶
func (m *MockConnection) Exec(query string, args ...interface{}) (sql.Result, error)
func (*MockConnection) Get ¶
func (m *MockConnection) Get(dest interface{}, query string, args ...interface{}) error
func (*MockConnection) Select ¶
func (m *MockConnection) Select(dest interface{}, query string, args ...interface{}) error
type QueryRequest ¶
type QueryRequest struct { Dest interface{} Query string Args []interface{} }
type SQLResultErrorPair ¶
Click to show internal directories.
Click to hide internal directories.