# File lib/dbd/pg/tuples.rb, line 78
 78:     def fetch_scroll(direction, offset)
 79:         # Exact semantics aren't too closely defined.  I attempted to follow the DBI:Mysql example.
 80:         case direction
 81:         when SQL_FETCH_NEXT
 82:             # Nothing special to do, besides the fetchrow
 83:         when SQL_FETCH_PRIOR
 84:             @index -= 2
 85:         when SQL_FETCH_FIRST
 86:             @index = -1
 87:         when SQL_FETCH_LAST
 88:             @index = @pg_result.num_tuples - 2
 89:         when SQL_FETCH_ABSOLUTE
 90:             # Note: if you go "out of range", all fetches will give nil until you get back
 91:             # into range, this doesn't raise an error.
 92:             @index = offset-1
 93:         when SQL_FETCH_RELATIVE
 94:             # Note: if you go "out of range", all fetches will give nil until you get back
 95:             # into range, this doesn't raise an error.
 96:             @index += offset - 1
 97:         else
 98:             raise NotSupportedError
 99:         end
100:         self.fetchrow
101:     end