// 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 ScanSnapshotTableRecord(store kv.Storage, ver kv.Version, t table.Table, startHandle, limit int64) ( []*RecordData, int64, error) { snap, err := store.GetSnapshot(ver) if err != nil { return nil, 0, errors.Trace(err) } records, nextHandle, err := ScanTableRecord(snap, t, startHandle, limit) return records, nextHandle, errors.Trace(err) }