Documentation ¶
Index ¶
- Variables
- type Handler
- func (h *Handler) ComInitDB(c *mysql.Conn, schemaName string) error
- func (h *Handler) ComMultiQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error) (string, error)
- func (h *Handler) ComPrepare(c *mysql.Conn, query string) ([]*query.Field, error)
- func (h *Handler) ComQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error) error
- func (h *Handler) ComResetConnection(c *mysql.Conn)
- func (h *Handler) ComStmtExecute(c *mysql.Conn, prepare *mysql.PrepareData, ...) error
- func (h *Handler) ConnectionClosed(c *mysql.Conn)
- func (h *Handler) NewConnection(c *mysql.Conn)
- func (h *Handler) ParserOptionsForConnection(c *mysql.Conn) (sqlparser.ParserOptions, error)
- func (h *Handler) WarningCount(c *mysql.Conn) uint16
- type MultiStmtMode
Constants ¶
This section is empty.
Variables ¶
var ( // QueryCounter describes a metric that accumulates number of queries monotonically. QueryCounter = discard.NewCounter() // QueryErrorCounter describes a metric that accumulates number of failed queries monotonically. QueryErrorCounter = discard.NewCounter() // QueryHistogram describes a queries latency. QueryHistogram = discard.NewHistogram() )
var ErrConnectionWasClosed = errors.NewKind("connection was closed")
ErrConnectionWasClosed will be returned if we try to use a previously closed connection
var ErrRowTimeout = errors.NewKind("row read wait bigger than connection timeout")
ErrRowTimeout will be returned if the wait for the row is longer than the connection timeout
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a connection handler for a SQLe engine, implementing the Vitess mysql.Handler interface.
func NewServer ¶
func NewServer(cfg server.Config, e *sqle.Engine, sb server.SessionBuilder, listener server.ServerEventListener) *Handler
func (*Handler) ComMultiQuery ¶
func (*Handler) ComPrepare ¶
ComPrepare parses, partially analyzes, and caches a prepared statement's plan with the given [c.ConnectionID].
func (*Handler) ComQuery ¶
func (h *Handler) ComQuery( c *mysql.Conn, query string, callback func(*sqltypes.Result, bool) error, ) error
ComQuery executes a SQL query on the SQLe engine.
func (*Handler) ComResetConnection ¶
func (*Handler) ComStmtExecute ¶
func (*Handler) ConnectionClosed ¶
ConnectionClosed reports that a connection has been closed.
func (*Handler) NewConnection ¶
NewConnection reports that a new connection has been established.
func (*Handler) ParserOptionsForConnection ¶
func (*Handler) WarningCount ¶
WarningCount is called at the end of each query to obtain the value to be returned to the client in the EOF packet. Note that this will be called either in the context of the ComQuery callback if the result does not contain any fields, or after the last ComQuery call completes.
type MultiStmtMode ¶
type MultiStmtMode int
const ( MultiStmtModeOff MultiStmtMode = 0 MultiStmtModeOn MultiStmtMode = 1 )