| 246 | |
| 247 | template<class T> |
| 248 | static void AddKvsToMap(const Array::Ptr& kvs, T& map) |
| 249 | { |
| 250 | Value* key = nullptr; |
| 251 | ObjectLock oLock (kvs); |
| 252 | |
| 253 | for (auto& kv : kvs) { |
| 254 | if (key) { |
| 255 | map.emplace(std::move(*key), std::move(kv)); |
| 256 | key = nullptr; |
| 257 | } else { |
| 258 | key = &kv; |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | // Represents any pair of Redis keys that belong together, e.g, @c {icinga:host:state, icinga:checksum:host:state}. |
| 264 | struct QueryArgPair |