Class: Neo4j::Cypher::Start
- Inherits:
-
Object
- Object
- Neo4j::Cypher::Start
- Includes:
- Clause
- Defined in:
- lib/neo4j-cypher/start.rb
Direct Known Subclasses
Defined Under Namespace
Classes: EvalContext
Constant Summary
Constants included from Clause
Instance Attribute Summary
Attributes included from Clause
#clause_list, #clause_type, #eval_context, #expr, #insert_order
Instance Method Summary collapse
- #entity_list(entity_type, entities) ⇒ Object
-
#initialize(clause_list, rvalue) ⇒ Start
constructor
A new instance of Start.
- #to_cypher ⇒ Object
Methods included from Clause
#<=>, #alias_name, #as_alias, #as_alias?, #clause_position, #create_clause_args_for, #match_value, #match_value=, #prefix, #referenced!, #referenced?, #return_value, #separator, #to_prop_string, #valid_clause?, #var_name, #var_name=
Constructor Details
#initialize(clause_list, rvalue) ⇒ Start
Returns a new instance of Start.
6 7 8 9 |
# File 'lib/neo4j-cypher/start.rb', line 6 def initialize(clause_list, rvalue) super(clause_list, :start, EvalContext) @rvalue = rvalue end |
Instance Method Details
#entity_list(entity_type, entities) ⇒ Object
11 12 13 14 |
# File 'lib/neo4j-cypher/start.rb', line 11 def entity_list(entity_type, entities) list = entities.map { |n| n.respond_to?(:neo_id) ? n.neo_id : n }.join(',') "#{entity_type}(#{list})" end |
#to_cypher ⇒ Object
16 17 18 |
# File 'lib/neo4j-cypher/start.rb', line 16 def to_cypher "#{var_name}=#{@rvalue}" end |