Documentation ¶
Index ¶
- func Run(cfg Config) error
- type Columns
- type Config
- type Output
- type QueryAnalysisResult
- type QueryFailedResult
- type SchemaInfo
- func (s *SchemaInfo) ConnCollation() collations.ID
- func (s *SchemaInfo) Environment() *vtenv.Environment
- func (s *SchemaInfo) FindMirrorRule(sqlparser.TableName) (*vindexes.MirrorRule, error)
- func (s *SchemaInfo) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodata.TabletType, key.Destination, ...)
- func (s *SchemaInfo) ForeignKeyMode(string) (vschemapb.Keyspace_ForeignKeyMode, error)
- func (s *SchemaInfo) GetAggregateUDFs() []string
- func (s *SchemaInfo) GetForeignKeyChecksState() *bool
- func (s *SchemaInfo) KeyspaceError(string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Output ¶
type Output struct { FileType string `json:"fileType"` Queries []QueryAnalysisResult `json:"queries"` Failed []QueryFailedResult `json:"failed,omitempty"` }
Output represents the output generated by 'vt keys'
func ReadKeysFile ¶
type QueryAnalysisResult ¶
type QueryAnalysisResult struct { QueryStructure string `json:"queryStructure"` UsageCount int `json:"usageCount"` LineNumbers []int `json:"lineNumbers"` TableNames []string `json:"tableNames,omitempty"` GroupingColumns []operators.Column `json:"groupingColumns,omitempty"` JoinPredicates []operators.JoinPredicate `json:"joinPredicates,omitempty"` FilterColumns []operators.ColumnUse `json:"filterColumns,omitempty"` StatementType string `json:"statementType"` QueryTime float64 `json:"queryTime,omitempty"` LockTime float64 `json:"lockTime,omitempty"` RowsSent int `json:"rowsSent,omitempty"` RowsExamined int `json:"rowsExamined,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` }
QueryAnalysisResult represents the result of analyzing a query in a query log. It contains the query structure, the number of times the query was used, the line numbers where the query was used, the table name, grouping columns, join columns, filter columns, and the statement type.
type QueryFailedResult ¶
type SchemaInfo ¶
SchemaInfo is a simple implementation of semantics.SchemaInformation It will claim that any table that is asked for is present in the schema, with no columns specified and authoratative columns set to false it has a createTableHandler that can be used to populate the schema if the query log contains the CREATE TABLE statements
func (*SchemaInfo) ConnCollation ¶
func (s *SchemaInfo) ConnCollation() collations.ID
func (*SchemaInfo) Environment ¶
func (s *SchemaInfo) Environment() *vtenv.Environment
func (*SchemaInfo) FindMirrorRule ¶
func (s *SchemaInfo) FindMirrorRule(sqlparser.TableName) (*vindexes.MirrorRule, error)
func (*SchemaInfo) FindTableOrVindex ¶
func (s *SchemaInfo) FindTableOrVindex(tablename sqlparser.TableName) (*vindexes.Table, vindexes.Vindex, string, topodata.TabletType, key.Destination, error)
func (*SchemaInfo) ForeignKeyMode ¶
func (s *SchemaInfo) ForeignKeyMode(string) (vschemapb.Keyspace_ForeignKeyMode, error)
func (*SchemaInfo) GetAggregateUDFs ¶
func (s *SchemaInfo) GetAggregateUDFs() []string
func (*SchemaInfo) GetForeignKeyChecksState ¶
func (s *SchemaInfo) GetForeignKeyChecksState() *bool
func (*SchemaInfo) KeyspaceError ¶
func (s *SchemaInfo) KeyspaceError(string) error