package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
AllocAutoIncrementValue allocates an auto_increment value for a new row.
AllocBatchAutoIncrementValue allocates batch auto_increment value for rows, returning firstID, increment and err.
CastColumnValue casts a value based on column type with expression BuildContext.
CastValue casts a value based on column type.
CheckNoDefaultValueForInsert checks if the column has no default value before insert data.
CheckOnce checks if there are duplicated column names in cols.
CheckRowConstraint verify row check constraints.
CheckRowConstraintWithDatum verify row check constraints.
ColDescFieldNames returns the fields name in result set for desc and show columns.
ContainsAutoIncrementCol checks if there is auto-increment col in given cols.
EvalColDefaultExpr eval default expr node to explicit default value.
FillVirtualColumnValue will calculate the virtual column value by evaluating generated expression using rows from a chunk, and then fill this value into the chunk.
FindCol finds column in cols by name.
FindColLowerCase finds column in cols by name.
FindCols finds columns in cols by names.
FindColumns finds columns in cols by names with a better performance than FindCols().
FindOnUpdateCols finds columns which have OnUpdateNow flag.
GetColDefaultValue gets default value of the column.
GetColOriginDefaultValue gets default value of the column from original default value.
GetColOriginDefaultValueWithoutStrictSQLMode gets default value of the column from original default value with Strict SQL mode.
GetZeroValue gets zero value for given column type.
HasForeignKeyRefAction checks if there is foreign key with referential action in check constraints.
IfCheckConstraintExprBoolType checks whether the check expression is bool type.
IsSupportedExpr checks whether the check constraint expression is allowed.
LoadCheckConstraint load check constraint.
NewAddRecordOpt creates a new AddRecordOpt with options.
NewClonableExprNode creates a ClonableExprNode.
NewColDesc returns a new ColDesc for a column.
NewCreateIdxOpt creates a new CreateIdxOpt.
NewMultiValueIndexKVGenerator creates a new IndexKVGenerator for multi-value indexes.
NewPlainIndexKVGenerator creates a new IndexKVGenerator for non multi-value indexes.
NewRemoveRecordOpt creates a new RemoveRecordOpt with options.
NewUpdateRecordOpt creates a new UpdateRecordOpt with options.
OptionalFsp convert a FieldType.GetDecimal() to string.
ToColumn converts a *model.ColumnInfo to *Column.
ToConstraint converts model.ConstraintInfo to Constraint.
WithCtx returns a CommonMutateOptFunc.
# Constants
ClusterTable contains the `VirtualTable` in the all cluster tidb nodes.
DupKeyCheckInAcquireLock indicates to check the duplicated key when acquiring the pessimistic lock.
DupKeyCheckInPlace indicates to check the duplicated key in place, both in the memory buffer and storage.
DupKeyCheckInPrewrite indicates to check the duplicated key in the prewrite step when committing.
DupKeyCheckLazy indicates to check the duplicated key lazily.
DupKeyCheckSkip indicates skipping the duplicated key check.
NormalTable stores data in tikv, mocktikv and so on.
VirtualTable stores no data, just extract data from the memory struct.
# Variables
ErrCheckConstraintViolated return when check constraint is violated.
ErrColumnCantNull is used for inserting null to a not null column.
ErrColumnStateCantNone returns for column none state.
ErrColumnStateNonPublic returns for column non-public state.
ErrIndexOutBound returns for index column offset out of bound.
ErrIndexStateCantNone returns for index none state.
ErrInvalidRecordKey returns for invalid record key.
ErrLockOrActiveTransaction returns when execute unsupported statement in a lock session or an active transaction.
ErrNoDefaultValue is used when insert a row, the column value is not given, and the column has not null flag and it doesn't have a default value.
ErrNoPartitionForGivenValue returns table has no partition for value.
ErrOptOnCacheTable returns when exec unsupported opt at cache mode.
ErrRowDoesNotMatchGivenPartitionSet returns when the destination partition conflict with the partition selection.
ErrRowNotFound returns for row not found.
ErrSequenceHasRunOut returns when sequence has run out.
ErrTableStateCantNone returns for table none state.
ErrTempTableFull returns a table is full error, it's used by temporary table now.
ErrTruncatedWrongValueForField returns for truncate wrong value for field.
ErrUnknownColumn is returned when accessing an unknown column.
ErrUnknownPartition returns unknown partition error.
ErrUnsupportedOp returns for unsupported operation.
ErrWarnNullToNotnull is like ErrColumnCantNull but it's used in LOAD DATA.
FromBackfill indicates that the index is created by DDL backfill worker.
IsUpdate is a defined value for AddRecordOptFunc.
MockTableFromMeta only serves for test.
SkipWriteUntouchedIndices is an option to skip write untouched options when updating a record.
TableFromMeta builds a table.Table from *model.TableInfo.
WithIgnoreAssertion uses to indicate the process can ignore assertion.
# Structs
AddRecordOpt contains the options will be used when adding a record.
ClonableExprNode is a wrapper for ast.ExprNode.
ColDesc describes column information like MySQL desc and show columns do.
Column provides meta data describing a table column.
ColumnsSizeHelper records the column size information.
Constraint provides meta and map dependency describing a table constraint.
CreateIdxOpt contains the options will be used when creating an index.
ExtraPartialRowOption is the combined one of IndexesLayout and ColumnSizeOption.
IndexKVGenerator generates kv for an index.
RemoveRecordOpt contains the options will be used when removing a record.
UpdateRecordOpt contains the options will be used when updating a record.
# Interfaces
AddRecordOption is defined for the AddRecord() method of the Table interface.
CachedTable is a Table, and it has a UpdateLockForRead() method UpdateLockForRead() according to the reasons for not meeting the read conditions, update the lock information, And at the same time reload data from the original table.
CreateIdxOption is defined for the Create() method of the Index interface.
Index is the interface for index data on KV store.
IndexIterator is the interface for iterator of index data on KV store.
PartitionedTable is a Table, and it has a GetPartition() method.
PhysicalTable is an abstraction for two kinds of table representation: partition or non-partitioned table.
RemoveRecordOption is defined for the RemoveRecord() method of the Table interface.
Table is used to retrieve and modify rows in table.
UpdateRecordOption is defined for the UpdateRecord() method of the Table interface.
# Type aliases
AllocatorContext is used to provide context for method `table.Allocators`.
CommonMutateOptFunc is a function to provide common options for mutating a table.
DupKeyCheckMode indicates how to check the duplicated key when adding/updating a record/index.
IndexesLayout is used to specify the layout of the indexes.
IndexRowLayoutOption is the option for index row layout.
MutateContext is used to when mutating a table.
PessimisticLazyDupKeyCheckMode only takes effect for pessimistic transaction when `DupKeyCheckMode` is set to `DupKeyCheckLazy`.
RecordIterFunc is used for low-level record iteration.
Type is used to distinguish between different tables that store data in different ways.
WithReserveAutoIDHint tells the AddRecord operation to reserve a batch of auto ID in the stmtctx.