mock

package
v0.0.0-...-49d60cc Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDbDriver

type MockDbDriver struct {
	QueryValue        string
	NumInputValue     int
	LastInsertIDValue int64
	RowsAffectedValue int64
	ColumnsValue      []string
	ColumnsTypeValue  []reflect.Type
	ColumnsLength     []int64
	Rows              [][]interface{}
	Cursor            int64
}

func (*MockDbDriver) Begin

func (m *MockDbDriver) Begin() (driver.Tx, error)

func (*MockDbDriver) Close

func (m *MockDbDriver) Close() error

func (*MockDbDriver) ColumnTypeLength

func (m *MockDbDriver) ColumnTypeLength(i int) (int64, bool)

func (*MockDbDriver) ColumnTypeScanType

func (m *MockDbDriver) ColumnTypeScanType(i int) reflect.Type

* to fullfill RowsColumnTypeScanType *

func (*MockDbDriver) Columns

func (m *MockDbDriver) Columns() []string

func (*MockDbDriver) Commit

func (m *MockDbDriver) Commit() error

func (*MockDbDriver) Driver

func (m *MockDbDriver) Driver() *MockDbDriver

* MockDbDriver as Connection *

func (*MockDbDriver) Exec

func (m *MockDbDriver) Exec(args []driver.Value) (driver.Result, error)

func (*MockDbDriver) LastInsertId

func (m *MockDbDriver) LastInsertId() (int64, error)

* MockDbDriver as Result *

func (*MockDbDriver) Next

func (m *MockDbDriver) Next(dest []driver.Value) error

func (*MockDbDriver) NumInput

func (m *MockDbDriver) NumInput() int

* MockDbDriver as Stmt *

func (*MockDbDriver) Open

func (m *MockDbDriver) Open(conn string) (driver.Conn, error)

* MockDbDriver as Driver *

func (*MockDbDriver) Prepare

func (m *MockDbDriver) Prepare(query string) (driver.Stmt, error)

func (*MockDbDriver) Query

func (m *MockDbDriver) Query(args []driver.Value) (driver.Rows, error)

func (*MockDbDriver) Rollback

func (m *MockDbDriver) Rollback() error

func (*MockDbDriver) RowsAffected

func (m *MockDbDriver) RowsAffected() (int64, error)

Jump to

Keyboard shortcuts

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