package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
AllocHandle allocate a new handle.
AllocHandleIDs allocates n handle ids (_tidb_rowid), and caches the range in the table.MutateContext.
BuildFieldTypesForIndexColumns builds the index columns field types.
BuildPartitionTableScanFromInfos build tipb.PartitonTableScan with *model.TableInfo and *model.ColumnInfo.
BuildRowcodecColInfoForIndexColumns builds []rowcodec.ColInfo for the given index.
BuildTableScanFromInfos build tipb.TableScan with *model.TableInfo and *model.ColumnInfo.
CanSkip is for these cases, we can skip the columns in encoded row: 1.
CheckDataConsistency checks whether the given set of mutations corresponding to a single row is consistent.
CompareIndexAndVal compare index valued and row value.
ConvertDatumToTailSpaceCount converts a string datum to an int datum that represents the tail space count.
DecodeRawRowData decodes raw row data into a datum slice and a (columnID:columnValue) map.
FetchDuplicatedHandle is used to find the duplicated row's handle for a given unique index key.
FindChangingCol finds the changing column in idxInfo.
FindIndexByColName returns a public table index containing only one column named `name`.
FindPartitionByName finds partition in table meta by name.
FindPrimaryIndex uses to find primary index in tableInfo.
GenIndexValueFromIndex generate index value from index.
GenTempIdxKeyByState is used to get the key version and the temporary key.
GetChangingColVal gets the changing column value when executing "modify/change column" statement.
GetColDefaultValue gets a column default value.
GetReorganizedPartitionedTable returns the same table but only with the AddingDefinitions used.
GetWritableIndexByName gets the index meta from the table by the index name.
IsIndexWritable check whether the index is writable.
IterRecords iterates records in the table and calls fn.
MockTableFromMeta only serves for test.
NeedRestoredData checks whether the index columns needs restored data.
NewIndex builds a new Index object.
NewListPartitionLocationHelper returns a new listPartitionLocationHelper.
NewPartitionExprBuildCtx returns a context to build partition expression.
NewPartitionTableWithGivenSets creates a new partition table from a partition table.
NewStateRemote creates a StateRemote object.
OverflowShardBits checks whether the recordID overflow `1<<(typeBitsLength-shardRowIDBits-1) -1`.
PartitionRecordKey is exported for test.
PrimaryPrefixColumnIDs get prefix column ids in primary key.
RowWithCols is used to get the corresponding column datum values with the given handle.
SetPBColumnsDefaultValue sets the default values of tipb.ColumnInfo.
SwapReorgPartFields swaps the reorganizePartitions field of two partitioned tables.
TableFromMeta creates a Table instance from model.TableInfo.
TempTableFromMeta builds a TempTable from model.TableInfo.
TryAppendCommonHandleRowcodecColInfos tries to append common handle columns to `colInfo`.
TryGetCommonPkColumnIds get the IDs of primary key column if the table has common handle.
TryGetCommonPkColumns get the primary key columns if the table has common handle.
TryGetHandleRestoredDataWrapper tries to get the restored data for handle if needed.
TryTruncateRestoredData tries to truncate index values.
# Constants
CachedTableLockIntend is the write INTEND, it exists when the changing READ to WRITE, and the READ lock lease is not expired..
CachedTableLockNone means there is no lock.
CachedTableLockRead is the READ lock type.
CachedTableLockWrite is the WRITE lock type.
# Variables
ErrInconsistentHandle is the error when the handle in the row/index insertions does not match.
ErrInconsistentIndexedValue is the error when decoded values from the index mutation cannot match row value.
ErrInconsistentRowValue is the error when values in a row insertion does not match the expected ones.
TestMockRenewLeaseABA2 is used by test function TestRenewLeaseABAFailPoint.
# Structs
ForKeyPruning is used for key partition pruning.
ForListColumnPruning is used for list columns partition pruning.
ForListPruning is used for list partition pruning.
ForRangeColumnsPruning is used for range partition pruning.
ForRangePruning is used for range partition pruning.
ListPartitionGroup indicate the group index of the column value in a partition.
PartitionExpr is the partition definition expressions.
TableCommon is shared by both Table and partition.
TemporaryTable is used to store transaction-specific or session-specific information for global / local temporary tables.
# Interfaces
StateRemote is the interface to control the remote state of the cached table's lock meta information.
# Type aliases
CachedTableLockType define the lock type for cached table.
ListPartitionLocation indicate the partition location for the column value in list columns partition.