Module: Neo4j::ActiveNode::Query::QueryProxyFindInBatches

Included in:
QueryProxy
Defined in:
lib/neo4j/active_node/query/query_proxy_find_in_batches.rb

Instance Method Summary collapse

Instance Method Details

#find_each(options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/neo4j/active_node/query/query_proxy_find_in_batches.rb', line 11

def find_each(options = {})
  query.return(identity).find_each(identity, @model.primary_key, options) do |result|
    yield result.send(identity)
  end
end

#find_in_batches(options = {}) ⇒ Object



5
6
7
8
9
# File 'lib/neo4j/active_node/query/query_proxy_find_in_batches.rb', line 5

def find_in_batches(options = {})
  query.return(identity).find_in_batches(identity, @model.primary_key, options) do |batch|
    yield batch.map(&identity)
  end
end