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

Function dbAdd

src/db.cpp:312–316  ·  view source on GitHub ↗

Add the key to the DB. It's up to the caller to increment the reference * counter of the value if needed. * * The program is aborted if the key already exists. */

Source from the content-addressed store, hash-verified

310 *
311 * The program is aborted if the key already exists. */
312void dbAdd(redisDb *db, robj *key, robj *val)
313{
314 bool fInserted = dbAddCore(db, szFromObj(key), val, true /* fUpdateMvcc */);
315 serverAssertWithInfo(NULL,key,fInserted);
316}
317
318void redisDb::dbOverwriteCore(redisDb::iter itr, sds keySds, robj *val, bool fUpdateMvcc, bool fRemoveExpire)
319{

Callers 15

copyCommandFunction · 0.85
restoreCommandFunction · 0.85
zaddGenericCommandFunction · 0.85
xgroupCommandFunction · 0.85
saddCommandFunction · 0.85
smoveCommandFunction · 0.85
debugCommandFunction · 0.85
moduleCreateEmptyKeyFunction · 0.85
setrangeCommandFunction · 0.85
incrDecrCommandFunction · 0.85

Calls 2

dbAddCoreFunction · 0.85
szFromObjFunction · 0.85

Tested by

no test coverage detected