db

package
v0.0.0-...-60312f4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlDb

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

func InitMysql

func InitMysql(driver MysqlDriver) *MysqlDb

func NewDb

func NewDb() *MysqlDb

func (*MysqlDb) Close

func (db *MysqlDb) Close()

func (*MysqlDb) Connect

func (db *MysqlDb) Connect(config MysqlDriver)

func (*MysqlDb) Execute

func (db *MysqlDb) Execute(sql string) (sql.Result, error)

func (*MysqlDb) Query

func (db *MysqlDb) Query(sql string) ([]map[string][]byte, error)

func (*MysqlDb) QueryInterface

func (db *MysqlDb) QueryInterface(sql string) ([]map[string]interface{}, error)

func (*MysqlDb) QueryInterfaceOne

func (db *MysqlDb) QueryInterfaceOne(sql string) (map[string]interface{}, error)

func (*MysqlDb) QueryOne

func (db *MysqlDb) QueryOne(sql string) (map[string][]byte, error)

func (*MysqlDb) QueryString

func (db *MysqlDb) QueryString(sql string) ([]map[string]string, error)

func (*MysqlDb) QueryStringOne

func (db *MysqlDb) QueryStringOne(sql string) (map[string]string, error)

type MysqlDriver

type MysqlDriver struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
	Charset  string
}

Jump to

Keyboard shortcuts

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