# File lib/sqlite3/resultset.rb, line 107
    def next
      if @db.results_as_hash
        return next_hash
      end

      row = @stmt.step
      return nil if @stmt.done?

      if @db.type_translation
        row = @stmt.types.zip(row).map do |type, value|
          @db.translator.translate( type, value )
        end
      end

      if row.respond_to?(:fields)
        # FIXME: this can only happen if the translator returns something
        # that responds to `fields`.  Since we're removing the translator
        # in 2.0, we can remove this branch in 2.0.
        row = ArrayWithTypes.new(row)
      else
        # FIXME: the `fields` and `types` methods are deprecated on this
        # object for version 2.0, so we can safely remove this branch
        # as well.
        row = ArrayWithTypesAndFields.new(row)
      end

      row.fields = @stmt.columns
      row.types = @stmt.types
      row
    end