Method: Moped::Cursor#load_docs
- Defined in:
- lib/moped/cursor.rb
#load_docs ⇒ Array<Hash>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Load the documents from the database.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/moped/cursor.rb', line 129 def load_docs consistency = session.consistency @options[:flags] |= [:slave_ok] if consistency == :eventual @options[:flags] |= [:no_cursor_timeout] if @options[:no_timeout] = @options.clone [:limit] = request_limit reply, @node = session.context.with_node do |node| [ node.query(@database, @collection, @selector, ), node ] end @limit -= reply.count if limited? @cursor_id = reply.cursor_id reply.documents end |