Cursor-based scan: iterate entries starting from `cursor_idx`. Returns `(entries, next_cursor)`. `entries` contains up to `count` non-expired `(key, value)` pairs. `next_cursor` is `0` if the scan is complete, otherwise the next slot index to resume from. Scans the primary table first, then the rehash source (if active). Optionally filters keys by a glob-like prefix pattern.
(
&self,
cursor_idx: usize,
count: usize,
now_ms: u64,
match_pattern: Option<&str>,
)
| 43 | /// Scans the primary table first, then the rehash source (if active). |
| 44 | /// Optionally filters keys by a glob-like prefix pattern. |
| 45 | pub fn scan( |
| 46 | &self, |
| 47 | cursor_idx: usize, |
| 48 | count: usize, |
| 49 | now_ms: u64, |
| 50 | match_pattern: Option<&str>, |
| 51 | ) -> ScanBatch<'_> { |
| 52 | let (rows, next) = self.scan_with_surrogate(cursor_idx, count, now_ms, match_pattern); |
| 53 | (rows.into_iter().map(|(k, v, _)| (k, v)).collect(), next) |
| 54 | } |
| 55 | |
| 56 | /// Like [`scan`], but surfaces each row's surrogate alongside its |
| 57 | /// key/value so a caller can filter by clone snapshot-isolation |