cql3: remove query_options::linearize and _temporaries
query_options::linearize was the only user of _temporaries helper attribute, and it turns out that this function is never used - - and is therefore removed.
This commit is contained in:
@@ -161,23 +161,6 @@ query_options::query_options(std::vector<cql3::raw_value> values)
|
||||
db::consistency_level::ONE, infinite_timeout_config, std::move(values))
|
||||
{}
|
||||
|
||||
bytes_view query_options::linearize(fragmented_temporary_buffer::view view) const
|
||||
{
|
||||
if (view.empty()) {
|
||||
return { };
|
||||
} else if (std::next(view.begin()) == view.end()) {
|
||||
return *view.begin();
|
||||
} else {
|
||||
auto ptr = _temporaries.write_place_holder(view.size_bytes());
|
||||
auto dst = ptr;
|
||||
using boost::range::for_each;
|
||||
for_each(view, [&] (bytes_view bv) {
|
||||
dst = std::copy(bv.begin(), bv.end(), dst);
|
||||
});
|
||||
return bytes_view(ptr, view.size_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
void query_options::prepare(const std::vector<lw_shared_ptr<column_specification>>& specs)
|
||||
{
|
||||
if (!_names) {
|
||||
|
||||
@@ -79,7 +79,6 @@ private:
|
||||
const std::optional<std::vector<sstring_view>> _names;
|
||||
std::vector<cql3::raw_value> _values;
|
||||
std::vector<cql3::raw_value_view> _value_views;
|
||||
mutable bytes_ostream _temporaries;
|
||||
const bool _skip_metadata;
|
||||
const specific_options _options;
|
||||
cql_serialization_format _cql_serialization_format;
|
||||
@@ -178,8 +177,6 @@ public:
|
||||
return _value_views.size();
|
||||
}
|
||||
|
||||
bytes_view linearize(fragmented_temporary_buffer::view) const;
|
||||
|
||||
bool skip_metadata() const {
|
||||
return _skip_metadata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user