test

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockSQLWithAnyArgs

func MockSQLWithAnyArgs(sql string, argsCount int) []interface{}

Types

type FakeRDbConn

type FakeRDbConn struct{}

func NewFakeRDbConn

func NewFakeRDbConn() *FakeRDbConn

func (*FakeRDbConn) Begin

func (conn *FakeRDbConn) Begin() (rdb.Tx, error)

func (*FakeRDbConn) Exec

func (conn *FakeRDbConn) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)

func (*FakeRDbConn) Query

func (conn *FakeRDbConn) Query(sql string, args ...interface{}) (rdb.RowsResult, error)

func (*FakeRDbConn) QueryRow

func (conn *FakeRDbConn) QueryRow(sql string, args ...interface{}) rdb.RowResult

func (*FakeRDbConn) ToHandle

func (conn *FakeRDbConn) ToHandle() *rdb.Handle

type FakeRDbExecResult

type FakeRDbExecResult struct{}

func (*FakeRDbExecResult) IsDelete

func (result *FakeRDbExecResult) IsDelete() bool

func (*FakeRDbExecResult) IsInsert

func (result *FakeRDbExecResult) IsInsert() bool

func (*FakeRDbExecResult) IsSelect

func (result *FakeRDbExecResult) IsSelect() bool

func (*FakeRDbExecResult) IsUpdate

func (result *FakeRDbExecResult) IsUpdate() bool

func (*FakeRDbExecResult) RowsAffected

func (result *FakeRDbExecResult) RowsAffected() int64

func (*FakeRDbExecResult) String

func (result *FakeRDbExecResult) String() string

type FakeRDbNtobReader

type FakeRDbNtobReader struct{}

func (*FakeRDbNtobReader) Parse

func (reader *FakeRDbNtobReader) Parse() (*big.Int, error)

func (*FakeRDbNtobReader) ScannableArg

func (reader *FakeRDbNtobReader) ScannableArg() interface{}

type FakeRDbRowResult

type FakeRDbRowResult struct{}

func (*FakeRDbRowResult) Scan

func (result *FakeRDbRowResult) Scan(dest ...interface{}) error

type FakeRDbRowsResult

type FakeRDbRowsResult struct{}

func (*FakeRDbRowsResult) Close

func (result *FakeRDbRowsResult) Close()

func (*FakeRDbRowsResult) Err

func (result *FakeRDbRowsResult) Err() error

func (*FakeRDbRowsResult) ExecResult

func (result *FakeRDbRowsResult) ExecResult() rdb.ExecResult

func (*FakeRDbRowsResult) Next

func (result *FakeRDbRowsResult) Next() bool

func (*FakeRDbRowsResult) Scan

func (result *FakeRDbRowsResult) Scan(dest ...interface{}) error

type FakeRDbTx

type FakeRDbTx struct{}

func (*FakeRDbTx) Commit

func (tx *FakeRDbTx) Commit() error

func (*FakeRDbTx) Exec

func (tx *FakeRDbTx) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)

func (*FakeRDbTx) Query

func (tx *FakeRDbTx) Query(sql string, args ...interface{}) (rdb.RowsResult, error)

func (*FakeRDbTx) QueryRow

func (tx *FakeRDbTx) QueryRow(sql string, args ...interface{}) rdb.RowResult

func (*FakeRDbTx) Rollback

func (tx *FakeRDbTx) Rollback() error

func (*FakeRDbTx) ToHandle

func (tx *FakeRDbTx) ToHandle() *rdb.Handle

type FakeRDbTypeConv

type FakeRDbTypeConv struct{}

func (*FakeRDbTypeConv) Bton

func (conv *FakeRDbTypeConv) Bton(bigInt *big.Int) interface{}

func (*FakeRDbTypeConv) Iton

func (conv *FakeRDbTypeConv) Iton(i int) interface{}

func (*FakeRDbTypeConv) NtobReader

func (conv *FakeRDbTypeConv) NtobReader() rdb.NtobReader

type MockRDbConn

type MockRDbConn struct {
	mock.Mock
}

func NewMockRDbConn

func NewMockRDbConn() *MockRDbConn

func (*MockRDbConn) Begin

func (conn *MockRDbConn) Begin() (rdb.Tx, error)

func (*MockRDbConn) BeginTx added in v1.3.4

func (conn *MockRDbConn) BeginTx() (rdb.Tx, error)

func (*MockRDbConn) Exec

func (conn *MockRDbConn) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)

func (*MockRDbConn) Query

func (conn *MockRDbConn) Query(sql string, args ...interface{}) (rdb.RowsResult, error)

func (*MockRDbConn) QueryRow

func (conn *MockRDbConn) QueryRow(sql string, args ...interface{}) rdb.RowResult

func (*MockRDbConn) ToHandle

func (conn *MockRDbConn) ToHandle() *rdb.Handle

type MockRDbExecResult

type MockRDbExecResult struct {
	mock.Mock
}

func (*MockRDbExecResult) IsDelete

func (result *MockRDbExecResult) IsDelete() bool

func (*MockRDbExecResult) IsInsert

func (result *MockRDbExecResult) IsInsert() bool

func (*MockRDbExecResult) IsSelect

func (result *MockRDbExecResult) IsSelect() bool

func (*MockRDbExecResult) IsUpdate

func (result *MockRDbExecResult) IsUpdate() bool

func (*MockRDbExecResult) RowsAffected

func (result *MockRDbExecResult) RowsAffected() int64

func (*MockRDbExecResult) String

func (result *MockRDbExecResult) String() string

type MockRDbNtobReader

type MockRDbNtobReader struct {
	mock.Mock
}

func (*MockRDbNtobReader) Parse

func (reader *MockRDbNtobReader) Parse() (*big.Int, error)

func (*MockRDbNtobReader) ScannableArg

func (reader *MockRDbNtobReader) ScannableArg() interface{}

type MockRDbRowResult

type MockRDbRowResult struct {
	mock.Mock
}

func (*MockRDbRowResult) Scan

func (result *MockRDbRowResult) Scan(dest ...interface{}) error

type MockRDbRowsResult

type MockRDbRowsResult struct {
	mock.Mock
}

func (*MockRDbRowsResult) Close

func (result *MockRDbRowsResult) Close()

func (*MockRDbRowsResult) Err

func (result *MockRDbRowsResult) Err() error

func (*MockRDbRowsResult) ExecResult

func (result *MockRDbRowsResult) ExecResult() rdb.ExecResult

func (*MockRDbRowsResult) Next

func (result *MockRDbRowsResult) Next() bool

func (*MockRDbRowsResult) Scan

func (result *MockRDbRowsResult) Scan(dest ...interface{}) error

type MockRDbTx

type MockRDbTx struct {
	mock.Mock
}

func (*MockRDbTx) Commit

func (tx *MockRDbTx) Commit() error

func (*MockRDbTx) Exec

func (tx *MockRDbTx) Exec(sql string, args ...interface{}) (rdb.ExecResult, error)

func (*MockRDbTx) Query

func (tx *MockRDbTx) Query(sql string, args ...interface{}) (rdb.RowsResult, error)

func (*MockRDbTx) QueryRow

func (tx *MockRDbTx) QueryRow(sql string, args ...interface{}) rdb.RowResult

func (*MockRDbTx) Rollback

func (tx *MockRDbTx) Rollback() error

func (*MockRDbTx) ToHandle

func (tx *MockRDbTx) ToHandle() *rdb.Handle

type MockRDbTypeConv

type MockRDbTypeConv struct {
	mock.Mock
}

func NewMockRDbTypeConv

func NewMockRDbTypeConv() *MockRDbTypeConv

func (*MockRDbTypeConv) Bton

func (conv *MockRDbTypeConv) Bton(bigInt *big.Int) interface{}

func (*MockRDbTypeConv) Iton

func (conv *MockRDbTypeConv) Iton(i int) interface{}

func (*MockRDbTypeConv) NtobReader

func (conv *MockRDbTypeConv) NtobReader() rdb.NtobReader

Jump to

Keyboard shortcuts

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