From: Jeremy Kemper Date: 2007-02-13T06:28:14+09:00 Subject: Re: ActiveRecord::Extensions Question ------=_Part_92722_25401367.1171315686609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 2/12/07, Drew Olson wrote: > > After a discussion of using ActiveRecord for data validation, it became > apparent to me (and others) that ActiveRecord was missing the ability to > iterate over a large set of records without storing the entire set in > memory. Someone in the thread mentioned that ActiveRecord Extensions may > have this ability. Essentially, I want to do a Table.find(:all).each, > however there are quite a lot of records and I'd like to iterate across > them without storing the entire dataset locally (something like a > cursor). Does ActiveRecord::Extensions have this ability? I've looked at > the documentation (what little I could find) and didn't see anything > like this. Try ActiveRecord::Enumerable by Michael Schuerig: http://schuerig.de/michael/blog/index.php/2007/02/03/ar-enumerable/ It uses a 'paged' find under the covers rather than cursors. jeremy ------=_Part_92722_25401367.1171315686609--