mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
mutation_partition: Add r-value variant of clustered_row()
This commit is contained in:
@@ -161,6 +161,17 @@ mutation_partition::find_row(const clustering_key& key) const {
|
||||
return &i->row().cells;
|
||||
}
|
||||
|
||||
deletable_row&
|
||||
mutation_partition::clustered_row(clustering_key&& key) {
|
||||
auto i = _rows.find(key);
|
||||
if (i == _rows.end()) {
|
||||
auto e = new rows_entry(std::move(key));
|
||||
_rows.insert(i, *e);
|
||||
return e->row();
|
||||
}
|
||||
return i->row();
|
||||
}
|
||||
|
||||
deletable_row&
|
||||
mutation_partition::clustered_row(const clustering_key& key) {
|
||||
auto i = _rows.find(key);
|
||||
|
||||
@@ -205,6 +205,7 @@ public:
|
||||
const row& static_row() const { return _static_row; }
|
||||
const row_tombstones_type& row_tombstones() const { return _row_tombstones; }
|
||||
deletable_row& clustered_row(const clustering_key& key);
|
||||
deletable_row& clustered_row(clustering_key&& key);
|
||||
deletable_row& clustered_row(const schema& s, const clustering_key_view& key);
|
||||
const row* find_row(const clustering_key& key) const;
|
||||
const rows_entry* find_entry(schema_ptr schema, const clustering_key_prefix& key) const;
|
||||
|
||||
Reference in New Issue
Block a user