I am using SQLAlchemy and postgres database.
I want to do "Delete and Insert operation" on the table in a single
transaction *without using orm.*
Say
*table User*
Column | Type | Modifiers
--------+-------------------+---------------------------------------------------
id | integer | not null default
nextval('test_id_seq'::regclass)
name | character varying |
All users from table are retrieved and displayed at small time
interval.(2 secs)
say u1,u2,u3 are current users in DB.
Updated user list is u3,u4,u5.
Now i have to delete [u1,u2 ] & add [u4,u5]. This deletion and addition of
users should be in single transaction so that
users retrieved/displayed from table are either [u1,u2,u3] or [u3,u4,u5] .
And to avoid retrieval of transitional list of users say [ u1 ] (after
deletion).
In the similar steps it is required to do bulk deletion and bulk addition
in a single transaction.
Thanks
Santosh
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.