= ActiveRecordIterator

The plugin enhances the ActiveRecord framework by adding a real iterator
functionality. This way it's possible to iterate through large result sets
without loading the data of all records into memory.

Using the plugin you can use

    YourModel.find_each_by_sql('select * from my_table') do |your_object|
        # do something with the ActiveRecord instance
    end

instead of the standard way

    YourModel.find_by_sql('select * from my_table').each do |your_object|
        # do something with the ActiveRecord instance
    end


Similarly, you can use

    YourModel.find_each(:all) { |your_object| ; }

instead of

    YourModel.find(:all).each { |your_object| ; }


= Supported database adapters

    OracleAdapter               (full)
    OraceleEnhancedAdapter      (full)
    MysqlAdapter                (full)
    JdbcAdapter                 (partial)

The standard activerecord-jdbc-adapter (rel. 0.8.2) doesn't allow to intercept
the process of fetching the result set. The Java implementation of the 
adapter must be patched to provide a way for a real iteration similar to the
fully supported adapters. Without that patch, all records are loaded into 
memory which can fill even huge heap space very quickly.

Support for other adapters isn't provided yet.


= Plans for the future

Of course, it would be great to complete the set of supported adapters. 
But on the other hand, the authors would be lucky if the idea is picked up
by the ActiveRecord developers, so that in the future ActiveRecord could 
provide the functionality of this plugin by default.

The same applies to the JDBC adapter patch. If it is accepted upstream, 
that would be really great.

<em>Andreas Gungl, Thomas Sachse</em>
