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

Paramaters: same as each_row

Example:
Post.where(user_id:123).each_instance { |post| post.process }
Post.where(user_id:123).each_instance.map { |post| post.process }

Returns the number of rows yielded to the block