Interface MatchClause
- All Superinterfaces:
CypherExpression
- All Known Implementing Classes:
EdgeMatchClause
,NodeMatchClause
,PathMatchClause
Represents path matching statements of Cypher queries
For example, MATCH (x), MATCH (x)-[e]->(y)
-
Method Summary
Modifier and TypeMethodDescriptiongetVars()
Obtains the set of variables defined in the patternboolean
isRedundantWith
(MatchClause match) Checks if two match statements are redundant.Methods inherited from interface se.liu.ida.hefquin.engine.wrappers.lpg.query.CypherExpression
visit
-
Method Details
-
isRedundantWith
Checks if two match statements are redundant. This can happen if they are exactly the same pattern, or if one is a node pattern and the other a path pattern that contains it. For instance, MATCH (x) is redundant with MATCH (x)-[y]->(z), MATCH (x), and MATCH (v)-[w]->(x). Note that this is not symmetric.- Parameters:
match
- the other match clause to test- Returns:
- true if the clauses are redundant, i.e., if both patterns share nodes
-
getVars
Obtains the set of variables defined in the pattern- Specified by:
getVars
in interfaceCypherExpression
- Returns:
- a set of CypherVar with the variables defined in the pattern For example, the object that represents the pattern MATCH (x)-[e]->(y) returns the set {x, e, y}.
-