mysql

package
v0.0.0-...-372ebbf Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MYSQL_SESSION_NIL_ERR        = errors.New("MysqlMgr session nil.")
	MYSQL_NOTFOUND_ERR           = errors.New("not found!")
	MYSQL_DBFINDALL_ERR          = errors.New("MysqlMgr found error")
	MYSQL_GET_NAMED_RESULT_ERROR = errors.New("Mysql GetResult Type Error")
)

Functions

func GetNamedRows

func GetNamedRows(query interface{}) ([]map[string]interface{}, error)

Types

type EventReceiver

type EventReceiver = event.EventReceiver

type MysqlConnInfo

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

func NewMysqlConnInfo

func NewMysqlConnInfo(host string, port int, name, user, pass string) *MysqlConnInfo

func (*MysqlConnInfo) String

func (this *MysqlConnInfo) String() string

type MysqlMgr

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

func NewMysqlMgr

func NewMysqlMgr(m module.Module, dbcfg *MysqlConnInfo, timeout time.Duration) *MysqlMgr

func (*MysqlMgr) Close

func (this *MysqlMgr) Close()

func (*MysqlMgr) GetID

func (this *MysqlMgr) GetID() component.ComponentID

func (*MysqlMgr) GetNamedRows

func (this *MysqlMgr) GetNamedRows(query interface{}) ([]map[string]interface{}, error)

func (*MysqlMgr) GetSession

func (this *MysqlMgr) GetSession() *sql.DB

func (*MysqlMgr) GetType

func (this *MysqlMgr) GetType() component.ComponentType

func (*MysqlMgr) Ping

func (this *MysqlMgr) Ping() error

func (*MysqlMgr) Start

func (this *MysqlMgr) Start() bool

Jump to

Keyboard shortcuts

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