Documentation ¶
Overview ¶
Package mysqlx provides a MySQL driver for Go's database/sql package and MySQL X Protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Driver driverType
Driver implements database/sql/driver.Driver and database/sql/driver.DriverContext interfaces. It has no internal state.
Functions ¶
func ReadMessage ¶
ReadMessage reads and returns one next protocol message, or low-level error. Notices are unwrapped: SessionVariableChanged, SessionStateChanged, and Warning are returned, and raw Frame is never returned. TODO un-export (currently required for mitm-proxy)
Types ¶
type AuthMethod ¶
type AuthMethod string
const ( AuthPlain AuthMethod = "PLAIN" AuthMySQL41 AuthMethod = "MYSQL41" )
type Connector ¶
type Connector struct { Host string Port uint16 Database string Username string Password string AuthMethod AuthMethod SessionVariables map[string]string Trace func(format string, v ...interface{}) }
Connector implements database/sql/driver.Connector interface.
func ParseDataSource ¶
ParseDataSource returns Connector for given data source.
func (*Connector) Connect ¶
Connect returns a new connection to the database.
The provided context.Context is for dialing purposes only (see net.DialContext) and is not used for other purposes.
The returned connection must be used only by one goroutine at a time.
type Error ¶
Error represents MySQL X Protocol error message. It's not used for transport-level errors.
type Severity ¶
type Severity byte
Severity represents Error severity level.
const ( // SeverityError indicates the current message sequence is aborted for the given error // and the session is ready for more. SeverityError Severity = 0 // SeverityFatal indicates the client should not expect the server to continue handling any further messages // and should close the connection. SeverityFatal Severity = 1 )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
proto/mysqlx
Package mysqlx is a generated protocol buffer package.
|
Package mysqlx is a generated protocol buffer package. |
proto/mysqlx_connection
Package mysqlx_connection is a generated protocol buffer package.
|
Package mysqlx_connection is a generated protocol buffer package. |
proto/mysqlx_crud
Package mysqlx_crud is a generated protocol buffer package.
|
Package mysqlx_crud is a generated protocol buffer package. |
proto/mysqlx_datatypes
Package mysqlx_datatypes is a generated protocol buffer package.
|
Package mysqlx_datatypes is a generated protocol buffer package. |
proto/mysqlx_expect
Package mysqlx_expect is a generated protocol buffer package.
|
Package mysqlx_expect is a generated protocol buffer package. |
proto/mysqlx_expr
Package mysqlx_expr is a generated protocol buffer package.
|
Package mysqlx_expr is a generated protocol buffer package. |
proto/mysqlx_notice
Package mysqlx_notice is a generated protocol buffer package.
|
Package mysqlx_notice is a generated protocol buffer package. |
proto/mysqlx_resultset
Package mysqlx_resultset is a generated protocol buffer package.
|
Package mysqlx_resultset is a generated protocol buffer package. |
proto/mysqlx_session
Package mysqlx_session is a generated protocol buffer package.
|
Package mysqlx_session is a generated protocol buffer package. |
proto/mysqlx_sql
Package mysqlx_sql is a generated protocol buffer package.
|
Package mysqlx_sql is a generated protocol buffer package. |