package thrsafe

import "github.com/ziutek/mymysql/thrsafe"

Thread safe engine for MyMySQL

In contrast to native engine:

See documentation of mymysql/native for details

Index

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)

func (*Conn) Clone

func (c *Conn) Clone() mysql.Conn

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)

See mysql.Query

func (*Conn) QueryFirst

func (my *Conn) QueryFirst(sql string, params ...interface{}) (mysql.Row, mysql.Result, error)

See mysql.QueryFirst

func (*Conn) QueryLast

func (my *Conn) QueryLast(sql string, params ...interface{}) (mysql.Row, mysql.Result, error)

See mysql.QueryLast

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

See mysql.End

func (*Result) GetFirstRow

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

See mysql.GetFirstRow

func (*Result) GetLastRow

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

See mysql.GetLastRow

func (*Result) GetRow

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

func (*Result) GetRows

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

See mysql.GetRows

func (*Result) NextResult

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

func (*Result) ScanRow

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)

See mysql.Exec

func (*Stmt) ExecFirst

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

See mysql.ExecFirst

func (*Stmt) ExecLast

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

See mysql.ExecLast

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

Source Files

thrsafe.go

Version
v0.4.10
Published
Sep 10, 2012
Platform
windows/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.