mysql

package
v0.0.0-...-a142604 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: MIT Imports: 5 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
}

Conn proxy <-> mysql server

func (*Conn) Begin

func (c *Conn) Begin() error

Begin Tx

func (*Conn) Close

func (c *Conn) Close() error

Close conn

func (*Conn) Commit

func (c *Conn) Commit() error

Commit Tx

func (*Conn) Connect

func (c *Conn) Connect(dbHost *backend.DBHost, db string) error

Connect to mysql

func (*Conn) Execute

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

Execute command.

func (*Conn) FieldList

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

FieldList return field list.

func (*Conn) GetAddr

func (c *Conn) GetAddr() string

GetAddr get addr.

func (*Conn) GetCharset

func (c *Conn) GetCharset() string

GetCharset get charset.

func (*Conn) GetConnectionID

func (c *Conn) GetConnectionID() uint32

GetConnectionID get connection id

func (*Conn) GetDB

func (c *Conn) GetDB() string

GetDB get db.

func (*Conn) IsAutoCommit

func (c *Conn) IsAutoCommit() bool

IsAutoCommit status.

func (*Conn) IsClosed

func (c *Conn) IsClosed() bool

IsClosed check connection status

func (*Conn) IsInTransaction

func (c *Conn) IsInTransaction() bool

IsInTransaction status.

func (*Conn) Ping

func (c *Conn) Ping() error

Ping db

func (*Conn) Prepare

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

Prepare stmt.

func (*Conn) Query

func (c *Conn) Query(query string) (*mysql.Result, error)

Query command.

func (*Conn) Reconnect

func (c *Conn) Reconnect() error

Reconnect reconnect to mysql.

func (*Conn) ReturnConnection

func (c *Conn) ReturnConnection()

ReturnConnection give back connection.

func (*Conn) Rollback

func (c *Conn) Rollback() error

Rollback Tx

func (*Conn) SetAutoCommit

func (c *Conn) SetAutoCommit(autocommit bool) error

SetAutoCommit set autocommit.

func (*Conn) SetCharset

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

SetCharset set charset

func (*Conn) SetConnectionID

func (c *Conn) SetConnectionID(id uint32)

SetConnectionID set connection id

func (*Conn) UseDB

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

UseDB use db.

Jump to

Keyboard shortcuts

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