mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 12:36:56 +00:00
partition_snapshot_row-cursor: Add const consume_row() version
It's the same as the existing one, but doesn't modify anything (cursor and pointing rows_entry's) and calls consumer with const row reference. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -371,6 +371,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Can be called only when cursor is valid and pointing at a row.
|
||||
template <typename Consumer>
|
||||
requires std::is_invocable_v<Consumer, const deletable_row&>
|
||||
void consume_row(Consumer&& consumer) const {
|
||||
for (const position_in_version& v : _current_row) {
|
||||
consumer(v.it->row());
|
||||
}
|
||||
}
|
||||
|
||||
// Returns memory footprint of row entries under the cursor.
|
||||
// Can be called only when cursor is valid and pointing at a row.
|
||||
size_t memory_usage() const {
|
||||
|
||||
Reference in New Issue
Block a user