# though it doesn't matter for the problem I'm seeing.
cursor.execute("SELECT type, COUNT(*) AS total FROM onboard_people GROUP BY type ORDER BY type;")
Then proceeded with this interactive session. Consecutive
result set. Where I get confused is when I .scroll():
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=0
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('craftsmen', 2349)
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=1
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('impotenten', 938)
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=2
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('passengers', 2813)
>>> p(cursor)
.rowcnt=6, .__offset=2, .rownumber=3
.__rows=[('passengers', 2813), ('seafarers', 4468)]
# Here's where I scroll back to the beginning. The
# offset changes, but the rownumber doesn't.
>>> cursor.scroll (0, mode='absolute')
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=3
.__rows=[('craftsmen', 2349), ('impotenten', 938), ('passengers', 2813), ('seafarers', 4468), ('soldiers', 4177)]
# My expectation was that this would be ('craftsmen', 2349),
# but it continues as if I didn't scroll.
>>> cursor.fetchone()
('seafarers', 4468)
# I try to back to the last item with no luck, it instead
# marches forward to the next item as if I didn't scroll.
>>> cursor.scroll (-1, mode='relative')
>>> p(cursor)
.rowcnt=6, .__offset=3, .rownumber=4
.__rows=[('seafarers', 4468), ('soldiers', 4177), ('total', 2467)]
>>> cursor.fetchone()
('soldiers', 4177)