module Neo4j::Cypher::Context::ReturnOrder
Public Instance Methods
_sort_args(props)
click to toggle source
# File lib/neo4j-cypher/context.rb 181 def _sort_args(props) 182 return [self] if props.empty? 183 props.map { |p| p.is_a?(Symbol) ? Property.new(clause, p).eval_context : p } 184 end
asc(*props)
click to toggle source
Specifies an ORDER BY
cypher query @param [Property] props the properties which should be sorted @return self
# File lib/neo4j-cypher/context.rb 189 def asc(*props) 190 @order_by ||= OrderBy.new(clause_list, self) 191 clause_list.delete(props.first) 192 @order_by.asc(_sort_args(props)) 193 self 194 end
desc(*props)
click to toggle source
Specifies an ORDER BY
cypher query @param [Property] props the properties which should be sorted @return self
# File lib/neo4j-cypher/context.rb 199 def desc(*props) 200 @order_by ||= OrderBy.new(clause_list, self) 201 clause_list.delete(props.first) 202 @order_by.desc(_sort_args(props)) 203 self 204 end
limit(val)
click to toggle source
Creates a LIMIT
cypher clause @param [Fixnum] val the number of entries to limit @return self
# File lib/neo4j-cypher/context.rb 217 def limit(val) 218 Limit.new(clause_list, val, self) 219 self 220 end
skip(val)
click to toggle source
Creates a SKIP
cypher clause @param [Fixnum] val the number of entries to skip @return self
# File lib/neo4j-cypher/context.rb 209 def skip(val) 210 Skip.new(clause_list, val, self) 211 self 212 end