client

package
v0.0.0-...-4b09fe0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

proxy <-> mysql server

func (*Conn) Begin

func (c *Conn) Begin() error

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Commit

func (c *Conn) Commit() error

func (*Conn) Connect

func (c *Conn) Connect(addr string, user string, password string, db string) error

func (*Conn) Execute

func (c *Conn) Execute(command string, args ...interface{}) (*Result, error)

func (*Conn) FieldList

func (c *Conn) FieldList(table string, wildcard string) ([]*Field, error)

func (*Conn) GetCharset

func (c *Conn) GetCharset() string

func (*Conn) GetDB

func (c *Conn) GetDB() string

func (*Conn) IsAutoCommit

func (c *Conn) IsAutoCommit() bool

func (*Conn) IsInTransaction

func (c *Conn) IsInTransaction() bool

func (*Conn) Ping

func (c *Conn) Ping() error

func (*Conn) Prepare

func (c *Conn) Prepare(query string) (*Stmt, error)

func (*Conn) ReConnect

func (c *Conn) ReConnect() error

func (*Conn) Rollback

func (c *Conn) Rollback() error

func (*Conn) SetCharset

func (c *Conn) SetCharset(charset string) error

func (*Conn) UseDB

func (c *Conn) UseDB(dbName string) error

type DB

type DB struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func Open

func Open(addr string, user string, password string, dbName string) (*DB, error)

func (*DB) Addr

func (db *DB) Addr() string

func (*DB) Close

func (db *DB) Close() error

func (*DB) GetConn

func (db *DB) GetConn() (*SqlConn, error)

func (*DB) GetConnNum

func (db *DB) GetConnNum() int

func (*DB) GetIdleConnNum

func (db *DB) GetIdleConnNum() int

func (*DB) Ping

func (db *DB) Ping() error

func (*DB) PopConn

func (db *DB) PopConn() (co *Conn, err error)

func (*DB) PushConn

func (db *DB) PushConn(co *Conn, err error)

func (*DB) SetMaxIdleConnNum

func (db *DB) SetMaxIdleConnNum(num int)

func (*DB) String

func (db *DB) String() string

type SqlConn

type SqlConn struct {
	*Conn
	// contains filtered or unexported fields
}

func (*SqlConn) Close

func (p *SqlConn) Close()

type Stmt

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

func (*Stmt) Close

func (s *Stmt) Close() error

func (*Stmt) ColumnNum

func (s *Stmt) ColumnNum() int

func (*Stmt) Execute

func (s *Stmt) Execute(args ...interface{}) (*Result, error)

func (*Stmt) ParamNum

func (s *Stmt) ParamNum() int

Jump to

Keyboard shortcuts

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