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

Function getIndexesForCollectionPlan

src/ExtUtil.actor.cpp:786–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784}
785
786Future<Reference<Plan>> getIndexesForCollectionPlan(Namespace const& ns,
787 Reference<DocTransaction> tr,
788 Reference<MetadataManager> mm) {
789 std::string nsStr = ns.first + "." + ns.second;
790 Future<Reference<UnboundCollectionContext>> unbound = mm->indexesCollection(tr, ns.first);
791 return map(unbound, [nsStr](Reference<UnboundCollectionContext> unbound) {
792 Reference<IPredicate> pred =
793 any_predicate(DocLayerConstants::NS_FIELD, ref(new EqPredicate(DataValue(nsStr))), false);
794 return FilterPlan::construct_filter_plan_no_pushdown(unbound, ref(new TableScanPlan(unbound)), pred);
795 });
796}
797
798Reference<Plan> getIndexesForCollectionPlan(Reference<UnboundCollectionContext> indexesCollection,
799 Namespace const& ns) {

Calls 4

any_predicateFunction · 0.85
refFunction · 0.85
DataValueClass · 0.85
indexesCollectionMethod · 0.80

Tested by

no test coverage detected