def each_instance_batch(options={}, &block)
          options = {:connection => self.connection}.merge(options)
          cursor = PostgreSQLCursor::Cursor.new(to_unprepared_sql, options)
          return cursor.each_instance_batch(self, &block) if block_given?
          cursor.iterate_type(self).iterate_batched
        end
Public: Like each_row, but yields an array of instantiated model
objects to the block

Parameters: same as each_row

Example:
Post.where(user_id:123).each_instance_batch do |batch|
Post.process_batch(batch)
end
Post.where(user_id:123).each_instance_batch.map do |batch|
Post.transform_batch(batch)
end

Returns the number of rows yielded to the block