MCPcopy Create free account
hub / github.com/Icinga/icinga2 / AddDataToHmSets

Method AddDataToHmSets

lib/icingadb/icingadb-objects.cpp:3205–3215  ·  view source on GitHub ↗

* Add the provided data to the provided map of HMSET queries. * * @param hMSets The map of HMSETs to add the provided data to. * @param redisKey The Redis key to which the HMSET query should be added. * @param id The config object identifier to be added as the first field of the HMSET query. * @param data The actual data to be added. */

Source from the content-addressed store, hash-verified

3203 * @param data The actual data to be added.
3204 */
3205void IcingaDB::AddDataToHmSets(
3206 std::map<RedisConnection::QueryArg, RedisConnection::Query>& hMSets,
3207 const RedisConnection::QueryArg& redisKey,
3208 const String& id,
3209 const Dictionary::Ptr& data
3210)
3211{
3212 RedisConnection::Query& query = hMSets[redisKey];
3213 query.emplace_back(id);
3214 query.emplace_back(JsonEncode(data));
3215}
3216
3217/**
3218 * Execute the provided HMSET values and runtime updates in a single Redis transaction on the provided Redis connection.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected