Hi!

I have ModelA model (declarative style) for persistent table. I have to 
periodically update that table with some external data (replace existing 
data with new). It must be performed with minimal locking and there must 
not be mixed old data and new data. I see the follwing way to implement it: 
create some temporary table like ModelA table, say it will be ModelATmp; 
fill ModelATmp with new external data; Replace ModelA table with new 
created table (SQL: RENAME TABLE a_table TO a_table_prev; RENAME TABLE 
a_tmp_table TO a_table; DROP TABLE a_table_prev;).

I'm wondering what is a right way to implement such scenario? I want to 
create some table rotator class, pass to it ModelA, get from it ModelATmp, 
fill it and rotate tables with that rotator. Is it possible? How should I 
do it?

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to