class Neo4j::Cypher::CreatePath
Attributes
arg_list[R]
Public Class Methods
new(clause_list, *args, &cypher_dsl)
click to toggle source
Calls superclass method
Neo4j::Cypher::Clause::new
# File lib/neo4j-cypher/create.rb 80 def initialize(clause_list, *args, &cypher_dsl) 81 super(clause_list, args.empty? ? :create : :with, EvalContext) 82 83 clause_list.push 84 85 @args = create_clause_args_for(args) 86 @arg_list = @args.map { |a| a.return_value }.join(',') 87 arg_exec = @args.map(&:eval_context) 88 89 RootClause::EvalContext.new(self).instance_exec(*arg_exec, &cypher_dsl) 90 91 @body = "#{clause_list.to_cypher}" 92 clause_list.pop 93 end
Public Instance Methods
to_cypher()
click to toggle source
# File lib/neo4j-cypher/create.rb 100 def to_cypher 101 clause_type == :create ? "#{var_name} = #{@body}" : "#{@arg_list} CREATE #{@unique && "UNIQUE "}#{@body}" 102 end
unique!()
click to toggle source
# File lib/neo4j-cypher/create.rb 95 def unique! 96 @unique = true 97 self 98 end