Documentation ¶
Overview ¶
Package mysql wraps the C client library for MySQL.
Index ¶
- func Connect(params sqldb.ConnParams) (sqldb.Conn, error)
- type Connection
- func (conn *Connection) Close()
- func (conn *Connection) CloseResult()
- func (conn *Connection) ExecuteFetch(query string, maxrows int, wantfields bool) (qr *sqltypes.Result, err error)
- func (conn *Connection) ExecuteStreamFetch(query string) (err error)
- func (conn *Connection) FetchNext() (row []sqltypes.Value, err error)
- func (conn *Connection) Fields() (fields []*querypb.Field, err error)
- func (conn *Connection) ID() int64
- func (conn *Connection) IsClosed() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection encapsulates a C mysql library 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
Click to show internal directories.
Click to hide internal directories.