MCPcopy Create free account
hub / github.com/apache/kvrocks / Array

Function Array

src/server/redis_reply.h:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71template <typename Con>
72std::string Array(const Con &list) {
73 size_t total_size =
74 std::accumulate(list.begin(), list.end(), 0, [](size_t n, const auto &s) { return n + s.size(); });
75 std::string result = MultiLen(list.size());
76 result.reserve(result.size() + total_size);
77 for (const auto &i : list) result += i;
78 return result;
79}
80template <typename T>
81std::string Array(std::initializer_list<T> list) {
82 return Array<std::initializer_list<T>>(list);

Callers 15

ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
GenerateOutputMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
GenerateOutputMethod · 0.85
ToRespFormatMethod · 0.85
ExecuteMethod · 0.85
ExecuteUnblockedMethod · 0.85

Calls 3

MultiLenFunction · 0.85
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected