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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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