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

Function setTypeCreate

src/t_set.cpp:42–46  ·  view source on GitHub ↗

Factory method to return a set that *can* hold "value". When the object has * an integer-encodable value, an intset will be returned. Otherwise a regular * hash table. */

Source from the content-addressed store, hash-verified

40 * an integer-encodable value, an intset will be returned. Otherwise a regular
41 * hash table. */
42robj *setTypeCreate(const char *value) {
43 if (isSdsRepresentableAsLongLong(value,NULL) == C_OK)
44 return createIntsetObject();
45 return createSetObject();
46}
47
48/* Add the specified value into a set.
49 *

Callers 3

saddCommandFunction · 0.85
smoveCommandFunction · 0.85
spopWithCountCommandFunction · 0.85

Calls 3

createIntsetObjectFunction · 0.85
createSetObjectFunction · 0.85

Tested by

no test coverage detected