MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / set

Method set

src/QLContext.actor.cpp:216–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 }
215
216 void set(Reference<DocTransaction> tr, DataKey key, ValueRef value) override {
217 std::string k = getFDBKey(key);
218 Value v = value;
219 auto docDeferred = findOrCreate(tr, key);
220 docDeferred->deferred.emplace_back([k, v](Reference<DocTransaction> tr) {
221 if (k.size() > DocLayerConstants::FDB_KEY_LENGTH_LIMIT)
222 throw key_too_large();
223 if (v.size() > DocLayerConstants::FDB_VALUE_LENGTH_LIMIT)
224 throw value_too_large();
225 tr->tr->set(k, v);
226 });
227 }
228
229 void clearDescendants(Reference<DocTransaction> tr, DataKey key) override {
230 std::string _key = getFDBKey(key);

Callers

nothing calls this directly

Calls 3

getFDBKeyFunction · 0.85
sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected