database

package
v0.0.0-...-61829c1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAndParse

func LoadAndParse(path string, v interface{}) error

Types

type MockDB

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

func (*MockDB) GetDB

func (m *MockDB) GetDB() *sqlx.DB

func (*MockDB) Init

func (m *MockDB) Init() error

func (*MockDB) LoadTestSuite

func (m *MockDB) LoadTestSuite(path string) error

func (*MockDB) Open

func (m *MockDB) Open() *sqlx.DB

type Query

type Query struct {
	Type               string        `json:"type"`
	ExpectedSQLKeyWord string        `json:"sqlKeyword,omitempty"`
	WithArgs           []interface{} `json:"args,omitempty"`
	ReturnResult       *ReturnResult `json:"result,omitempty"`
	ReturnRows         *ReturnRows   `json:"rows,omitempty"`
	ReturnError        string        `json:"error,omitempty"`
}

type ReturnResult

type ReturnResult struct {
	LastInsertID int64 `json:"lastInsertID"`
	RowsEffected int64 `json:"rowsEffected"`
}

type ReturnRows

type ReturnRows struct {
	Columns []string        `json:"columns"`
	Rows    [][]interface{} `json:"rows"`
}

Jump to

Keyboard shortcuts

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