'Scroll the cursor in the result set to a new position according
to mode.
If mode is \'relative\' (default), value is taken as offset to
the current position in the result set, if set to \'absolute\',
value states an absolute target position.'

def scroll(self, value, mode='relative'):

    self._check_executed()
    if (mode == 'relative'):
        r = (self.rownumber + value)
    elif (mode == 'absolute'):
        r = value
    else:
        self.errorhandler(self, ProgrammingError, ('unknown    scroll    mode    %s' % repr(mode)))
    if ((r < 0) or (r >= len(self._rows))):
        self.errorhandler(self, IndexError, 'out    of    range')
    self.rownumber = r
