Documentation
¶
Index ¶
- Constants
- Variables
- func NewMySQLProxy(ctx context.Context, server *server.Server, ...) *mysqlProxy
- func Run(ctx context.Context) (err error)
- type Handle
- func (h *Handle) CloseConn(c *server.Conn) error
- func (h *Handle) HandleFieldList(c *server.Conn, table string, fieldWildcard string) ([]*mysql.Field, error)
- func (h *Handle) HandleOtherCommand(c *server.Conn, cmd byte, data []byte) error
- func (h *Handle) HandleQuery(c *server.Conn, query string) (res *mysql.Result, err error)
- func (h *Handle) HandleStmtClose(c *server.Conn, context interface{}) error
- func (h *Handle) HandleStmtExecute(c *server.Conn, context interface{}, query string, args []interface{}) (*mysql.Result, error)
- func (h *Handle) HandleStmtPrepare(c *server.Conn, query string) (int, int, interface{}, error)
- func (h *Handle) UseDB(c *server.Conn, dbName string) error
Constants ¶
View Source
const (
GetConnRetry = 3
)
Variables ¶
View Source
var DMLSQL = []string{
"BEGIN",
"BEGIN TRANSACTION",
"COMMIT",
"END TRANSACTION",
"ROLLBACK",
"INSERT",
"UPDATE",
"DELETE",
"CREATE",
"ALERT",
"DROP",
}
Functions ¶
func NewMySQLProxy ¶
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) HandleFieldList ¶
func (*Handle) HandleOtherCommand ¶
sq
func (*Handle) HandleQuery ¶
func (*Handle) HandleStmtClose ¶
func (*Handle) HandleStmtExecute ¶
func (*Handle) HandleStmtPrepare ¶
Click to show internal directories.
Click to hide internal directories.