mysql

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: BSD-3-Clause Imports: 7 Imported by: 76

Documentation

Overview

Package mysql wraps the C client library for MySQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(params sqldb.ConnParams) (sqldb.Conn, error)

Connect uses the connection parameters to connect and returns the connection

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection encapsulates a C mysql library connection

func (*Connection) Close

func (conn *Connection) Close()

Close closes the mysql connection

func (*Connection) CloseResult

func (conn *Connection) CloseResult()

CloseResult finishes the result set

func (*Connection) ExecuteFetch

func (conn *Connection) ExecuteFetch(query string, maxrows int, wantfields bool) (qr *sqltypes.Result, err error)

ExecuteFetch executes the query on the connection

func (*Connection) ExecuteStreamFetch

func (conn *Connection) ExecuteStreamFetch(query string) (err error)

ExecuteStreamFetch starts a streaming query to mysql. Use FetchNext on the Connection until it returns nil or error

func (*Connection) FetchNext

func (conn *Connection) FetchNext() (row []sqltypes.Value, err error)

FetchNext returns the next row for a query

func (*Connection) Fields

func (conn *Connection) Fields() (fields []*querypb.Field, err error)

Fields returns the current fields description for the query

func (*Connection) ID

func (conn *Connection) ID() int64

ID returns the MySQL thread_id of the connection.

func (*Connection) IsClosed

func (conn *Connection) IsClosed() bool

IsClosed returns if the connection was ever closed

Jump to

Keyboard shortcuts

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