MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetRange

Method GetRange

src/leveldb/db/version_set.cc:1182–1201  ·  view source on GitHub ↗

Stores the minimal range that covers all entries in inputs in smallest, *largest. REQUIRES: inputs is not empty

Source from the content-addressed store, hash-verified

1180// *smallest, *largest.
1181// REQUIRES: inputs is not empty
1182void VersionSet::GetRange(const std::vector<FileMetaData*>& inputs,
1183 InternalKey* smallest, InternalKey* largest) {
1184 assert(!inputs.empty());
1185 smallest->Clear();
1186 largest->Clear();
1187 for (size_t i = 0; i < inputs.size(); i++) {
1188 FileMetaData* f = inputs[i];
1189 if (i == 0) {
1190 *smallest = f->smallest;
1191 *largest = f->largest;
1192 } else {
1193 if (icmp_.Compare(f->smallest, *smallest) < 0) {
1194 *smallest = f->smallest;
1195 }
1196 if (icmp_.Compare(f->largest, *largest) > 0) {
1197 *largest = f->largest;
1198 }
1199 }
1200 }
1201}
1202
1203// Stores the minimal range that covers all entries in inputs1 and inputs2
1204// in *smallest, *largest.

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
ClearMethod · 0.45
sizeMethod · 0.45
CompareMethod · 0.45

Tested by

no test coverage detected