module Neo4j::Cypher::MatchStart::MatchContext

Public Class Methods

new(match_start) click to toggle source
Calls superclass method
   # File lib/neo4j-cypher/match.rb
70 def initialize(match_start)
71   super(match_start)
72   @match_start = match_start
73   @match_start.match_list << self
74 end

Public Instance Methods

clause() click to toggle source
   # File lib/neo4j-cypher/match.rb
85 def clause
86   @match_start
87 end
convert_create_clauses(to_or_from) click to toggle source
   # File lib/neo4j-cypher/match.rb
76 def convert_create_clauses(to_or_from)
77   # perform a create operation in a match clause ?
78   c = to_or_from.respond_to?(:clause) ? to_or_from.clause : to_or_from
79   if c.respond_to?(:clause_type) && c.clause_type == :create
80     clause_list.delete(c)
81     c.as_create_path!
82   end
83 end
join_previous!() click to toggle source
   # File lib/neo4j-cypher/match.rb
89 def join_previous!
90   @join_previous = true
91   self
92 end
join_previous?() click to toggle source
   # File lib/neo4j-cypher/match.rb
94 def join_previous?
95   @join_previous
96 end
length() click to toggle source

returns the length of the path

    # File lib/neo4j-cypher/match.rb
123 def length
124   clause.referenced!
125   Property.new(clause, 'length').to_function!
126 end
nodes() click to toggle source

Generates a x in nodes(m3) cypher expression.

@example

p.nodes.all? { |x| x[:age] > 30 }
    # File lib/neo4j-cypher/match.rb
110 def nodes
111   Entities.new(clause.clause_list, "nodes", self).eval_context
112 end
not() click to toggle source
    # File lib/neo4j-cypher/match.rb
128 def not
129   clause.not
130 end
rels() click to toggle source

Generates a x in relationships(m3) cypher expression.

@example

p.relationships.all? { |x| x[:age] > 30 }
    # File lib/neo4j-cypher/match.rb
118 def rels
119   Entities.new(clause.clause_list, "relationships", self).eval_context
120 end
to_cypher() click to toggle source
    # File lib/neo4j-cypher/match.rb
 98 def to_cypher
 99   if join_previous?
100     to_cypher_join
101   else
102     to_cypher_no_join
103   end
104 end