MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / put

Method put

src/common/classes/GenericMap.h:228–242  ·  view source on GitHub ↗

Returns true if value existed previously

Source from the content-addressed store, hash-verified

226
227 // Returns true if value existed previously
228 bool put(const KeyType& key, const ValueType& value)
229 {
230 TreeAccessor treeAccessor(&tree);
231
232 if (treeAccessor.locate(key))
233 {
234 treeAccessor.current()->second = value;
235 return true;
236 }
237
238 KeyValuePair* var = FB_NEW_POOL(getPool()) KeyValuePair(getPool(), key, value);
239 tree.add(var);
240 mCount++;
241 return false;
242 }
243
244 // Returns pointer to the added empty value or null when key already exists
245 ValueType* put(const KeyType& key)

Callers 8

initUnicodeCollationMethod · 0.45
setupIcuAttributesMethod · 0.45
loadICUMethod · 0.45
createMethod · 0.45
getFunction · 0.45
TimeZoneStartupMethod · 0.45
setDefaultAffinityFunction · 0.45

Calls 3

locateMethod · 0.45
currentMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected