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

Class QueryGraphCollection

src/include/binder/query/query_graph.h:145–167  ·  view source on GitHub ↗

QueryGraphCollection represents a pattern (a set of connected components) specified in MATCH clause.

Source from the content-addressed store, hash-verified

143// QueryGraphCollection represents a pattern (a set of connected components) specified in MATCH
144// clause.
145class QueryGraphCollection {
146public:
147 QueryGraphCollection() = default;
148 DELETE_COPY_DEFAULT_MOVE(QueryGraphCollection);
149
150 void merge(const QueryGraphCollection& other);
151 void addAndMergeQueryGraphIfConnected(QueryGraph queryGraphToAdd);
152 void finalize();
153
154 common::idx_t getNumQueryGraphs() const { return queryGraphs.size(); }
155 QueryGraph* getQueryGraphUnsafe(common::idx_t idx) { return &queryGraphs[idx]; }
156 const QueryGraph* getQueryGraph(common::idx_t idx) const { return &queryGraphs[idx]; }
157
158 bool contains(const std::string& name) const;
159 LBUG_API std::vector<std::shared_ptr<NodeExpression>> getQueryNodes() const;
160 LBUG_API std::vector<std::shared_ptr<RelExpression>> getQueryRels() const;
161
162private:
163 std::vector<QueryGraph> mergeGraphs(common::idx_t baseGraphIdx);
164
165private:
166 std::vector<QueryGraph> queryGraphs;
167};
168
169struct BoundGraphPattern {
170 QueryGraphCollection queryGraphCollection;

Callers 1

bindGraphPatternMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected