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

Method addAndMergeQueryGraphIfConnected

src/binder/query/query_graph.cpp:245–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void QueryGraphCollection::addAndMergeQueryGraphIfConnected(QueryGraph queryGraphToAdd) {
246 auto newQueryGraphSet = std::vector<QueryGraph>();
247 for (auto i = 0u; i < queryGraphs.size(); i++) {
248 auto queryGraph = std::move(queryGraphs[i]);
249 if (queryGraph.isConnected(queryGraphToAdd)) {
250 queryGraphToAdd.merge(queryGraph);
251 } else {
252 newQueryGraphSet.push_back(std::move(queryGraph));
253 }
254 }
255 newQueryGraphSet.push_back(std::move(queryGraphToAdd));
256 queryGraphs = std::move(newQueryGraphSet);
257}
258
259void QueryGraphCollection::finalize() {
260 common::idx_t baseGraphIdx = 0;

Callers 1

bindGraphPatternMethod · 0.80

Calls 4

isConnectedMethod · 0.80
sizeMethod · 0.45
mergeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected