mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
cql3: add specified is_satisfied_by to multi-column restriction
Multi-column restrictions need only schema, clustering key and query options in order to decide if they are satisfied, so an overloaded function that takes reduced number of parameters is added.
This commit is contained in:
@@ -101,6 +101,10 @@ public:
|
||||
const row& cells,
|
||||
const query_options& options,
|
||||
gc_clock::time_point now) const override {
|
||||
return is_satisfied_by(schema, ckey, options);
|
||||
}
|
||||
|
||||
bool is_satisfied_by(const schema& schema, const clustering_key_prefix& ckey, const query_options& options) const {
|
||||
return boost::algorithm::any_of(bounds_ranges(options), [&ckey, &schema] (const bounds_range_type& range) {
|
||||
return range.contains(query::clustering_range(ckey), clustering_key_prefix::prefix_equal_tri_compare(schema));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user