Documentation ¶
Index ¶
- type Formatter
- type OrmResult
- type SQLMock
- func (sqlMock *SQLMock) ExpectExec(query string) *SQLMock
- func (sqlMock *SQLMock) ExpectInsert(models ...interface{}) *SQLMock
- func (sqlMock *SQLMock) ExpectQuery(query string) *SQLMock
- func (sqlMock *SQLMock) ExpectQueryOne(query string) *SQLMock
- func (sqlMock *SQLMock) FlushAll()
- func (sqlMock *SQLMock) Returns(result *OrmResult, err error)
- func (sqlMock *SQLMock) WithArgs(params ...interface{}) *SQLMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrmResult ¶
type OrmResult struct {
// contains filtered or unexported fields
}
OrmResult struct to implements orm.Result
func (*OrmResult) RowsAffected ¶
RowsAffected returns the number of rows affected in the data table
func (*OrmResult) RowsReturned ¶
RowsReturned returns the number of rows
type SQLMock ¶
type SQLMock struct {
// contains filtered or unexported fields
}
SQLMock handles query mocks
func NewGoPGDBTest ¶
NewGoPGDBTest returns method that already implements orm.DB and mock instance to mocking arguments and results.
func (*SQLMock) ExpectExec ¶
ExpectExec is a builder method that accepts a query in string and returns an SQLMock pointer
func (*SQLMock) ExpectInsert ¶
ExpectInsert is a builder method that accepts a model as interface and returns an SQLMock pointer
func (*SQLMock) ExpectQuery ¶
ExpectQuery accepts a query in string and returns an SQLMock pointer
func (*SQLMock) ExpectQueryOne ¶
ExpectQueryOne accepts a query in string and returns an SQLMock pointer
Click to show internal directories.
Click to hide internal directories.