mocksqldb

package module
v0.0.0-...-24aee54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: MIT Imports: 6 Imported by: 0

README

sqldb-gomock

Actions Status Go Report Card GoDoc

sqldb-gomock is a gomock implementation of go-sqldb.

Documentation

Overview

Package mocksqldb is a GoMock implementation of the sqldb interface

Package mocksqldb is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// StringType represents a string argument
	StringType = matcher.String()
	// IntType represents an int argument
	IntType = matcher.Int()
	// AnyType represents an argument that can be anything
	AnyType = gomock.Any()
)

Functions

This section is empty.

Types

type MockConnection

type MockConnection struct {
	// contains filtered or unexported fields
}

MockConnection is a mock of Connection interface

func NewMockConnection

func NewMockConnection(ctrl *gomock.Controller) *MockConnection

NewMockConnection creates a new mock instance

func (*MockConnection) Beginx

func (m *MockConnection) Beginx() (go_sqldb.Tx, error)

Beginx mocks base method

func (*MockConnection) Close

func (m *MockConnection) Close() error

Close mocks base method

func (*MockConnection) DSN

func (m *MockConnection) DSN() string

DSN mocks base method

func (*MockConnection) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockConnection) Exec

func (m *MockConnection) Exec(arg0 string, arg1 ...interface{}) (int64, error)

Exec mocks base method

func (*MockConnection) Get

func (m *MockConnection) Get(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Get mocks base method

func (*MockConnection) NamedExec

func (m *MockConnection) NamedExec(arg0 string, arg1 interface{}) (int64, error)

NamedExec mocks base method

func (*MockConnection) NamedGet

func (m *MockConnection) NamedGet(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedGet mocks base method

func (*MockConnection) NamedSelect

func (m *MockConnection) NamedSelect(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedSelect mocks base method

func (*MockConnection) QEXPECT

QEXPECT returns an object that allows the caller to indicate expected use for a Queryable

func (*MockConnection) SQL

func (m *MockConnection) SQL() *sql.DB

SQL mocks base method

func (*MockConnection) Select

func (m *MockConnection) Select(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Select mocks base method

type MockConnectionMockRecorder

type MockConnectionMockRecorder struct {
	// contains filtered or unexported fields
}

MockConnectionMockRecorder is the mock recorder for MockConnection

func (*MockConnectionMockRecorder) Beginx

func (mr *MockConnectionMockRecorder) Beginx() *gomock.Call

Beginx indicates an expected call of Beginx

func (*MockConnectionMockRecorder) Close

func (mr *MockConnectionMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockConnectionMockRecorder) DSN

DSN indicates an expected call of DSN

func (*MockConnectionMockRecorder) SQL

SQL indicates an expected call of SQL

func (*MockConnectionMockRecorder) TransactionError

func (mr *MockConnectionMockRecorder) TransactionError() *gomock.Call

TransactionError is a helper that expects a transaction to fail

func (*MockConnectionMockRecorder) TransactionSuccess

func (mr *MockConnectionMockRecorder) TransactionSuccess(ctrl *gomock.Controller) (*MockTx, *gomock.Call)

TransactionSuccess is a helper that expects a transaction

type MockQueryable

type MockQueryable struct {
	// contains filtered or unexported fields
}

MockQueryable is a mock of Queryable interface

func NewMockQueryable

func NewMockQueryable(ctrl *gomock.Controller) *MockQueryable

NewMockQueryable creates a new mock instance

func (*MockQueryable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockQueryable) Exec

func (m *MockQueryable) Exec(arg0 string, arg1 ...interface{}) (int64, error)

Exec mocks base method

func (*MockQueryable) Get

func (m *MockQueryable) Get(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Get mocks base method

func (*MockQueryable) NamedExec

func (m *MockQueryable) NamedExec(arg0 string, arg1 interface{}) (int64, error)

NamedExec mocks base method

func (*MockQueryable) NamedGet

func (m *MockQueryable) NamedGet(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedGet mocks base method

func (*MockQueryable) NamedSelect

func (m *MockQueryable) NamedSelect(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedSelect mocks base method

func (*MockQueryable) Select

func (m *MockQueryable) Select(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Select mocks base method

type MockQueryableMockRecorder

type MockQueryableMockRecorder struct {
	// contains filtered or unexported fields
}

MockQueryableMockRecorder is the mock recorder for MockQueryable

func (*MockQueryableMockRecorder) DeletionError

func (mr *MockQueryableMockRecorder) DeletionError(err error) *gomock.Call

DeletionError is a helper that expects a deletion to fail

func (*MockQueryableMockRecorder) DeletionSuccess

func (mr *MockQueryableMockRecorder) DeletionSuccess() *gomock.Call

DeletionSuccess is a helper that expects a deletion to succeed

func (*MockQueryableMockRecorder) Exec

func (mr *MockQueryableMockRecorder) Exec(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Exec indicates an expected call of Exec

func (*MockQueryableMockRecorder) Get

func (mr *MockQueryableMockRecorder) Get(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockQueryableMockRecorder) GetError

func (mr *MockQueryableMockRecorder) GetError(typ interface{}, err error) *gomock.Call

GetError is a helper that expects a connection error on a Get

func (*MockQueryableMockRecorder) GetID

func (mr *MockQueryableMockRecorder) GetID(typ interface{}, uuid string, runnable interface{}) *gomock.Call

GetID is a helper that expects a Get with a specific ID

func (*MockQueryableMockRecorder) GetIDError

func (mr *MockQueryableMockRecorder) GetIDError(typ interface{}, uuid string, err error) *gomock.Call

GetIDError is a helper that expects a connection error on a Get with a specific ID

func (*MockQueryableMockRecorder) GetIDNotFound

func (mr *MockQueryableMockRecorder) GetIDNotFound(typ interface{}, uuid string) *gomock.Call

GetIDNotFound is a helper that expects a not found on a Get with a specific ID

func (*MockQueryableMockRecorder) GetNoParams

func (mr *MockQueryableMockRecorder) GetNoParams(typ, runnable interface{}) *gomock.Call

GetNoParams is a helper that expects a Get with no params but the stmt

func (*MockQueryableMockRecorder) GetNoParamsError

func (mr *MockQueryableMockRecorder) GetNoParamsError(typ interface{}, err error) *gomock.Call

GetNoParamsError is a helper that expects a connection error on a Get with no params but the stmt

func (*MockQueryableMockRecorder) GetNoParamsNotFound

func (mr *MockQueryableMockRecorder) GetNoParamsNotFound(typ interface{}) *gomock.Call

GetNoParamsNotFound is a helper that expects a not found on a Get with no params but the stmt

func (*MockQueryableMockRecorder) GetNotFound

func (mr *MockQueryableMockRecorder) GetNotFound(typ interface{}) *gomock.Call

GetNotFound is a helper that expects a not found on a Get

func (*MockQueryableMockRecorder) GetSuccess

func (mr *MockQueryableMockRecorder) GetSuccess(typ, runnable interface{}) *gomock.Call

GetSuccess is a helper that expects a Get to succeed

func (*MockQueryableMockRecorder) InsertError

func (mr *MockQueryableMockRecorder) InsertError(typ interface{}, err error) *gomock.Call

InsertError is a helper that expects an insert to fail

func (*MockQueryableMockRecorder) InsertSuccess

func (mr *MockQueryableMockRecorder) InsertSuccess(typ interface{}) *gomock.Call

InsertSuccess is a helper that expects an insertion

func (*MockQueryableMockRecorder) NamedExec

func (mr *MockQueryableMockRecorder) NamedExec(arg0, arg1 interface{}) *gomock.Call

NamedExec indicates an expected call of NamedExec

func (*MockQueryableMockRecorder) NamedGet

func (mr *MockQueryableMockRecorder) NamedGet(arg0, arg1, arg2 interface{}) *gomock.Call

NamedGet indicates an expected call of NamedGet

func (*MockQueryableMockRecorder) NamedSelect

func (mr *MockQueryableMockRecorder) NamedSelect(arg0, arg1, arg2 interface{}) *gomock.Call

NamedSelect indicates an expected call of NamedSelect

func (*MockQueryableMockRecorder) Select

func (mr *MockQueryableMockRecorder) Select(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Select indicates an expected call of Select

func (*MockQueryableMockRecorder) SelectError

func (mr *MockQueryableMockRecorder) SelectError(typ interface{}, err error) *gomock.Call

SelectError is an helper that expects an error on a Select

func (*MockQueryableMockRecorder) SelectSuccess

func (mr *MockQueryableMockRecorder) SelectSuccess(typ, runnable interface{}) *gomock.Call

SelectSuccess is an helper that expects a Select

func (*MockQueryableMockRecorder) UpdateError

func (mr *MockQueryableMockRecorder) UpdateError(typ interface{}, err error) *gomock.Call

UpdateError is a helper that expects an update to fail

func (*MockQueryableMockRecorder) UpdateSuccess

func (mr *MockQueryableMockRecorder) UpdateSuccess(typ interface{}) *gomock.Call

UpdateSuccess is a helper that expects an update

type MockTx

type MockTx struct {
	// contains filtered or unexported fields
}

MockTx is a mock of Tx interface

func NewMockTx

func NewMockTx(ctrl *gomock.Controller) *MockTx

NewMockTx creates a new mock instance

func (*MockTx) Commit

func (m *MockTx) Commit() error

Commit mocks base method

func (*MockTx) EXPECT

func (m *MockTx) EXPECT() *MockTxMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockTx) Exec

func (m *MockTx) Exec(arg0 string, arg1 ...interface{}) (int64, error)

Exec mocks base method

func (*MockTx) Get

func (m *MockTx) Get(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Get mocks base method

func (*MockTx) NamedExec

func (m *MockTx) NamedExec(arg0 string, arg1 interface{}) (int64, error)

NamedExec mocks base method

func (*MockTx) NamedGet

func (m *MockTx) NamedGet(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedGet indicates an expected call of NamedGet

func (*MockTx) NamedSelect

func (m *MockTx) NamedSelect(arg0 interface{}, arg1 string, arg2 interface{}) error

NamedSelect mocks base method

func (*MockTx) QEXPECT

func (m *MockTx) QEXPECT() *MockQueryableMockRecorder

QEXPECT returns an object that allows the caller to indicate expected use for a Queryable

func (*MockTx) Rollback

func (m *MockTx) Rollback() error

Rollback mocks base method

func (*MockTx) Select

func (m *MockTx) Select(arg0 interface{}, arg1 string, arg2 ...interface{}) error

Select mocks base method

type MockTxMockRecorder

type MockTxMockRecorder struct {
	MockQueryableMockRecorder
	// contains filtered or unexported fields
}

MockTxMockRecorder is the mock recorder for MockTx

func (*MockTxMockRecorder) Commit

func (mr *MockTxMockRecorder) Commit() *gomock.Call

Commit indicates an expected call of Commit

func (*MockTxMockRecorder) CommitError

func (mr *MockTxMockRecorder) CommitError() *gomock.Call

CommitError is a helper that expects a commit to fail

func (*MockTxMockRecorder) CommitSuccess

func (mr *MockTxMockRecorder) CommitSuccess() *gomock.Call

CommitSuccess is a helper that expects a transaction to Commit

func (*MockTxMockRecorder) Rollback

func (mr *MockTxMockRecorder) Rollback() *gomock.Call

Rollback indicates an expected call of Rollback

func (*MockTxMockRecorder) RollbackError

func (mr *MockTxMockRecorder) RollbackError() *gomock.Call

RollbackError is a helper that expects a Rollback to fail

func (*MockTxMockRecorder) RollbackSuccess

func (mr *MockTxMockRecorder) RollbackSuccess() *gomock.Call

RollbackSuccess is a helper that expects a transaction to Rollback

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL