diff --git a/partition_snapshot_row_cursor.hh b/partition_snapshot_row_cursor.hh index 8807ecf9ba..571ebd3c7a 100644 --- a/partition_snapshot_row_cursor.hh +++ b/partition_snapshot_row_cursor.hh @@ -371,6 +371,15 @@ public: } } + // Can be called only when cursor is valid and pointing at a row. + template + requires std::is_invocable_v + 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 {