From 11191b7aef14822becc7ecdbb59c2af2d9080719 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 2 Jun 2017 15:04:33 +0200 Subject: [PATCH] streamed_mutation: Introduce make_empty_streamed_mutation() --- streamed_mutation.cc | 4 ++++ streamed_mutation.hh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/streamed_mutation.cc b/streamed_mutation.cc index e45aaa80ea..cd908ce771 100644 --- a/streamed_mutation.cc +++ b/streamed_mutation.cc @@ -154,6 +154,10 @@ std::ostream& operator<<(std::ostream& os, const mutation_fragment& mf) { return os; } +streamed_mutation make_empty_streamed_mutation(schema_ptr s, dht::decorated_key key, streamed_mutation::forwarding fwd) { + return streamed_mutation_from_mutation(mutation(std::move(key), std::move(s)), fwd); +} + streamed_mutation streamed_mutation_from_mutation(mutation m, streamed_mutation::forwarding fwd) { class reader final : public streamed_mutation::impl { diff --git a/streamed_mutation.hh b/streamed_mutation.hh index 805b207fd2..c493f85979 100644 --- a/streamed_mutation.hh +++ b/streamed_mutation.hh @@ -531,6 +531,8 @@ streamed_mutation streamed_mutation_returning(schema_ptr, dht::decorated_key, st streamed_mutation merge_mutations(std::vector); streamed_mutation reverse_streamed_mutation(streamed_mutation); +streamed_mutation make_empty_streamed_mutation(schema_ptr, dht::decorated_key, streamed_mutation::forwarding fwd = streamed_mutation::forwarding::no); + // range_tombstone_stream is a helper object that simplifies producing a stream // of range tombstones and merging it with a stream of clustering rows. // Tombstones are added using apply() and retrieved using get_next().