mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 00:13:31 +00:00
cql3: restore indentation
This commit is contained in:
@@ -785,29 +785,29 @@ bool single_column_restriction::contains::is_satisfied_by(bytes_view collection_
|
||||
if (!fragmented_val) {
|
||||
continue;
|
||||
}
|
||||
return with_linearized(*fragmented_val, [&] (bytes_view val) {
|
||||
auto exists_in = [&](auto&& range) {
|
||||
auto found = std::find_if(range.begin(), range.end(), [&] (auto&& element) {
|
||||
return element_type->compare(element.serialize(), val) == 0;
|
||||
});
|
||||
return found != range.end();
|
||||
};
|
||||
if (col_type->is_list()) {
|
||||
if (!exists_in(value_cast<list_type_impl::native_type>(deserialized))) {
|
||||
return false;
|
||||
return with_linearized(*fragmented_val, [&] (bytes_view val) {
|
||||
auto exists_in = [&](auto&& range) {
|
||||
auto found = std::find_if(range.begin(), range.end(), [&] (auto&& element) {
|
||||
return element_type->compare(element.serialize(), val) == 0;
|
||||
});
|
||||
return found != range.end();
|
||||
};
|
||||
if (col_type->is_list()) {
|
||||
if (!exists_in(value_cast<list_type_impl::native_type>(deserialized))) {
|
||||
return false;
|
||||
}
|
||||
} else if (col_type->is_set()) {
|
||||
if (!exists_in(value_cast<set_type_impl::native_type>(deserialized))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
auto data_map = value_cast<map_type_impl::native_type>(deserialized);
|
||||
if (!exists_in(data_map | boost::adaptors::transformed([] (auto&& p) { return p.second; }))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (col_type->is_set()) {
|
||||
if (!exists_in(value_cast<set_type_impl::native_type>(deserialized))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
auto data_map = value_cast<map_type_impl::native_type>(deserialized);
|
||||
if (!exists_in(data_map | boost::adaptors::transformed([] (auto&& p) { return p.second; }))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
if (col_type->is_map()) {
|
||||
auto& data_map = value_cast<map_type_impl::native_type>(deserialized);
|
||||
|
||||
Reference in New Issue
Block a user