thrsafe

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2012 License: BSD-3-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

See documentation of mymysql/native for details/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(proto, laddr, raddr, user, passwd string, db ...string) mysql.Conn

Types

type Conn

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

func (*Conn) Begin

func (c *Conn) Begin() (mysql.Transaction, error)

Begins a new transaction. No any other thread can send command on this connection until Commit or Rollback will be called.

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Connect

func (c *Conn) Connect() error

func (*Conn) Ping

func (c *Conn) Ping() error

func (*Conn) Prepare

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

func (*Conn) Query

func (c *Conn) Query(sql string, params ...interface{}) ([]mysql.Row, mysql.Result, error)

func (*Conn) Reconnect

func (c *Conn) Reconnect() error

func (*Conn) Start

func (c *Conn) Start(sql string, params ...interface{}) (mysql.Result, error)

func (*Conn) Use

func (c *Conn) Use(dbname string) error

type Result

type Result struct {
	mysql.Result
	// contains filtered or unexported fields
}

func (*Result) End

func (res *Result) End() error

func (*Result) GetRow

func (res *Result) GetRow() (mysql.Row, error)

func (*Result) GetRows

func (res *Result) GetRows() ([]mysql.Row, error)

func (*Result) NextResult

func (res *Result) NextResult() (mysql.Result, error)

func (*Result) ScanRow added in v0.4.7

func (res *Result) ScanRow(row mysql.Row) error

type Stmt

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

func (*Stmt) Delete

func (stmt *Stmt) Delete() error

func (*Stmt) Exec

func (stmt *Stmt) Exec(params ...interface{}) ([]mysql.Row, mysql.Result, error)

func (*Stmt) Reset

func (stmt *Stmt) Reset() error

func (*Stmt) Run

func (stmt *Stmt) Run(params ...interface{}) (mysql.Result, error)

func (*Stmt) SendLongData

func (stmt *Stmt) SendLongData(pnum int, data interface{}, pkt_size int) error

type Transaction

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

func (*Transaction) Commit

func (tr *Transaction) Commit() error

func (*Transaction) Do

func (tr *Transaction) Do(st mysql.Stmt) mysql.Stmt

func (*Transaction) Rollback

func (tr *Transaction) Rollback() error

Jump to

Keyboard shortcuts

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