Versions in this module Expand all Collapse all v0 v0.6.1 Jun 12, 2020 Changes in this version + var ErrConnectionWasClosed = errors.NewKind("connection was closed") + var ErrRowTimeout = errors.NewKind("row read wait bigger than connection timeout") + func DefaultSessionBuilder(ctx context.Context, c *mysql.Conn, addr string) (sql.Session, *sql.IndexRegistry, *sql.ViewRegistry, error) + type Config struct + Address string + Auth auth.Auth + ConnReadTimeout time.Duration + ConnWriteTimeout time.Duration + MaxConnections uint64 + Protocol string + Tracer opentracing.Tracer + Version string + type DoneFunc func() + type Handler struct + func NewHandler(e *sqle.Engine, sm *SessionManager, rt time.Duration) *Handler + func (h *Handler) AddNetConnection(c *net.Conn) + func (h *Handler) ComInitDB(c *mysql.Conn, schemaName 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) error) (err 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) WarningCount(c *mysql.Conn) uint16 + type Listener struct + func NewListener(protocol, address string, handler *Handler) (*Listener, error) + func (l *Listener) Accept() (net.Conn, error) + type Server struct + Listener *mysql.Listener + func NewDefaultServer(cfg Config, e *sqle.Engine) (*Server, error) + func NewServer(cfg Config, e *sqle.Engine, sb SessionBuilder) (*Server, error) + func (s *Server) Close() error + func (s *Server) Start() error + type SessionBuilder func(ctx context.Context, conn *mysql.Conn, addr string) (sql.Session, *sql.IndexRegistry, *sql.ViewRegistry, error) + type SessionManager struct + func NewSessionManager(builder SessionBuilder, tracer opentracing.Tracer, ...) *SessionManager + func (s *SessionManager) CloseConn(conn *mysql.Conn) + func (s *SessionManager) NewContext(conn *mysql.Conn) (*sql.Context, error) + func (s *SessionManager) NewContextWithQuery(conn *mysql.Conn, query string) (*sql.Context, error) + func (s *SessionManager) NewSession(ctx context.Context, conn *mysql.Conn) error + func (s *SessionManager) SetDB(conn *mysql.Conn, db string) error