Hi,

>I'm using TG with sqlalchemy and was wondering how one would go about
>doing an increment on some value on some row and then fetching that
>value as part of one call?  
>
Not possible AFAIK. last_inserted_ids only fetches ID columns from 
inserted rows.

Using raw DBAPI, potentially you could do this in a single database 
round trip with something like:
"update x set y=y+1 where z=?; select y from x where z=?", [123, 123]

It will depend on your database and connector module whether that's 
possible.

Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to