Documentation ¶
Index ¶
- func CompareIndexData(txn kv.Transaction, t table.Table, idx table.Index) error
- func CompareTableRecord(txn kv.Transaction, t table.Table, data []*RecordData, exact bool) error
- func GetIndexRecordsCount(txn kv.Transaction, kvIndex table.Index, startVals []types.Datum) (int64, error)
- func GetTableRecordsCount(txn kv.Transaction, t table.Table, startHandle int64) (int64, error)
- type DDLInfo
- type RecordData
- func ScanIndexData(txn kv.Transaction, kvIndex table.Index, startVals []types.Datum, limit int64) ([]*RecordData, []types.Datum, error)
- func ScanSnapshotTableRecord(store kv.Storage, ver kv.Version, t table.Table, startHandle, limit int64) ([]*RecordData, int64, error)
- func ScanTableRecord(retriever kv.Retriever, t table.Table, startHandle, limit int64) ([]*RecordData, int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareIndexData ¶
CompareIndexData compares index data one by one. It returns nil if the data from the index is equal to the data from the table columns, otherwise it returns an error with a different set of records.
func CompareTableRecord ¶
func CompareTableRecord(txn kv.Transaction, t table.Table, data []*RecordData, exact bool) error
CompareTableRecord compares data and the corresponding table data one by one. It returns nil if data is equal to the data that scans from table, otherwise it returns an error with a different set of records. If exact is false, only compares handle.
func GetIndexRecordsCount ¶
func GetIndexRecordsCount(txn kv.Transaction, kvIndex table.Index, startVals []types.Datum) (int64, error)
GetIndexRecordsCount returns the total number of the index records from startVals. If startVals = nil, returns the total number of the index records.
func GetTableRecordsCount ¶
GetTableRecordsCount returns the total number of table records from startHandle. If startHandle = 0, returns the total number of table records.
Types ¶
type DDLInfo ¶
type DDLInfo struct { SchemaVer int64 ReorgHandle int64 // it's only used for DDL information. Owner *model.Owner Job *model.Job }
DDLInfo is for DDL information.
func GetBgDDLInfo ¶
func GetBgDDLInfo(txn kv.Transaction) (*DDLInfo, error)
GetBgDDLInfo returns background DDL information.
func GetDDLInfo ¶
func GetDDLInfo(txn kv.Transaction) (*DDLInfo, error)
GetDDLInfo returns DDL information.
type RecordData ¶
RecordData is the record data composed of a handle and values.
func ScanIndexData ¶
func ScanIndexData(txn kv.Transaction, kvIndex table.Index, startVals []types.Datum, limit int64) ( []*RecordData, []types.Datum, error)
ScanIndexData scans the index handles and values in a limited number, according to the index information. It returns data and the next startVals until it doesn't have data, then returns data is nil and the next startVals is the values which can't get data. If startVals = nil and limit = -1, it returns the index data of the whole.
func ScanSnapshotTableRecord ¶
func ScanSnapshotTableRecord(store kv.Storage, ver kv.Version, t table.Table, startHandle, limit int64) ( []*RecordData, int64, error)
ScanSnapshotTableRecord scans the ver version of the table data in a limited number. It returns data and the next startHandle until it doesn't have data, then returns data is nil and the next startHandle is the handle which can't get data. If startHandle = 0 and limit = -1, it returns the table data of the whole.
func ScanTableRecord ¶
func ScanTableRecord(retriever kv.Retriever, t table.Table, startHandle, limit int64) ( []*RecordData, int64, error)
ScanTableRecord scans table row handles and column values in a limited number. It returns data and the next startHandle until it doesn't have data, then returns data is nil and the next startHandle is the handle which can't get data. If startHandle = 0 and limit = -1, it returns the table data of the whole.