def scroll(self, value, mode='<STR_LIT>'):
self._check_executed()<EOL>if mode == '<STR_LIT>':<EOL><INDENT>r = self.rownumber + value<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>r = value<EOL><DEDENT>else:<EOL><INDENT>raise ProgrammingError("<STR_LIT>" % repr(mode))<EOL><DEDENT>if r < <NUM_LIT:0> or r >= len(self._rows):<EOL><INDENT>raise IndexError("<STR_LIT>")<EOL><DEDENT>self.rownumber = r<EOL>
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.