[DB-SIG] Positioned Update/Delete

Peter Godman pgodman@halcyon.com
Thu, 23 Apr 1998 09:08:54 -0700 (PDT)


On Thu, 23 Apr 1998 adustman@comstar.net wrote:

> On Thu, 23 Apr 1998, Dr. Dieter Maurer wrote:
> 
> > How should positioned update/delete be best used with the DB-API:
> > 
> >  1. cursor.execute("update set ... where CURRENT")
> >  2. cursor.execute("update set ... where CURRENT of SELF")
> >  3. cursor.execute("update set ... where CURRENT of %s" % str(cursor))
> >  4. cursor.execute("update set ... where CURRENT of ?",(cursor,))
> 
> 4a. cursor.execute("update TABLE set CURRENT = ?", (current,))
> 
> Assuming you are using an SQL-89 or so database; the API doesn't really
> specify the query language syntax. 
> 

Just as a note of interest, Sybase's client library (ct) supports 
client-side cursors, which means that I will have to superset DBAPI a
little to support them.  I think it will be just a matter of adding update
and delete methods to the cursor type.  Do any of the other APIs support
client-side cursors?  In Sybase parlance, the above discussion
would be about "Language cursors".  

So I guess there will be 
5. cursor.update("set ...")
and
   cursor.delete()

for Sybase.    What do
people feel about making this feature a part of basic DBAPI?

Peter Godman