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

List:       python-db-sig
Subject:    [DB-SIG] Positioned Update/Delete
From:       pgodman () halcyon ! com (Peter Godman)
Date:       1998-04-23 16:08:54
Message-ID: Pine.GUL.3.96.980423085519.26711B-100000 () coho ! halcyon ! com
[Download RAW message or body]

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



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

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