class ROM::Neo4j::Dataset
A dataset represents a collection returned from a query traversal over a sub-graph.
Datasets are Enumerable objects and can be manipulated using the standard methods, ‘each`, `map`, `inject`, and so forth.
Public Class Methods
new(query)
click to toggle source
@see www.rubydoc.info/gems/neo4j-core/Neo4j/Core/Query @param query [Neo4j::Core::Query] Query object returned from a Neo4j
connection
# File lib/rom/neo4j/dataset.rb, line 13 def initialize(query) @query = query end
Public Instance Methods
each(&iter)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 26 def each(&iter) @query.each(&iter) end
limit(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 46 def limit(*conditions) self.class.new(@query.limit(*conditions)) end
match(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 38 def match(*conditions) self.class.new(@query.match(*conditions)) end
merge(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 50 def merge(*conditions) self.class.new(@query.merge(*conditions)) end
optional_match(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 58 def optional_match(*conditions) self.class.new(@query.optional_match(*conditions)) end
order(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 54 def order(*conditions) self.class.new(@query.order(*conditions)) end
params(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 62 def params(*conditions) self.class.new(@query.params(*conditions)) end
return(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 42 def return(*conditions) self.class.new(@query.return(*conditions)) end
session()
click to toggle source
@return [Neo4j::Session]
# File lib/rom/neo4j/dataset.rb, line 18 def session @query.session end
start(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 34 def start(*conditions) self.class.new(@query.start(*conditions)) end
to_cypher()
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 22 def to_cypher @query.to_cypher end
where(*conditions)
click to toggle source
# File lib/rom/neo4j/dataset.rb, line 30 def where(*conditions) self.class.new(@query.where(*conditions)) end