Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DMLToSelect ¶
MySQL version prior 5.6.3 cannot run explain on DML commands. From the doc: http://dev.mysql.com/doc/refman/5.6/en/explain.html "As of MySQL 5.6.3, permitted explainable statements for EXPLAIN are SELECT, DELETE, INSERT, REPLACE, and UPDATE. Before MySQL 5.6.3, SELECT is the only explainable statement."
This function converts DML queries to the equivalent SELECT to make it able to explain DML queries on older MySQL versions
func IsDMLQuery ¶
Types ¶
type QueryExecutor ¶
type QueryExecutor struct {
// contains filtered or unexported fields
}
func NewQueryExecutor ¶
func NewQueryExecutor(conn mysql.Connector) *QueryExecutor
func (*QueryExecutor) Explain ¶
func (e *QueryExecutor) Explain(db, query string, convert bool) (*proto.ExplainResult, error)
func (*QueryExecutor) TableInfo ¶
func (e *QueryExecutor) TableInfo(tables *proto.TableInfoQuery) (proto.TableInfoResult, error)
Click to show internal directories.
Click to hide internal directories.