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

Function hashTypeCurrentObjectNewSds

src/t_hash.cpp:444–452  ·  view source on GitHub ↗

Return the key or value at the current iterator position as a new * SDS string. */

Source from the content-addressed store, hash-verified

442/* Return the key or value at the current iterator position as a new
443 * SDS string. */
444sds hashTypeCurrentObjectNewSds(hashTypeIterator *hi, int what) {
445 unsigned char *vstr;
446 unsigned int vlen;
447 long long vll;
448
449 hashTypeCurrentObject(hi,what,&vstr,&vlen,&vll);
450 if (vstr) return sdsnewlen(vstr,vlen);
451 return sdsfromlonglong(vll);
452}
453
454robj *hashTypeLookupWriteOrCreate(client *c, robj *key) {
455 robj *o = lookupKeyWrite(c->db,key);

Callers 3

hashTypeConvertZiplistFunction · 0.85
xorObjectDigestFunction · 0.85

Calls 3

hashTypeCurrentObjectFunction · 0.85
sdsnewlenFunction · 0.85
sdsfromlonglongFunction · 0.85

Tested by

no test coverage detected