[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-db-sig
Subject:    [DB-SIG] Re: Scrollable cursors
From:       adustman () comstar ! net (Andy Dustman)
Date:       2000-03-13 20:54:24
Message-ID: Pine.LNX.4.10.10003131542050.31507-100000 () kenny ! comstar ! net
[Download RAW message or body]

On Mon, 13 Mar 2000, Andy Dustman wrote:

> cursor.seek(n) -- scrolls the cursor to row n, with the first row being 0.
> If the database does not support seekable cursors, this method should not
> be defined. If database cannot support seeking under current conditions,
> it should raise NotSupportedError. (Similar to the cursor.rollback()
> language)

In actually writing the code, I would amend this to:

cursor.seek(n, whence=0) -- if whence=0, scrolls the cursor to absolute
row n, else perform a relative scroll. There are some difficulties in
doing the relative scroll, but I hope I can get around them.

-- 
andy dustman       |     programmer/analyst     |      comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic