mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
transport/server: Add read_string_list() helper
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
@@ -234,6 +234,7 @@ private:
|
||||
bytes_opt read_value(temporary_buffer<char>& buf);
|
||||
sstring_view read_long_string_view(temporary_buffer<char>& buf);
|
||||
void read_name_and_value_list(temporary_buffer<char>& buf, std::vector<sstring>& names, std::vector<bytes_opt>& values);
|
||||
void read_string_list(temporary_buffer<char>& buf, std::vector<sstring>& strings);
|
||||
void read_value_list(temporary_buffer<char>& buf, std::vector<bytes_opt>& values);
|
||||
db::consistency_level read_consistency(temporary_buffer<char>& buf);
|
||||
std::unordered_map<sstring, sstring> read_string_map(temporary_buffer<char>& buf);
|
||||
@@ -1119,6 +1120,14 @@ void cql_server::connection::read_name_and_value_list(temporary_buffer<char>& bu
|
||||
}
|
||||
}
|
||||
|
||||
void cql_server::connection::read_string_list(temporary_buffer<char>& buf, std::vector<sstring>& strings) {
|
||||
uint16_t size = read_unsigned_short(buf);
|
||||
strings.reserve(size);
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
strings.emplace_back(read_string(buf));
|
||||
}
|
||||
}
|
||||
|
||||
void cql_server::connection::read_value_list(temporary_buffer<char>& buf, std::vector<bytes_opt>& values) {
|
||||
uint16_t size = read_unsigned_short(buf);
|
||||
values.reserve(size);
|
||||
|
||||
Reference in New Issue
Block a user