def each_row_batch(options={}, &block)
          options = {:connection => self.connection}.merge(options)
          cursor  = PostgreSQLCursor::Cursor.new(to_unprepared_sql, options)
          return cursor.each_row_batch(&block) if block_given?
          cursor.iterate_batched
        end
Public: Executes the query, yielding each batch of up to block_size
rows where each row is a hash to the given block.

Parameters: same as each_row

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

Returns the number of rows yielded to the block