tidb: github.com/pingcap/tidb/infoschema Index | Files | Directories

package infoschema

import "github.com/pingcap/tidb/infoschema"

Index

Package Files

builder.go cluster.go error.go infoschema.go metric_table_def.go metrics_schema.go tables.go

Constants

const (
    // ClusterTableSlowLog is the string constant of cluster slow query memory table.
    ClusterTableSlowLog     = "CLUSTER_SLOW_QUERY"
    ClusterTableProcesslist = "CLUSTER_PROCESSLIST"
    // ClusterTableStatementsSummary is the string constant of cluster statement summary table.
    ClusterTableStatementsSummary = "CLUSTER_STATEMENTS_SUMMARY"
    // ClusterTableStatementsSummaryHistory is the string constant of cluster statement summary history table.
    ClusterTableStatementsSummaryHistory = "CLUSTER_STATEMENTS_SUMMARY_HISTORY"
)

Cluster table list, attention: 1. the table name should be upper case. 2. clusterTableName should equal to "CLUSTER_" + memTableTableName.

const (
    // TableSchemata is the string constant of infoschema table.
    TableSchemata = "SCHEMATA"
    // TableTables is the string constant of infoschema table.
    TableTables = "TABLES"
    // TableColumns is the string constant of infoschema table
    TableColumns = "COLUMNS"

    // TableStatistics is the string constant of infoschema table
    TableStatistics = "STATISTICS"
    // TableCharacterSets is the string constant of infoschema charactersets memory table
    TableCharacterSets = "CHARACTER_SETS"
    // TableCollations is the string constant of infoschema collations memory table.
    TableCollations = "COLLATIONS"

    // CatalogVal is the string constant of TABLE_CATALOG.
    CatalogVal = "def"
    // TableProfiling is the string constant of infoschema table.
    TableProfiling = "PROFILING"
    // TablePartitions is the string constant of infoschema table.
    TablePartitions = "PARTITIONS"
    // TableKeyColumn is the string constant of KEY_COLUMN_USAGE.
    TableKeyColumn = "KEY_COLUMN_USAGE"

    // TableSessionVar is the string constant of SESSION_VARIABLES.
    TableSessionVar = "SESSION_VARIABLES"

    // TableConstraints is the string constant of TABLE_CONSTRAINTS.
    TableConstraints = "TABLE_CONSTRAINTS"

    // TableUserPrivileges is the string constant of infoschema user privilege table.
    TableUserPrivileges = "USER_PRIVILEGES"

    // TableEngines is the string constant of infoschema table.
    TableEngines = "ENGINES"
    // TableViews is the string constant of infoschema table.
    TableViews = "VIEWS"

    // TableCollationCharacterSetApplicability is the string constant of infoschema memory table.
    TableCollationCharacterSetApplicability = "COLLATION_CHARACTER_SET_APPLICABILITY"
    // TableProcesslist is the string constant of infoschema table.
    TableProcesslist = "PROCESSLIST"
    // TableTiDBIndexes is the string constant of infoschema table
    TableTiDBIndexes = "TIDB_INDEXES"
    // TableTiDBHotRegions is the string constant of infoschema table
    TableTiDBHotRegions = "TIDB_HOT_REGIONS"
    // TableTiKVStoreStatus is the string constant of infoschema table
    TableTiKVStoreStatus = "TIKV_STORE_STATUS"
    // TableAnalyzeStatus is the string constant of Analyze Status
    TableAnalyzeStatus = "ANALYZE_STATUS"
    // TableTiKVRegionStatus is the string constant of infoschema table
    TableTiKVRegionStatus = "TIKV_REGION_STATUS"
    // TableTiKVRegionPeers is the string constant of infoschema table
    TableTiKVRegionPeers = "TIKV_REGION_PEERS"
    // TableTiDBServersInfo is the string constant of TiDB server information table.
    TableTiDBServersInfo = "TIDB_SERVERS_INFO"
    // TableSlowQuery is the string constant of slow query memory table.
    TableSlowQuery = "SLOW_QUERY"
    // TableClusterInfo is the string constant of cluster info memory table.
    TableClusterInfo = "CLUSTER_INFO"
    // TableClusterConfig is the string constant of cluster configuration memory table.
    TableClusterConfig = "CLUSTER_CONFIG"
    // TableClusterLog is the string constant of cluster log memory table.
    TableClusterLog = "CLUSTER_LOG"
    // TableClusterLoad is the string constant of cluster load memory table.
    TableClusterLoad = "CLUSTER_LOAD"
    // TableClusterHardware is the string constant of cluster hardware table.
    TableClusterHardware = "CLUSTER_HARDWARE"
    // TableClusterSystemInfo is the string constant of cluster system info table.
    TableClusterSystemInfo = "CLUSTER_SYSTEMINFO"
    // TableTiFlashReplica is the string constant of tiflash replica table.
    TableTiFlashReplica = "TIFLASH_REPLICA"
    // TableInspectionResult is the string constant of inspection result table.
    TableInspectionResult = "INSPECTION_RESULT"
    // TableMetricTables is a table that contains all metrics table definition.
    TableMetricTables = "METRICS_TABLES"
    // TableMetricSummary is a summary table that contains all metrics.
    TableMetricSummary = "METRICS_SUMMARY"
    // TableMetricSummaryByLabel is a metric table that contains all metrics that group by label info.
    TableMetricSummaryByLabel = "METRICS_SUMMARY_BY_LABEL"
    // TableInspectionSummary is the string constant of inspection summary table.
    TableInspectionSummary = "INSPECTION_SUMMARY"
    // TableInspectionRules is the string constant of currently implemented inspection and summary rules.
    TableInspectionRules = "INSPECTION_RULES"
    // TableDDLJobs is the string constant of DDL job table.
    TableDDLJobs = "DDL_JOBS"
    // TableSequences is the string constant of all sequences created by user.
    TableSequences = "SEQUENCES"
    // TableStatementsSummary is the string constant of statement summary table.
    TableStatementsSummary = "STATEMENTS_SUMMARY"
    // TableStatementsSummaryHistory is the string constant of statements summary history table.
    TableStatementsSummaryHistory = "STATEMENTS_SUMMARY_HISTORY"
    // TableStorageStats is a table that contains all tables disk usage
    TableStorageStats = "TABLE_STORAGE_STATS"
    // TableTiFlashTables is the string constant of tiflash tables table.
    TableTiFlashTables = "TIFLASH_TABLES"
    // TableTiFlashSegments is the string constant of tiflash segments table.
    TableTiFlashSegments = "TIFLASH_SEGMENTS"
)
const (
    // PrimaryKeyType is the string constant of PRIMARY KEY.
    PrimaryKeyType = "PRIMARY KEY"
    // PrimaryConstraint is the string constant of PRIMARY.
    PrimaryConstraint = "PRIMARY"
    // UniqueKeyType is the string constant of UNIQUE.
    UniqueKeyType = "UNIQUE"
)

Variables

var (
    // ErrDatabaseExists returns for database already exists.
    ErrDatabaseExists = terror.ClassSchema.New(mysql.ErrDBCreateExists, mysql.MySQLErrName[mysql.ErrDBCreateExists])
    // ErrDatabaseDropExists returns for dropping a non-existent database.
    ErrDatabaseDropExists = terror.ClassSchema.New(mysql.ErrDBDropExists, mysql.MySQLErrName[mysql.ErrDBDropExists])
    // ErrAccessDenied return when the user doesn't have the permission to access the table.
    ErrAccessDenied = terror.ClassSchema.New(mysql.ErrAccessDenied, mysql.MySQLErrName[mysql.ErrAccessDenied])
    // ErrDatabaseNotExists returns for database not exists.
    ErrDatabaseNotExists = terror.ClassSchema.New(mysql.ErrBadDB, mysql.MySQLErrName[mysql.ErrBadDB])
    // ErrTableExists returns for table already exists.
    ErrTableExists = terror.ClassSchema.New(mysql.ErrTableExists, mysql.MySQLErrName[mysql.ErrTableExists])
    // ErrTableDropExists returns for dropping a non-existent table.
    ErrTableDropExists = terror.ClassSchema.New(mysql.ErrBadTable, mysql.MySQLErrName[mysql.ErrBadTable])
    // ErrSequenceDropExists returns for dropping a non-exist sequence.
    ErrSequenceDropExists = terror.ClassSchema.New(mysql.ErrUnknownSequence, mysql.MySQLErrName[mysql.ErrUnknownSequence])
    // ErrColumnNotExists returns for column not exists.
    ErrColumnNotExists = terror.ClassSchema.New(mysql.ErrBadField, mysql.MySQLErrName[mysql.ErrBadField])
    // ErrColumnExists returns for column already exists.
    ErrColumnExists = terror.ClassSchema.New(mysql.ErrDupFieldName, mysql.MySQLErrName[mysql.ErrDupFieldName])
    // ErrKeyNameDuplicate returns for index duplicate when rename index.
    ErrKeyNameDuplicate = terror.ClassSchema.New(mysql.ErrDupKeyName, mysql.MySQLErrName[mysql.ErrDupKeyName])
    // ErrNonuniqTable returns when none unique tables errors.
    ErrNonuniqTable = terror.ClassSchema.New(mysql.ErrNonuniqTable, mysql.MySQLErrName[mysql.ErrNonuniqTable])
    // ErrMultiplePriKey returns for multiple primary keys.
    ErrMultiplePriKey = terror.ClassSchema.New(mysql.ErrMultiplePriKey, mysql.MySQLErrName[mysql.ErrMultiplePriKey])
    // ErrTooManyKeyParts returns for too many key parts.
    ErrTooManyKeyParts = terror.ClassSchema.New(mysql.ErrTooManyKeyParts, mysql.MySQLErrName[mysql.ErrTooManyKeyParts])
    // ErrForeignKeyNotExists returns for foreign key not exists.
    ErrForeignKeyNotExists = terror.ClassSchema.New(mysql.ErrCantDropFieldOrKey, mysql.MySQLErrName[mysql.ErrCantDropFieldOrKey])
    // ErrTableNotLockedForWrite returns for write tables when only hold the table read lock.
    ErrTableNotLockedForWrite = terror.ClassSchema.New(mysql.ErrTableNotLockedForWrite, mysql.MySQLErrName[mysql.ErrTableNotLockedForWrite])
    // ErrTableNotLocked returns when session has explicitly lock tables, then visit unlocked table will return this error.
    ErrTableNotLocked = terror.ClassSchema.New(mysql.ErrTableNotLocked, mysql.MySQLErrName[mysql.ErrTableNotLocked])
    // ErrTableNotExists returns for table not exists.
    ErrTableNotExists = terror.ClassSchema.New(mysql.ErrNoSuchTable, mysql.MySQLErrName[mysql.ErrNoSuchTable])
    // ErrKeyNotExists returns for index not exists.
    ErrKeyNotExists = terror.ClassSchema.New(mysql.ErrKeyDoesNotExist, mysql.MySQLErrName[mysql.ErrKeyDoesNotExist])
    // ErrCannotAddForeign returns for foreign key exists.
    ErrCannotAddForeign = terror.ClassSchema.New(mysql.ErrCannotAddForeign, mysql.MySQLErrName[mysql.ErrCannotAddForeign])
    // ErrForeignKeyNotMatch returns for foreign key not match.
    ErrForeignKeyNotMatch = terror.ClassSchema.New(mysql.ErrWrongFkDef, mysql.MySQLErrName[mysql.ErrWrongFkDef])
    // ErrIndexExists returns for index already exists.
    ErrIndexExists = terror.ClassSchema.New(mysql.ErrDupIndex, mysql.MySQLErrName[mysql.ErrDupIndex])
    // ErrUserDropExists returns for dropping a non-existent user.
    ErrUserDropExists = terror.ClassSchema.New(mysql.ErrBadUser, mysql.MySQLErrName[mysql.ErrBadUser])
    // ErrUserAlreadyExists return for creating a existent user.
    ErrUserAlreadyExists = terror.ClassSchema.New(mysql.ErrUserAlreadyExists, mysql.MySQLErrName[mysql.ErrUserAlreadyExists])
    // ErrTableLocked returns when the table was locked by other session.
    ErrTableLocked = terror.ClassSchema.New(mysql.ErrTableLocked, mysql.MySQLErrName[mysql.ErrTableLocked])
    // ErrWrongObject returns when the table/view/sequence is not the expected object.
    ErrWrongObject = terror.ClassSchema.New(mysql.ErrWrongObject, mysql.MySQLErrName[mysql.ErrWrongObject])
)
var MetricTableMap = map[string]MetricTableDef{ /* 635 elements not displayed */

}

MetricTableMap records the metric table definition, export for test. TODO: read from system table.

var TableTiDBHotRegionsCols = []columnInfo{
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
}

TableTiDBHotRegionsCols is TiDB hot region mem table columns.

var TableTiKVRegionPeersCols = []columnInfo{
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
}

TableTiKVRegionPeersCols is TiKV region peers mem table columns.

var TableTiKVRegionStatusCols = []columnInfo{
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
}

TableTiKVRegionStatusCols is TiKV region status mem table columns.

var TableTiKVStoreStatusCols = []columnInfo{
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
    {/* contains filtered or unexported fields */},
}

TableTiKVStoreStatusCols is TiDB kv store status columns.

func AppendHostInfoToRows Uses

func AppendHostInfoToRows(rows [][]types.Datum) ([][]types.Datum, error)

AppendHostInfoToRows appends host info to the rows.

func ConvertCharsetCollateToLowerCaseIfNeed Uses

func ConvertCharsetCollateToLowerCaseIfNeed(tbInfo *model.TableInfo)

ConvertCharsetCollateToLowerCaseIfNeed convert the charset / collation of table and its columns to lower case, if the table's version is prior to TableInfoVersion3.

func ConvertOldVersionUTF8ToUTF8MB4IfNeed Uses

func ConvertOldVersionUTF8ToUTF8MB4IfNeed(tbInfo *model.TableInfo)

ConvertOldVersionUTF8ToUTF8MB4IfNeed convert old version UTF8 to UTF8MB4 if config.TreatOldVersionUTF8AsUTF8MB4 is enable.

func FormatVersion Uses

func FormatVersion(TiDBVersion string, isDefaultVersion bool) string

FormatVersion make TiDBVersion consistent to TiKV and PD. The default TiDBVersion is 5.7.25-TiDB-${TiDBReleaseVersion}.

func GenLabelConditionValues Uses

func GenLabelConditionValues(values set.StringSet) string

GenLabelConditionValues generates the label condition values.

func GetShardingInfo Uses

func GetShardingInfo(dbInfo *model.DBInfo, tableInfo *model.TableInfo) interface{}

GetShardingInfo returns a nil or description string for the sharding information of given TableInfo. The returned description string may be:

- "NOT_SHARDED": for tables that SHARD_ROW_ID_BITS is not specified.
- "NOT_SHARDED(PK_IS_HANDLE)": for tables of which primary key is row id.
- "PK_AUTO_RANDOM_BITS={bit_number}": for tables of which primary key is sharded row id.
- "SHARD_BITS={bit_number}": for tables that with SHARD_ROW_ID_BITS.

The returned nil indicates that sharding information is not suitable for the table(for example, when the table is a View). This function is exported for unit test.

func GetTiFlashStoreCount Uses

func GetTiFlashStoreCount(ctx sessionctx.Context) (cnt uint64, err error)

GetTiFlashStoreCount returns the count of tiflash server.

func HasAutoIncrementColumn Uses

func HasAutoIncrementColumn(tbInfo *model.TableInfo) (bool, string)

HasAutoIncrementColumn checks whether the table has auto_increment columns, if so, return true and the column name.

func IsMetricTable Uses

func IsMetricTable(lowerTableName string) bool

IsMetricTable uses to checks whether the table is a metric table.

func RegisterVirtualTable Uses

func RegisterVirtualTable(dbInfo *model.DBInfo, tableFromMeta tableFromMetaFunc)

RegisterVirtualTable register virtual tables to the builder.

type Builder Uses

type Builder struct {
    // contains filtered or unexported fields
}

Builder builds a new InfoSchema.

func NewBuilder Uses

func NewBuilder(handle *Handle) *Builder

NewBuilder creates a new Builder with a Handle.

func (*Builder) ApplyDiff Uses

func (b *Builder) ApplyDiff(m *meta.Meta, diff *model.SchemaDiff) ([]int64, error)

ApplyDiff applies SchemaDiff to the new InfoSchema. Return the detail updated table IDs that are produced from SchemaDiff and an error.

func (*Builder) Build Uses

func (b *Builder) Build()

Build sets new InfoSchema to the handle in the Builder.

func (*Builder) InitWithDBInfos Uses

func (b *Builder) InitWithDBInfos(dbInfos []*model.DBInfo, schemaVersion int64) (*Builder, error)

InitWithDBInfos initializes an empty new InfoSchema with a slice of DBInfo and schema version.

func (*Builder) InitWithOldInfoSchema Uses

func (b *Builder) InitWithOldInfoSchema() *Builder

InitWithOldInfoSchema initializes an empty new InfoSchema by copies all the data from old InfoSchema.

type Handle Uses

type Handle struct {
    // contains filtered or unexported fields
}

Handle handles information schema, including getting and setting.

func NewHandle Uses

func NewHandle(store kv.Storage) *Handle

NewHandle creates a new Handle.

func (*Handle) EmptyClone Uses

func (h *Handle) EmptyClone() *Handle

EmptyClone creates a new Handle with the same store and memSchema, but the value is not set.

func (*Handle) Get Uses

func (h *Handle) Get() InfoSchema

Get gets information schema from Handle.

func (*Handle) IsValid Uses

func (h *Handle) IsValid() bool

IsValid uses to check whether handle value is valid.

type InfoSchema Uses

type InfoSchema interface {
    SchemaByName(schema model.CIStr) (*model.DBInfo, bool)
    SchemaExists(schema model.CIStr) bool
    TableByName(schema, table model.CIStr) (table.Table, error)
    TableExists(schema, table model.CIStr) bool
    SchemaByID(id int64) (*model.DBInfo, bool)
    SchemaByTable(tableInfo *model.TableInfo) (*model.DBInfo, bool)
    TableByID(id int64) (table.Table, bool)
    AllocByID(id int64) (autoid.Allocators, bool)
    AllSchemaNames() []string
    AllSchemas() []*model.DBInfo
    Clone() (result []*model.DBInfo)
    SchemaTables(schema model.CIStr) []table.Table
    SchemaMetaVersion() int64
    // TableIsView indicates whether the schema.table is a view.
    TableIsView(schema, table model.CIStr) bool
    // TableIsSequence indicates whether the schema.table is a sequence.
    TableIsSequence(schema, table model.CIStr) bool
    FindTableByPartitionID(partitionID int64) (table.Table, *model.DBInfo)
}

InfoSchema is the interface used to retrieve the schema information. It works as a in memory cache and doesn't handle any schema change. InfoSchema is read-only, and the returned value is a copy. TODO: add more methods to retrieve tables and columns.

func GetInfoSchema Uses

func GetInfoSchema(ctx sessionctx.Context) InfoSchema

GetInfoSchema gets TxnCtx InfoSchema if snapshot schema is not set, Otherwise, snapshot schema is returned.

func GetInfoSchemaBySessionVars Uses

func GetInfoSchemaBySessionVars(sessVar *variable.SessionVars) InfoSchema

GetInfoSchemaBySessionVars gets TxnCtx InfoSchema if snapshot schema is not set, Otherwise, snapshot schema is returned.

func MockInfoSchema Uses

func MockInfoSchema(tbList []*model.TableInfo) InfoSchema

MockInfoSchema only serves for test.

func MockInfoSchemaWithSchemaVer Uses

func MockInfoSchemaWithSchemaVer(tbList []*model.TableInfo, schemaVer int64) InfoSchema

MockInfoSchemaWithSchemaVer only serves for test.

type MetricTableDef Uses

type MetricTableDef struct {
    PromQL   string
    Labels   []string
    Quantile float64
    Comment  string
}

MetricTableDef is the metric table define.

func GetMetricTableDef Uses

func GetMetricTableDef(lowerTableName string) (*MetricTableDef, error)

GetMetricTableDef gets the metric table define.

func (*MetricTableDef) GenPromQL Uses

func (def *MetricTableDef) GenPromQL(sctx sessionctx.Context, labels map[string]set.StringSet, quantile float64) string

GenPromQL generates the promQL.

type SchemasSorter Uses

type SchemasSorter []*model.DBInfo

SchemasSorter implements the sort.Interface interface, sorts DBInfo by name.

func (SchemasSorter) Len Uses

func (s SchemasSorter) Len() int

func (SchemasSorter) Less Uses

func (s SchemasSorter) Less(i, j int) bool

func (SchemasSorter) Swap Uses

func (s SchemasSorter) Swap(i, j int)

type ServerInfo Uses

type ServerInfo struct {
    ServerType     string
    Address        string
    StatusAddr     string
    Version        string
    GitHash        string
    StartTimestamp int64
}

ServerInfo represents the basic server information of single cluster component

func GetClusterServerInfo Uses

func GetClusterServerInfo(ctx sessionctx.Context) ([]ServerInfo, error)

GetClusterServerInfo returns all components information of cluster

func GetPDServerInfo Uses

func GetPDServerInfo(ctx sessionctx.Context) ([]ServerInfo, error)

GetPDServerInfo returns all PD nodes information of cluster

func GetStoreServerInfo Uses

func GetStoreServerInfo(ctx sessionctx.Context) ([]ServerInfo, error)

GetStoreServerInfo returns all store nodes(TiKV or TiFlash) cluster information

func GetTiDBServerInfo Uses

func GetTiDBServerInfo(ctx sessionctx.Context) ([]ServerInfo, error)

GetTiDBServerInfo returns all TiDB nodes information of cluster

type VirtualTable Uses

type VirtualTable struct{}

VirtualTable is a dummy table.Table implementation.

func (*VirtualTable) AddRecord Uses

func (vt *VirtualTable) AddRecord(ctx sessionctx.Context, r []types.Datum, opts ...table.AddRecordOption) (recordID kv.Handle, err error)

AddRecord implements table.Table AddRecord interface.

func (*VirtualTable) Allocators Uses

func (vt *VirtualTable) Allocators(_ sessionctx.Context) autoid.Allocators

Allocators implements table.Table Allocators interface.

func (*VirtualTable) Cols Uses

func (vt *VirtualTable) Cols() []*table.Column

Cols implements table.Table Cols interface.

func (*VirtualTable) DeletableIndices Uses

func (vt *VirtualTable) DeletableIndices() []table.Index

DeletableIndices implements table.Table DeletableIndices interface.

func (*VirtualTable) FirstKey Uses

func (vt *VirtualTable) FirstKey() kv.Key

FirstKey implements table.Table FirstKey interface.

func (*VirtualTable) FullHiddenColsAndVisibleCols Uses

func (vt *VirtualTable) FullHiddenColsAndVisibleCols() []*table.Column

FullHiddenColsAndVisibleCols implements table FullHiddenColsAndVisibleCols interface.

func (*VirtualTable) GetPhysicalID Uses

func (vt *VirtualTable) GetPhysicalID() int64

GetPhysicalID implements table.Table GetPhysicalID interface.

func (*VirtualTable) HiddenCols Uses

func (vt *VirtualTable) HiddenCols() []*table.Column

HiddenCols implements table.Table HiddenCols interface.

func (*VirtualTable) IndexPrefix Uses

func (vt *VirtualTable) IndexPrefix() kv.Key

IndexPrefix implements table.Table IndexPrefix interface.

func (*VirtualTable) Indices Uses

func (vt *VirtualTable) Indices() []table.Index

Indices implements table.Table Indices interface.

func (*VirtualTable) IterRecords Uses

func (vt *VirtualTable) IterRecords(ctx sessionctx.Context, startKey kv.Key, cols []*table.Column,
    _ table.RecordIterFunc) error

IterRecords implements table.Table IterRecords interface.

func (*VirtualTable) Meta Uses

func (vt *VirtualTable) Meta() *model.TableInfo

Meta implements table.Table Meta interface.

func (*VirtualTable) RebaseAutoID Uses

func (vt *VirtualTable) RebaseAutoID(ctx sessionctx.Context, newBase int64, isSetStep bool, tp autoid.AllocatorType) error

RebaseAutoID implements table.Table RebaseAutoID interface.

func (*VirtualTable) RecordKey Uses

func (vt *VirtualTable) RecordKey(h kv.Handle) kv.Key

RecordKey implements table.Table RecordKey interface.

func (*VirtualTable) RecordPrefix Uses

func (vt *VirtualTable) RecordPrefix() kv.Key

RecordPrefix implements table.Table RecordPrefix interface.

func (*VirtualTable) RemoveRecord Uses

func (vt *VirtualTable) RemoveRecord(ctx sessionctx.Context, h kv.Handle, r []types.Datum) error

RemoveRecord implements table.Table RemoveRecord interface.

func (*VirtualTable) Row Uses

func (vt *VirtualTable) Row(ctx sessionctx.Context, h kv.Handle) ([]types.Datum, error)

Row implements table.Table Row interface.

func (*VirtualTable) RowWithCols Uses

func (vt *VirtualTable) RowWithCols(ctx sessionctx.Context, h kv.Handle, cols []*table.Column) ([]types.Datum, error)

RowWithCols implements table.Table RowWithCols interface.

func (*VirtualTable) Seek Uses

func (vt *VirtualTable) Seek(ctx sessionctx.Context, h kv.Handle) (kv.Handle, bool, error)

Seek implements table.Table Seek interface.

func (*VirtualTable) Type Uses

func (vt *VirtualTable) Type() table.Type

Type implements table.Table Type interface.

func (*VirtualTable) UpdateRecord Uses

func (vt *VirtualTable) UpdateRecord(ctx context.Context, sctx sessionctx.Context, h kv.Handle, oldData, newData []types.Datum, touched []bool) error

UpdateRecord implements table.Table UpdateRecord interface.

func (*VirtualTable) VisibleCols Uses

func (vt *VirtualTable) VisibleCols() []*table.Column

VisibleCols implements table.Table VisibleCols interface.

func (*VirtualTable) WritableCols Uses

func (vt *VirtualTable) WritableCols() []*table.Column

WritableCols implements table.Table WritableCols interface.

func (*VirtualTable) WritableIndices Uses

func (vt *VirtualTable) WritableIndices() []table.Index

WritableIndices implements table.Table WritableIndices interface.

Directories

PathSynopsis
perfschema

Package infoschema imports 36 packages (graph) and is imported by 391 packages. Updated 2020-09-20. Refresh now. Tools for package owners.