Documentation ¶
Index ¶
- func ModelToRows(dst interface{}) *sqlmock.Rows
- type DbMock
- func (m *DbMock) Create(model interface{}) *DbMock
- func (m *DbMock) DB() *gorm.DB
- func (m *DbMock) Delete(model schema.Tabler) *DbMock
- func (m *DbMock) ExpectBegin() *DbMock
- func (m *DbMock) ExpectCommit() *DbMock
- func (m *DbMock) ExpectRollback() *DbMock
- func (m *DbMock) Find(model schema.Tabler) *DbMock
- func (m *DbMock) Mock() sqlmock.Sqlmock
- func (m *DbMock) Return(returns interface{})
- func (m *DbMock) ReturnErr(err error)
- func (m *DbMock) ReturnResult(lastInsertID int64, rowsAffected int64)
- func (m *DbMock) Sql(sql string) *DbMock
- func (m *DbMock) Update(model schema.Tabler) *DbMock
- func (m *DbMock) WithArgs(args ...driver.Value) *DbMock
- func (m *DbMock) WithArgsChecker(checker func(args []driver.Value) error) *DbMock
- func (m *DbMock) WithOpt(checker sqlmock.Matcher) *DbMock
- func (m *DbMock) WithPrepare() *DbMock
- type TestingTB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModelToRows ¶
Types ¶
type DbMock ¶
type DbMock struct {
// contains filtered or unexported fields
}
func (*DbMock) ExpectBegin ¶
func (*DbMock) ExpectCommit ¶
func (*DbMock) ExpectRollback ¶
func (*DbMock) ReturnResult ¶
func (*DbMock) WithArgsChecker ¶
func (*DbMock) WithPrepare ¶
Click to show internal directories.
Click to hide internal directories.