Documentation ¶
Index ¶
- func BuildValue(bytes []byte, fieldType uint32) sqltypes.Value
- type Connection
- func (conn *Connection) Close()
- func (conn *Connection) CloseResult()
- func (conn *Connection) ExecuteFetch(query string, maxrows int, wantfields bool) (qr *proto.QueryResult, err error)
- func (conn *Connection) ExecuteStreamFetch(query string) (err error)
- func (conn *Connection) FetchNext() (row []sqltypes.Value, err error)
- func (conn *Connection) Fields() (fields []proto.Field)
- func (conn *Connection) Id() int64
- func (conn *Connection) IsClosed() bool
- type ConnectionParams
- type SqlError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(params ConnectionParams) (conn *Connection, err error)
func (*Connection) Close ¶
func (conn *Connection) Close()
func (*Connection) CloseResult ¶
func (conn *Connection) CloseResult()
func (*Connection) ExecuteFetch ¶
func (conn *Connection) ExecuteFetch(query string, maxrows int, wantfields bool) (qr *proto.QueryResult, err error)
func (*Connection) ExecuteStreamFetch ¶
func (conn *Connection) ExecuteStreamFetch(query string) (err error)
when using ExecuteStreamFetch, use FetchNext on the Connection until it returns nil or error
func (*Connection) FetchNext ¶
func (conn *Connection) FetchNext() (row []sqltypes.Value, err error)
func (*Connection) Fields ¶
func (conn *Connection) Fields() (fields []proto.Field)
func (*Connection) Id ¶
func (conn *Connection) Id() int64
func (*Connection) IsClosed ¶
func (conn *Connection) IsClosed() bool
type ConnectionParams ¶
type ConnectionParams struct { Host string `json:"host"` Port int `json:"port"` Uname string `json:"uname"` Pass string `json:"pass"` Dbname string `json:"dbname"` UnixSocket string `json:"unix_socket"` Charset string `json:"charset"` Flags uint64 `json:"flags"` // the following flags are only used for 'Change Master' command // for now (along with flags |= 2048 for CLIENT_SSL) SslCa string `json:"ssl_ca"` SslCaPath string `json:"ssl_ca_path"` SslCert string `json:"ssl_cert"` SslKey string `json:"ssl_key"` }
func (*ConnectionParams) EnableMultiStatements ¶
func (c *ConnectionParams) EnableMultiStatements()
func (ConnectionParams) Redacted ¶
func (c ConnectionParams) Redacted() interface{}
func (*ConnectionParams) SslEnabled ¶
func (c *ConnectionParams) SslEnabled() bool
Click to show internal directories.
Click to hide internal directories.