There is no find_in_batches what is the alternative for ruby on rails?

21 views
Skip to first unread message

Julie

unread,
Apr 5, 2010, 8:39:28 PM4/5/10
to mongodb-user
Hi,

seems like MongoMapper did not have find_in_batches. What is the
alternative or solution?

Thanks

Mathias Stearn

unread,
Apr 6, 2010, 6:46:46 PM4/6/10
to mongod...@googlegroups.com
You can emulate it by passing a negative number to limit. This will
prevent the db from creating a cursor and it will just send up to that
many or 4MB which ever limit is hit first, but it will do it in a
single batch.

On Mon, Apr 5, 2010 at 8:39 PM, Julie <julie...@gmail.com> wrote:
> find_in_batches

Reply all
Reply to author
Forward
0 new messages