A graph pattern contains node/rel and a set of key-value pairs associated with the variable. We bind node/rel as query graph and key-value pairs as a separate collection. This collection is interpreted in two different ways. - In MATCH clause, these are additional predicates to WHERE clause - In UPDATE clause, there are properties to set. We do not store key-value pairs in query graph primarily be
| 34 | // We do not store key-value pairs in query graph primarily because we will merge key-value |
| 35 | // std::pairs with other predicates specified in WHERE clause. |
| 36 | BoundGraphPattern Binder::bindGraphPattern(const std::vector<PatternElement>& graphPattern) { |
| 37 | auto queryGraphCollection = QueryGraphCollection(); |
| 38 | for (auto& patternElement : graphPattern) { |
| 39 | queryGraphCollection.addAndMergeQueryGraphIfConnected(bindPatternElement(patternElement)); |
| 40 | } |
| 41 | queryGraphCollection.finalize(); |
| 42 | auto boundPattern = BoundGraphPattern(); |
| 43 | boundPattern.queryGraphCollection = std::move(queryGraphCollection); |
| 44 | return boundPattern; |
| 45 | } |
| 46 | |
| 47 | // Grammar ensures pattern element is always connected and thus can be bound as a query graph. |
| 48 | QueryGraph Binder::bindPatternElement(const PatternElement& patternElement) { |
no test coverage detected