Documentation ¶
Index ¶
- type Conn
- func (c *Conn) Begin() error
- func (c *Conn) Close() error
- func (c *Conn) Commit() error
- func (c *Conn) Connect(addr string, user string, password string, db string) error
- func (c *Conn) Execute(command string, args ...interface{}) (*mysql.Result, error)
- func (c *Conn) FieldList(table string, wildcard string) ([]*mysql.Field, error)
- func (c *Conn) GetCharset() string
- func (c *Conn) GetDB() string
- func (c *Conn) IsAutoCommit() bool
- func (c *Conn) IsInTransaction() bool
- func (c *Conn) Ping() error
- func (c *Conn) Prepare(query string) (*Stmt, error)
- func (c *Conn) ReConnect() error
- func (c *Conn) Rollback() error
- func (c *Conn) SetCharset(charset string) error
- func (c *Conn) UseDB(dbName string) error
- type DB
- func (db *DB) Addr() string
- func (db *DB) Close() error
- func (db *DB) GetConn() (*SqlConn, error)
- func (db *DB) GetConnNum() int
- func (db *DB) GetIdleConnNum() int
- func (db *DB) Ping() error
- func (db *DB) PopConn() (co *Conn, err error)
- func (db *DB) PushConn(co *Conn, err error)
- func (db *DB) SetMaxIdleConnNum(num int)
- func (db *DB) String() string
- type SqlConn
- type Stmt
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
}
A proxy server manages proxy connections to Backends
proxy <-> node[mysql, es, mongo, etc]
func (*Conn) GetCharset ¶
func (*Conn) IsAutoCommit ¶
func (*Conn) IsInTransaction ¶
func (*Conn) SetCharset ¶
type DB ¶
DB manages connections to a database, knows the address/pwd etc and keeps track of idle/used connections and creates new ones as necessary
func (*DB) GetConnNum ¶
func (*DB) GetIdleConnNum ¶
func (*DB) SetMaxIdleConnNum ¶
Click to show internal directories.
Click to hide internal directories.