mocksql

package
v1.1.5-0...-dfb45c8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

copy from core/stores/sqlx/orm.go

copy from core/stores/sqlx/sqlconn.go

copy from core/stores/sqlx/utils.go

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotMatchDestination  = errors.New("not matching destination to scan")
	ErrNotReadableValue     = errors.New("value not addressable or interfaceable")
	ErrNotSettable          = errors.New("passed in variable is not settable")
	ErrUnsupportedValueType = errors.New("unsupported unmarshal type")
)
View Source
var ErrNotFound = sql.ErrNoRows

Functions

This section is empty.

Types

type MockConn

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

func NewMockConn

func NewMockConn(db *sql.DB) *MockConn

func (*MockConn) Exec

func (conn *MockConn) Exec(query string, args ...interface{}) (sql.Result, error)

func (*MockConn) Prepare

func (conn *MockConn) Prepare(query string) (sqlx.StmtSession, error)

func (*MockConn) QueryRow

func (conn *MockConn) QueryRow(v interface{}, q string, args ...interface{}) error

func (*MockConn) QueryRowPartial

func (conn *MockConn) QueryRowPartial(v interface{}, q string, args ...interface{}) error

func (*MockConn) QueryRows

func (conn *MockConn) QueryRows(v interface{}, q string, args ...interface{}) error

func (*MockConn) QueryRowsPartial

func (conn *MockConn) QueryRowsPartial(v interface{}, q string, args ...interface{}) error

func (*MockConn) Transact

func (conn *MockConn) Transact(func(session sqlx.Session) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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