Documentation
¶
Index ¶
- Constants
- func Ping(entry *logrus.Entry, instance *mdriver.DSN) error
- type BaseConn
- func (c *BaseConn) Close()
- func (c *BaseConn) Exec(query string) (driver.Result, error)
- func (c *BaseConn) Logger() *logrus.Entry
- func (c *BaseConn) Ping() error
- func (c *BaseConn) Query(query string, args ...interface{}) ([]map[string]sql.NullString, error)
- func (c *BaseConn) Transact(qs ...string) ([]driver.Result, error)
- type Db
- type Executor
- func (c *Executor) Explain(query string) ([]*ExplainRecord, error)
- func (c *Executor) FetchMasterBinlogPos() (string, int64, error)
- func (c *Executor) ShowCreateTable(tableName string) (string, error)
- func (c *Executor) ShowCreateView(tableName string) (string, error)
- func (c *Executor) ShowDatabases(ignoreSysDatabase bool) ([]string, error)
- func (c *Executor) ShowDefaultConfiguration(sql, column string) (string, error)
- func (c *Executor) ShowMasterStatus() ([]map[string]sql.NullString, error)
- func (c *Executor) ShowSchemaTables(schema string) ([]string, error)
- func (c *Executor) ShowSchemaViews(schema string) ([]string, error)
- func (c *Executor) ShowTableSizeMB(schema, table string) (float64, error)
- type ExplainRecord
Constants ¶
View Source
const ( ExplainRecordExtraUsingFilesort = "Using filesort" ExplainRecordExtraUsingTemporary = "Using temporary" ExplainRecordAccessTypeAll = "ALL" ExplainRecordAccessTypeIndex = "index" )
https://dev.mysql.com/doc/refman/5.7/en/explain-output.html#explain_rows
View Source
const DAIL_TIMEOUT = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseConn ¶
type BaseConn struct {
// contains filtered or unexported fields
}
type Executor ¶
type Executor struct {
Db Db
}
func NewExecutor ¶
func NewMockExecutor ¶
NewMockExecutor returns a new mock executor.
func (*Executor) FetchMasterBinlogPos ¶
func (*Executor) ShowCreateTable ¶
func (*Executor) ShowCreateView ¶ added in v1.2202.0
func (*Executor) ShowDatabases ¶
func (*Executor) ShowDefaultConfiguration ¶
func (*Executor) ShowMasterStatus ¶
func (c *Executor) ShowMasterStatus() ([]map[string]sql.NullString, error)
func (*Executor) ShowSchemaTables ¶
func (*Executor) ShowSchemaViews ¶ added in v1.2202.0
type ExplainRecord ¶
type ExplainRecord struct { Id string `json:"id"` SelectType string `json:"select_type"` Table string `json:"table"` Partitions string `json:"partitions"` Type string `json:"type"` PossibleKeys string `json:"possible_keys"` Key string `json:"key"` KeyLen string `json:"key_len"` Ref string `json:"ref"` Rows int64 `json:"rows"` Filtered string `json:"filtered"` Extra string `json:"extra"` }
Click to show internal directories.
Click to hide internal directories.