support

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRows

func ParseRows(rows *sqlx.Rows) (results []contracts.Fields, err error)

func ParseRowsToCollection

func ParseRowsToCollection(rows *sqlx.Rows) (contracts.Collection, error)

func SetColVarType added in v0.1.10

func SetColVarType(colVar *[]interface{}, i int, typeName string)

func SetResultValue added in v0.1.10

func SetResultValue(result *map[string]interface{}, index string, colVar interface{}, typeName string)

Types

type BaseExecutor

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

func (*BaseExecutor) DriverName

func (this *BaseExecutor) DriverName() string

func (*BaseExecutor) Exec

func (this *BaseExecutor) Exec(query string, args ...interface{}) (result contracts.Result, err error)

func (*BaseExecutor) Get

func (this *BaseExecutor) Get(dest interface{}, query string, args ...interface{}) (err error)

func (*BaseExecutor) Query

func (this *BaseExecutor) Query(query string, args ...interface{}) (results contracts.Collection, err error)

func (*BaseExecutor) Select

func (this *BaseExecutor) Select(dest interface{}, query string, args ...interface{}) (err error)

type Executor

type Executor interface {
	DriverName() string
	Query(query string, args ...interface{}) (contracts.Collection, error)
	Get(dest interface{}, query string, args ...interface{}) (err error)
	Select(dest interface{}, query string, args ...interface{}) (err error)
	Exec(query string, args ...interface{}) (contracts.Result, error)
}

func NewExecutor

func NewExecutor(executor SqlxExecutor, dispatcher contracts.EventDispatcher, wrapper func(sql string) string) Executor

type SqlxExecutor

type SqlxExecutor interface {
	DriverName() string
	Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
	Get(dest interface{}, query string, args ...interface{}) (err error)
	Select(dest interface{}, query string, args ...interface{}) (err error)
	Exec(query string, args ...interface{}) (sql.Result, error)
}

Jump to

Keyboard shortcuts

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