From 3c08ffb275139442e24cfe9d40909b1a3d09c3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Thu, 23 Jun 2016 13:28:34 +0100 Subject: [PATCH] query: add full_slice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit query::full_slice is a partiton slice which has full clustering row ranges for all partition keys and no per-partition row limit. Options and columns are not set. It is used as a helper object in cases when a reference to partition_slice is needed but the user code needs just all data there is (an example of such case would be sstable compaction). Signed-off-by: Paweł Dziepak --- query-request.hh | 4 ++++ query.cc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/query-request.hh b/query-request.hh index 0cd444ce67..d76c9bcb68 100644 --- a/query-request.hh +++ b/query-request.hh @@ -157,6 +157,10 @@ public: constexpr auto max_partitions = std::numeric_limits::max(); +// This is a partition slice which a full clustering row range and maximum +// per-partition row limit. No options or columns are set. +extern const query::partition_slice full_slice; + // Full specification of a query to the database. // Intended for passing across replicas. // Can be accessed across cores. diff --git a/query.cc b/query.cc index 8ab7b58d59..2b1d1b4b05 100644 --- a/query.cc +++ b/query.cc @@ -34,6 +34,8 @@ namespace query { const partition_range full_partition_range = partition_range::make_open_ended_both_sides(); +const query::partition_slice full_slice = query::partition_slice({ query::clustering_range::make_open_ended_both_sides() }, { }, { }, { }); + std::ostream& operator<<(std::ostream& out, const specific_ranges& s); std::ostream& operator<<(std::ostream& out, const partition_slice& ps) {