# File 'lib/em-mongo/cursor.rb', line 247defbatch_size(size=0)check_modifiableifsize<0||size==1raiseArgumentError,"Invalid value for batch_size #{size}; must be 0 or > 1."else@batch_size=size>@limit?@limit:sizeendselfend

#close ⇒ True

Close the cursor.

Note: if a cursor is read until exhausted (read until
EM::Mongo::Constants::OP_QUERY or EM::Mongo::Constants::OP_GETMORE returns
zero for the cursor id), there is no need to close it manually.

Note also: Collection#find takes an optional block argument which can be
used to ensure that your cursors get closed.

#sort(key_or_list, direction = nil) ⇒ Object

Sort this cursor's results.

This method overrides any sort order specified in the Collection#find
method, and only the last sort applied has an effect.

Parameters:

key_or_list(Symbol, Array)
—

either 1) a key to sort by or 2) an array of [key, direction] pairs to sort
by. Direction should be specified as EM::Mongo::ASCENDING (or :ascending /
:asc) or EM::Mongo::DESCENDING (or :descending / :desc)