MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / addQueryNode

Method addQueryNode

src/binder/query/query_graph.cpp:190–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void QueryGraph::addQueryNode(std::shared_ptr<NodeExpression> queryNode) {
191 // Note that a node may be added multiple times. We should only keep one of it.
192 // E.g. MATCH (a:person)-[:knows]->(b:person), (a)-[:knows]->(c:person)
193 // a will be added twice during binding
194 if (containsQueryNode(queryNode->getUniqueName())) {
195 return;
196 }
197 queryNodeNameToPosMap.insert({queryNode->getUniqueName(), queryNodes.size()});
198 queryNodes.push_back(std::move(queryNode));
199}
200
201void QueryGraph::addQueryRel(std::shared_ptr<RelExpression> queryRel) {
202 if (containsQueryRel(queryRel->getUniqueName())) {

Callers 9

planNodeScanMethod · 0.45
planNodeIDScanMethod · 0.45
constructNodeScanMethod · 0.45
getBaseNbrSubgraphMethod · 0.45
getNextNbrSubgraphsMethod · 0.45
bindQueryNodeMethod · 0.45
rewriteMatchPatternMethod · 0.45

Calls 4

getUniqueNameMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected