Class: Neo4j::Core::Cypher::MatchRelRight
- Inherits:
-
Match
- Object
- Expression
- Match
- Neo4j::Core::Cypher::MatchRelRight
- Defined in:
- lib/neo4j-core/cypher/cypher.rb
Instance Attribute Summary
Attributes inherited from Match
#algorithm, #dir, #dir_op, #expressions, #left, #next, #prev, #right, #var_name
Attributes included from Variable
Attributes inherited from Expression
#clause, #expressions, #separator
Instance Method Summary collapse
-
#-(other) ⇒ MatchRelLeft
The right part of an relationship cypher query.
-
#<(other) ⇒ MatchRelLeft
The right part of an relationship cypher query.
-
#>(other) ⇒ MatchRelLeft
The right part of an relationship cypher query.
-
#expr ⇒ String
A cypher string for this match.
-
#initialize(left, right, expressions, dir) ⇒ MatchRelRight
constructor
A new instance of MatchRelRight.
- #not ⇒ Object
Methods inherited from Match
#find_match_start, #left_var_name, #length, #nodes, #referenced!, #referenced?, #rels, #right_expr, #right_var_name, #to_s
Methods included from Variable
#[], #as, #distinct, #exist?, #is_a?, #neo_id, #property?
Methods inherited from Expression
#insert_last, #prefix, #prefixes, #valid?
Constructor Details
#initialize(left, right, expressions, dir) ⇒ MatchRelRight
Returns a new instance of MatchRelRight.
592 593 594 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 592 def initialize(left, right, expressions, dir) super(left, right, expressions, dir, dir == :outgoing ? '->' : '-') end |
Instance Method Details
#-(other) ⇒ MatchRelLeft
Returns the right part of an relationship cypher query.
612 613 614 615 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 612 def -(other) expressions.delete(self) self.next = MatchRelLeft.new(self, other, expressions, :both) end |
#<(other) ⇒ MatchRelLeft
Returns the right part of an relationship cypher query.
605 606 607 608 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 605 def <(other) expressions.delete(self) self.next = MatchRelLeft.new(self, other, expressions, :incoming) end |
#>(other) ⇒ MatchRelLeft
Returns the right part of an relationship cypher query.
598 599 600 601 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 598 def >(other) expressions.delete(self) self.next = MatchRelLeft.new(self, other, expressions, :outgoing) end |
#expr ⇒ String
Returns a cypher string for this match.
618 619 620 |
# File 'lib/neo4j-core/cypher/cypher.rb', line 618 def expr "#{dir_op}(#{right_var_name})" end |