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

Method getCompoundIndex

src/QLContext.actor.cpp:715–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713}
714
715Optional<Reference<IndexInfo>> UnboundCollectionContext::getCompoundIndex(std::vector<std::string> const& prefix,
716 std::string nextIndexKey) {
717 if (bannedFieldNames.find(nextIndexKey) != bannedFieldNames.end())
718 return Optional<Reference<IndexInfo>>();
719 auto indexV = simpleIndexMap.find(prefix[0]);
720 ASSERT(indexV != simpleIndexMap.end());
721 for (const Reference<IndexInfo>& index : indexV->second) {
722 if (index->size() > prefix.size() && index->hasPrefix(prefix)) {
723 if (index->indexKeys[prefix.size()].first == nextIndexKey) {
724 return index;
725 }
726 }
727 }
728 return Optional<Reference<IndexInfo>>();
729}
730
731Key UnboundCollectionContext::getVersionKey() {
732 return metadataDirectory->key().withSuffix(

Callers 1

push_downMethod · 0.80

Calls 4

findMethod · 0.80
endMethod · 0.80
hasPrefixMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected