# File lib/dbd/pg/tuples.rb, line 79
    def fetch_scroll(direction, offset)
        # Exact semantics aren't too closely defined.  I attempted to follow the DBI:Mysql example.
        case direction
        when SQL_FETCH_NEXT
            # Nothing special to do, besides the fetchrow
        when SQL_FETCH_PRIOR
            @index -= 2
        when SQL_FETCH_FIRST
            @index = -1
        when SQL_FETCH_LAST
            @index = @pg_result.num_tuples - 2
        when SQL_FETCH_ABSOLUTE
            # Note: if you go "out of range", all fetches will give nil until you get back
            # into range, this doesn't raise an error.
            @index = offset-1
        when SQL_FETCH_RELATIVE
            # Note: if you go "out of range", all fetches will give nil until you get back
            # into range, this doesn't raise an error.
            @index += offset - 1
        else
            raise NotSupportedError
        end
        self.fetchrow
    end