Version: v0.0.0-...-4f4746a Latest Latest

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 12 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Conn

type Conn struct {

	TLSConfig *tls.Config
	// contains filtered or unexported fields

func Connect

func Connect(addr string, user string, password string, dbName string, options ...func(*Conn)) (*Conn, error)

Connect to a MySQL server, addr can be ip:port, or a unix socket domain like /var/sock. Accepts a series of configuration functions as a variadic argument.

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) 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) GetConnectionID

func (c *Conn) GetConnectionID() uint32

func (*Conn) GetDB

func (c *Conn) GetDB() string

func (*Conn) HandleErrorPacket

func (c *Conn) HandleErrorPacket(data []byte) error

func (*Conn) HandleOKPacket

func (c *Conn) HandleOKPacket(data []byte) *Result

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) ReadOKPacket

func (c *Conn) ReadOKPacket() (*Result, error)

func (*Conn) Rollback

func (c *Conn) Rollback() error

func (*Conn) SetAutoCommit

func (c *Conn) SetAutoCommit() error

func (*Conn) SetCharset

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

func (*Conn) UseDB

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

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL