mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
position_in_partition: Make printable
This commit is contained in:
@@ -37,6 +37,20 @@ operator<<(std::ostream& os, const static_row& row) {
|
||||
return os << "{static_row: "<< row._cells << "}";
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, position_in_partition_view pos) {
|
||||
out << "{position: " << pos._bound_weight << ":";
|
||||
if (pos._ck) {
|
||||
out << *pos._ck;
|
||||
} else {
|
||||
out << "null";
|
||||
}
|
||||
return out << "}";
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const position_in_partition& pos) {
|
||||
return out << static_cast<position_in_partition_view>(pos);
|
||||
}
|
||||
|
||||
mutation_fragment::mutation_fragment(static_row&& r)
|
||||
: _kind(kind::static_row), _data(std::make_unique<data>())
|
||||
{
|
||||
|
||||
@@ -321,6 +321,8 @@ public:
|
||||
: _ck(&ck) { }
|
||||
position_in_partition_view(range_tag_t, bound_view bv)
|
||||
: _bound_weight(weight(bv.kind)), _ck(&bv.prefix) { }
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, position_in_partition_view);
|
||||
};
|
||||
|
||||
class position_in_partition {
|
||||
@@ -438,6 +440,7 @@ public:
|
||||
return compare(a, b);
|
||||
}
|
||||
};
|
||||
friend std::ostream& operator<<(std::ostream&, const position_in_partition&);
|
||||
};
|
||||
|
||||
inline position_in_partition_view static_row::position() const
|
||||
|
||||
Reference in New Issue
Block a user