Class: Neo4j::Cypher::Property::EvalContext

Inherits:
Object
  • Object
show all
Includes:
Aggregate, Alias, Comparable, MathFunctions, MathOperator, Context, PredicateMethods, Returnable
Defined in:
lib/neo4j-cypher/property.rb

Instance Attribute Summary

Attributes included from Context

#clause

Instance Method Summary collapse

Methods included from Context

#clause_list, #initialize

Instance Method Details

#ascObject



72
73
74
# File 'lib/neo4j-cypher/property.rb', line 72

def asc
  ReturnItem.new(clause_list, self).eval_context.asc
end

#descObject



76
77
78
# File 'lib/neo4j-cypher/property.rb', line 76

def desc
  ReturnItem.new(clause_list, self).eval_context.desc
end

#in?(values) ⇒ Boolean

Returns:

  • (Boolean)


95
96
97
# File 'lib/neo4j-cypher/property.rb', line 95

def in?(values)
  clause.unary_operator("", :where, " IN [#{values.map { |x| %Q["#{x}"] }.join(',')}]")
end

#lengthObject



99
100
101
102
# File 'lib/neo4j-cypher/property.rb', line 99

def length
  clause.to_function!('length')
  self
end

#where(&block) ⇒ Object



80
81
82
83
84
85
# File 'lib/neo4j-cypher/property.rb', line 80

def where(&block)
  x = block.call(self)
  clause_list.delete(x)
  Operator.new(clause_list, x.clause, nil, "").unary!
  self
end

#where_not(&block) ⇒ Object



87
88
89
90
91
92
# File 'lib/neo4j-cypher/property.rb', line 87

def where_not(&block)
  x = block.call(self)
  clause_list.delete(x)
  Operator.new(clause_list, x.clause, nil, "not").unary!
  self
end