Documentation ¶
Overview ¶
Package mock_sqlx is a generated GoMock package.
Index ¶
- Variables
- func ExpectError(t *testing.T, err error, se status.Error)
- type MockDBExecutor
- func (m *MockDBExecutor) Context() context.Context
- func (m *MockDBExecutor) D() *sqlx.Database
- func (m *MockDBExecutor) Dialect() builder.Dialect
- func (m *MockDBExecutor) EXPECT() *MockDBExecutorMockRecorder
- func (m *MockDBExecutor) Exec(arg0 builder.SqlExpr) (sql.Result, error)
- func (m *MockDBExecutor) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (m *MockDBExecutor) Query(arg0 builder.SqlExpr) (*sql.Rows, error)
- func (m *MockDBExecutor) QueryAndScan(arg0 builder.SqlExpr, arg1 interface{}) error
- func (m *MockDBExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (m *MockDBExecutor) T(model builder.Model) *builder.Table
- func (m *MockDBExecutor) WithContext(ctx context.Context) sqlx.DBExecutor
- func (m *MockDBExecutor) WithSchema(arg0 string) sqlx.DBExecutor
- type MockDBExecutorMockRecorder
- func (mr *MockDBExecutorMockRecorder) Context() *gomock.Call
- func (mr *MockDBExecutorMockRecorder) D() *gomock.Call
- func (mr *MockDBExecutorMockRecorder) Dialect() *gomock.Call
- func (mr *MockDBExecutorMockRecorder) Exec(arg0 interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) Query(arg0 interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) QueryAndScan(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) T(model interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) WithContext(ctx interface{}) *gomock.Call
- func (mr *MockDBExecutorMockRecorder) WithSchema(arg0 interface{}) *gomock.Call
- type MockExprExecutor
- func (m *MockExprExecutor) EXPECT() *MockExprExecutorMockRecorder
- func (m *MockExprExecutor) Exec(arg0 builder.SqlExpr) (sql.Result, error)
- func (m *MockExprExecutor) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (m *MockExprExecutor) Query(arg0 builder.SqlExpr) (*sql.Rows, error)
- func (m *MockExprExecutor) QueryAndScan(arg0 builder.SqlExpr, arg1 interface{}) error
- func (m *MockExprExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- type MockExprExecutorMockRecorder
- func (mr *MockExprExecutorMockRecorder) Exec(arg0 interface{}) *gomock.Call
- func (mr *MockExprExecutorMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- func (mr *MockExprExecutorMockRecorder) Query(arg0 interface{}) *gomock.Call
- func (mr *MockExprExecutorMockRecorder) QueryAndScan(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockExprExecutorMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
- type MockMigrator
- type MockMigratorMockRecorder
- type MockSqlExecutor
- type MockSqlExecutorMockRecorder
- type MockTableResolver
- type MockTableResolverMockRecorder
- type MockTxExecutor
- func (m *MockTxExecutor) Begin() (sqlx.DBExecutor, error)
- func (m *MockTxExecutor) BeginTx(arg0 *sql.TxOptions) (sqlx.DBExecutor, error)
- func (m *MockTxExecutor) Commit() error
- func (m *MockTxExecutor) EXPECT() *MockTxExecutorMockRecorder
- func (m *MockTxExecutor) IsTx() bool
- func (m *MockTxExecutor) Rollback() error
- type MockTxExecutorMockRecorder
- func (mr *MockTxExecutorMockRecorder) Begin() *gomock.Call
- func (mr *MockTxExecutorMockRecorder) BeginTx(arg0 interface{}) *gomock.Call
- func (mr *MockTxExecutorMockRecorder) Commit() *gomock.Call
- func (mr *MockTxExecutorMockRecorder) IsTx() *gomock.Call
- func (mr *MockTxExecutorMockRecorder) Rollback() *gomock.Call
- type MockWithDBName
- type MockWithDBNameMockRecorder
Constants ¶
This section is empty.
Variables ¶
var ( ErrConflict = sqlx.NewSqlError(sqlx.SqlErrTypeConflict, "") ErrNotFound = sqlx.NewSqlError(sqlx.SqlErrTypeNotFound, "") ErrDatabase = errors.New("database error") )
Functions ¶
Types ¶
type MockDBExecutor ¶
type MockDBExecutor struct {
// contains filtered or unexported fields
}
MockDBExecutor is a mock of DBExecutor interface.
func NewMockDBExecutor ¶
func NewMockDBExecutor(ctrl *gomock.Controller) *MockDBExecutor
NewMockDBExecutor creates a new mock instance.
func (*MockDBExecutor) Context ¶
func (m *MockDBExecutor) Context() context.Context
Context mocks base method.
func (*MockDBExecutor) Dialect ¶
func (m *MockDBExecutor) Dialect() builder.Dialect
Dialect mocks base method.
func (*MockDBExecutor) EXPECT ¶
func (m *MockDBExecutor) EXPECT() *MockDBExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDBExecutor) ExecContext ¶
func (m *MockDBExecutor) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext mocks base method.
func (*MockDBExecutor) QueryAndScan ¶
func (m *MockDBExecutor) QueryAndScan(arg0 builder.SqlExpr, arg1 interface{}) error
QueryAndScan mocks base method.
func (*MockDBExecutor) QueryContext ¶
func (m *MockDBExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext mocks base method.
func (*MockDBExecutor) T ¶
func (m *MockDBExecutor) T(model builder.Model) *builder.Table
T mocks base method.
func (*MockDBExecutor) WithContext ¶
func (m *MockDBExecutor) WithContext(ctx context.Context) sqlx.DBExecutor
WithContext mocks base method.
func (*MockDBExecutor) WithSchema ¶
func (m *MockDBExecutor) WithSchema(arg0 string) sqlx.DBExecutor
WithSchema mocks base method.
type MockDBExecutorMockRecorder ¶
type MockDBExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockDBExecutorMockRecorder is the mock recorder for MockDBExecutor.
func (*MockDBExecutorMockRecorder) Context ¶
func (mr *MockDBExecutorMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockDBExecutorMockRecorder) D ¶
func (mr *MockDBExecutorMockRecorder) D() *gomock.Call
D indicates an expected call of D.
func (*MockDBExecutorMockRecorder) Dialect ¶
func (mr *MockDBExecutorMockRecorder) Dialect() *gomock.Call
Dialect indicates an expected call of Dialect.
func (*MockDBExecutorMockRecorder) Exec ¶
func (mr *MockDBExecutorMockRecorder) Exec(arg0 interface{}) *gomock.Call
Exec indicates an expected call of Exec.
func (*MockDBExecutorMockRecorder) ExecContext ¶
func (mr *MockDBExecutorMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
ExecContext indicates an expected call of ExecContext.
func (*MockDBExecutorMockRecorder) Query ¶
func (mr *MockDBExecutorMockRecorder) Query(arg0 interface{}) *gomock.Call
Query indicates an expected call of Query.
func (*MockDBExecutorMockRecorder) QueryAndScan ¶
func (mr *MockDBExecutorMockRecorder) QueryAndScan(arg0, arg1 interface{}) *gomock.Call
QueryAndScan indicates an expected call of QueryAndScan.
func (*MockDBExecutorMockRecorder) QueryContext ¶
func (mr *MockDBExecutorMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
QueryContext indicates an expected call of QueryContext.
func (*MockDBExecutorMockRecorder) T ¶
func (mr *MockDBExecutorMockRecorder) T(model interface{}) *gomock.Call
T indicates an expected call of T.
func (*MockDBExecutorMockRecorder) WithContext ¶
func (mr *MockDBExecutorMockRecorder) WithContext(ctx interface{}) *gomock.Call
WithContext indicates an expected call of WithContext.
func (*MockDBExecutorMockRecorder) WithSchema ¶
func (mr *MockDBExecutorMockRecorder) WithSchema(arg0 interface{}) *gomock.Call
WithSchema indicates an expected call of WithSchema.
type MockExprExecutor ¶
type MockExprExecutor struct {
// contains filtered or unexported fields
}
MockExprExecutor is a mock of ExprExecutor interface.
func NewMockExprExecutor ¶
func NewMockExprExecutor(ctrl *gomock.Controller) *MockExprExecutor
NewMockExprExecutor creates a new mock instance.
func (*MockExprExecutor) EXPECT ¶
func (m *MockExprExecutor) EXPECT() *MockExprExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockExprExecutor) ExecContext ¶
func (m *MockExprExecutor) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext mocks base method.
func (*MockExprExecutor) QueryAndScan ¶
func (m *MockExprExecutor) QueryAndScan(arg0 builder.SqlExpr, arg1 interface{}) error
QueryAndScan mocks base method.
func (*MockExprExecutor) QueryContext ¶
func (m *MockExprExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext mocks base method.
type MockExprExecutorMockRecorder ¶
type MockExprExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockExprExecutorMockRecorder is the mock recorder for MockExprExecutor.
func (*MockExprExecutorMockRecorder) Exec ¶
func (mr *MockExprExecutorMockRecorder) Exec(arg0 interface{}) *gomock.Call
Exec indicates an expected call of Exec.
func (*MockExprExecutorMockRecorder) ExecContext ¶
func (mr *MockExprExecutorMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
ExecContext indicates an expected call of ExecContext.
func (*MockExprExecutorMockRecorder) Query ¶
func (mr *MockExprExecutorMockRecorder) Query(arg0 interface{}) *gomock.Call
Query indicates an expected call of Query.
func (*MockExprExecutorMockRecorder) QueryAndScan ¶
func (mr *MockExprExecutorMockRecorder) QueryAndScan(arg0, arg1 interface{}) *gomock.Call
QueryAndScan indicates an expected call of QueryAndScan.
func (*MockExprExecutorMockRecorder) QueryContext ¶
func (mr *MockExprExecutorMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
QueryContext indicates an expected call of QueryContext.
type MockMigrator ¶
type MockMigrator struct {
// contains filtered or unexported fields
}
MockMigrator is a mock of Migrator interface.
func NewMockMigrator ¶
func NewMockMigrator(ctrl *gomock.Controller) *MockMigrator
NewMockMigrator creates a new mock instance.
func (*MockMigrator) EXPECT ¶
func (m *MockMigrator) EXPECT() *MockMigratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMigrator) Migrate ¶
func (m *MockMigrator) Migrate(ctx context.Context, db sqlx.DBExecutor) error
Migrate mocks base method.
type MockMigratorMockRecorder ¶
type MockMigratorMockRecorder struct {
// contains filtered or unexported fields
}
MockMigratorMockRecorder is the mock recorder for MockMigrator.
func (*MockMigratorMockRecorder) Migrate ¶
func (mr *MockMigratorMockRecorder) Migrate(ctx, db interface{}) *gomock.Call
Migrate indicates an expected call of Migrate.
type MockSqlExecutor ¶
type MockSqlExecutor struct {
// contains filtered or unexported fields
}
MockSqlExecutor is a mock of SqlExecutor interface.
func NewMockSqlExecutor ¶
func NewMockSqlExecutor(ctrl *gomock.Controller) *MockSqlExecutor
NewMockSqlExecutor creates a new mock instance.
func (*MockSqlExecutor) EXPECT ¶
func (m *MockSqlExecutor) EXPECT() *MockSqlExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSqlExecutor) ExecContext ¶
func (m *MockSqlExecutor) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
ExecContext mocks base method.
func (*MockSqlExecutor) QueryContext ¶
func (m *MockSqlExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryContext mocks base method.
type MockSqlExecutorMockRecorder ¶
type MockSqlExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockSqlExecutorMockRecorder is the mock recorder for MockSqlExecutor.
func (*MockSqlExecutorMockRecorder) ExecContext ¶
func (mr *MockSqlExecutorMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call
ExecContext indicates an expected call of ExecContext.
func (*MockSqlExecutorMockRecorder) QueryContext ¶
func (mr *MockSqlExecutorMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call
QueryContext indicates an expected call of QueryContext.
type MockTableResolver ¶
type MockTableResolver struct {
// contains filtered or unexported fields
}
MockTableResolver is a mock of TableResolver interface.
func NewMockTableResolver ¶
func NewMockTableResolver(ctrl *gomock.Controller) *MockTableResolver
NewMockTableResolver creates a new mock instance.
func (*MockTableResolver) EXPECT ¶
func (m *MockTableResolver) EXPECT() *MockTableResolverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTableResolverMockRecorder ¶
type MockTableResolverMockRecorder struct {
// contains filtered or unexported fields
}
MockTableResolverMockRecorder is the mock recorder for MockTableResolver.
func (*MockTableResolverMockRecorder) T ¶
func (mr *MockTableResolverMockRecorder) T(model interface{}) *gomock.Call
T indicates an expected call of T.
type MockTxExecutor ¶
type MockTxExecutor struct {
// contains filtered or unexported fields
}
MockTxExecutor is a mock of TxExecutor interface.
func NewMockTxExecutor ¶
func NewMockTxExecutor(ctrl *gomock.Controller) *MockTxExecutor
NewMockTxExecutor creates a new mock instance.
func (*MockTxExecutor) Begin ¶
func (m *MockTxExecutor) Begin() (sqlx.DBExecutor, error)
Begin mocks base method.
func (*MockTxExecutor) BeginTx ¶
func (m *MockTxExecutor) BeginTx(arg0 *sql.TxOptions) (sqlx.DBExecutor, error)
BeginTx mocks base method.
func (*MockTxExecutor) EXPECT ¶
func (m *MockTxExecutor) EXPECT() *MockTxExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTxExecutor) Rollback ¶
func (m *MockTxExecutor) Rollback() error
Rollback mocks base method.
type MockTxExecutorMockRecorder ¶
type MockTxExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockTxExecutorMockRecorder is the mock recorder for MockTxExecutor.
func (*MockTxExecutorMockRecorder) Begin ¶
func (mr *MockTxExecutorMockRecorder) Begin() *gomock.Call
Begin indicates an expected call of Begin.
func (*MockTxExecutorMockRecorder) BeginTx ¶
func (mr *MockTxExecutorMockRecorder) BeginTx(arg0 interface{}) *gomock.Call
BeginTx indicates an expected call of BeginTx.
func (*MockTxExecutorMockRecorder) Commit ¶
func (mr *MockTxExecutorMockRecorder) Commit() *gomock.Call
Commit indicates an expected call of Commit.
func (*MockTxExecutorMockRecorder) IsTx ¶
func (mr *MockTxExecutorMockRecorder) IsTx() *gomock.Call
IsTx indicates an expected call of IsTx.
func (*MockTxExecutorMockRecorder) Rollback ¶
func (mr *MockTxExecutorMockRecorder) Rollback() *gomock.Call
Rollback indicates an expected call of Rollback.
type MockWithDBName ¶
type MockWithDBName struct {
// contains filtered or unexported fields
}
MockWithDBName is a mock of WithDBName interface.
func NewMockWithDBName ¶
func NewMockWithDBName(ctrl *gomock.Controller) *MockWithDBName
NewMockWithDBName creates a new mock instance.
func (*MockWithDBName) EXPECT ¶
func (m *MockWithDBName) EXPECT() *MockWithDBNameMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockWithDBName) WithDBName ¶
func (m *MockWithDBName) WithDBName(arg0 string) driver.Connector
WithDBName mocks base method.
type MockWithDBNameMockRecorder ¶
type MockWithDBNameMockRecorder struct {
// contains filtered or unexported fields
}
MockWithDBNameMockRecorder is the mock recorder for MockWithDBName.
func (*MockWithDBNameMockRecorder) WithDBName ¶
func (mr *MockWithDBNameMockRecorder) WithDBName(arg0 interface{}) *gomock.Call
WithDBName indicates an expected call of WithDBName.