package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
EvalExpireTime returns the expired time.
GetASCIIPrefixDatumFromBytes is used to convert bytes to string datum which only contains ASCII prefix string.
GetNextBytesHandleDatum is used for a table with one binary or string column common handle.
GetNextIntDatumFromCommonHandle is used for common handle tables with int value.
GetNextIntHandle is used for int handle tables.
InsertIntoTTLTask returns an SQL statement to insert a ttl task into mysql.tidb_ttl_task.
NewBasePhysicalTable create a new PhysicalTable with specific timeColumn.
NewInfoSchemaCache creates the cache for info schema.
NewPhysicalTable create a new PhysicalTable.
NewTableStatusCache creates cache for ttl table status.
PeekWaitingTTLTask returns an SQL statement to get `limit` waiting ttl task.
RowToTableStatus converts a row to table status.
RowToTTLTask converts a row into TTL task.
SelectFromTTLTableStatusWithID returns an SQL statement to get the table status from table id.
SelectFromTTLTaskWithID returns an SQL statement to get all tasks of the specified job and scanID in mysql.tidb_ttl_task.
SelectFromTTLTaskWithJobID returns an SQL statement to get all tasks of the specified job in mysql.tidb_ttl_task.
SetMockExpireTime can only used in test.
# Constants
JobStatusCancelled means this job has been canceled successfully.
JobStatusCancelling means this job is being canceled, but not canceled yet.
JobStatusFinished means job has been finished.
JobStatusRunning means this job is running.
JobStatusTimeout means this job has timeout.
JobStatusWaiting means the job hasn't started.
TaskStatusFinished means this task has finished.
TaskStatusRunning means this task is running.
TaskStatusWaiting means the task hasn't started.
# Structs
InfoSchemaCache is the cache for InfoSchema, it builds a map from physical table id to physical table information.
PhysicalTable is used to provide some information for a physical table in TTL job.
ScanRange is the range to scan.
TableStatus contains the corresponding information in the system table `mysql.tidb_ttl_table_status`.
TableStatusCache is the cache for ttl table status, it builds a map from physical table id to the table status.
TTLTask is a row recorded in mysql.tidb_ttl_task.
TTLTaskState records the internal states of the ttl task.
# Type aliases
JobStatus represents the current status of a job.
TaskStatus represents the current status of a task.