Documentation ¶
Index ¶
- Variables
- func IsMySQLError(code uint16) func(error) bool
- type ExplainRow
- type Lock
- type LockWait
- type MySQL
- func (mysql MySQL) Explain(ctx context.Context, query string, args ...interface{}) ([]ExplainRow, error)
- func (mysql MySQL) GetCharacterSetVars(ctx context.Context) (map[string]*Var, error)
- func (mysql MySQL) GetTables(ctx context.Context, databaseName string) (map[string]*Table, error)
- func (mysql MySQL) LockWaits(ctx context.Context, query string, args ...interface{}) ([]LockWait, error)
- func (mysql MySQL) Locks(ctx context.Context, query string, args ...interface{}) ([]Lock, error)
- func (mysql MySQL) ProcessList(ctx context.Context, query string, args ...interface{}) (*ProcessList, error)
- func (mysql MySQL) Profile(ctx context.Context, query string, args ...interface{}) (*Profile, error)
- func (mysql MySQL) Trace(ctx context.Context, query string, args ...interface{}) (*Trace, error)
- func (mysql MySQL) Trxs(ctx context.Context, query string, args ...interface{}) ([]Trx, error)
- type ProcessList
- type Profile
- type Table
- type Trace
- type Trx
- type Var
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IsMySQLDuplicateError = IsMySQLError(uint16(1062)) IsMySQLNowaitError = IsMySQLError(uint16(3572)) )
View Source
var ( TablesQuery = "SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ?;" // CharacterSetVarsQuery see the values of the character set and collation system variables that apply to the current session CharacterSetVarsQuery = `` /* 243-byte string literal not displayed */ )
Functions ¶
func IsMySQLError ¶
Types ¶
type ExplainRow ¶
type ExplainRow struct { ID int `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 *int `json:"key_len"` Ref *string `json:"ref"` Rows *int `json:"rows"` Filtered *float32 `json:"filtered"` Extra *string `json:"extra"` }
func (ExplainRow) String ¶
func (er ExplainRow) String() string
type MySQL ¶
func (MySQL) Explain ¶
func (mysql MySQL) Explain(ctx context.Context, query string, args ...interface{}) ([]ExplainRow, error)
Explain execute `explain query`
func (MySQL) GetCharacterSetVars ¶
GetCharacterSets get session character set from mysql `performance_schema.session_variables`
func (MySQL) ProcessList ¶
type ProcessList ¶
type ProcessList struct { }
type Trx ¶
type Trx struct { }
https://dev.mysql.com/doc/refman/8.0/en/information-schema-innodb-trx-table.html
Click to show internal directories.
Click to hide internal directories.