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

Method hasPrefix

src/QLContext.actor.cpp:804–814  ·  view source on GitHub ↗

SOMEDAY: If we store the index name as Tuple encoded bytes, prefix comparision would be faster

Source from the content-addressed store, hash-verified

802
803// SOMEDAY: If we store the index name as Tuple encoded bytes, prefix comparision would be faster
804bool IndexInfo::hasPrefix(std::vector<std::string> const& prefix) {
805 if (prefix.size() > indexKeys.size())
806 return false;
807
808 for (int i = 0; i < prefix.size(); i++) {
809 if (indexKeys[i].first != prefix[i]) {
810 return false;
811 }
812 }
813 return true;
814}

Callers 1

getCompoundIndexMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected