MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / add

Method add

src/t_nhash.cpp:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 bool add(sds key, robj *val) {
75 bool result = false;
76 if (m_db != nullptr) {
77 result = m_db->insert(key, val, true);
78 } else if (m_dict != nullptr) {
79 result = dictAdd(m_dict, key, val) == DICT_OK;
80 }
81 return result;
82 }
83
84private:
85 redisDb *m_db = nullptr;

Callers 1

setWithKeyFunction · 0.45

Calls 2

dictAddFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected