MCPcopy Create free account
hub / github.com/apple/foundationdb / clear

Method clear

fdbclient/DatabaseConfiguration.cpp:678–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678bool DatabaseConfiguration::clear(KeyRangeRef keys) {
679 makeConfigurationMutable();
680 auto& mc = mutableConfiguration.get();
681 mc.erase(mc.lower_bound(keys.begin.toString()), mc.lower_bound(keys.end.toString()));
682
683 // FIXME: More efficient
684 bool wasValid = isValid();
685 resetInternal();
686 for (auto c = mc.begin(); c != mc.end(); ++c)
687 setInternal(c->first, c->second);
688 return wasValid && !isValid();
689}
690
691Optional<ValueRef> DatabaseConfiguration::get(KeyRef key) const {
692 if (mutableConfiguration.present()) {

Callers

nothing calls this directly

Calls 6

getMethod · 0.65
eraseMethod · 0.45
lower_boundMethod · 0.45
toStringMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected