storage

package
v0.0.0-...-8f1203c Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlClient

type MysqlClient struct {
	Address  string
	Port     string
	User     string
	Password string
	DBName   string
	DBPath   string
}

func NewMysqlClient

func NewMysqlClient() *MysqlClient

func (*MysqlClient) CreateBareDB

func (mc *MysqlClient) CreateBareDB() *sql.DB

CreateBareDB create *sql.DB without connecting to specific database

func (*MysqlClient) CreateDB

func (mc *MysqlClient) CreateDB() *sql.DB

CreateDB create *sql.DB connecting to specific database

func (*MysqlClient) Insert

func (mc *MysqlClient) Insert(sql, dbname string, args ...interface{}) (sql.Result, error)

func (*MysqlClient) QueryMore

func (mc *MysqlClient) QueryMore(sql string, args ...interface{}) (*sql.Rows, error)

func (*MysqlClient) QueryOne

func (mc *MysqlClient) QueryOne(sql, dbname string, args ...interface{}) *sql.Row

func (*MysqlClient) STMTFactory

func (mc *MysqlClient) STMTFactory(predSQL string, db *sql.DB) *sql.Stmt

STMTFactory return *sql.Stmt and handle error

Jump to

Keyboard shortcuts

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