Thanks for the answer!

silly question, is there a reason standard replication techniques provided 
> by the database can't be used here?   they might be a little more 
> heavy-handed to set up than some in-app trick but it'll work more solidly. 
>

Yes, there is a reason: there are no any standard tools for desired 
actions. It is not a replication, it is more likely a collecting data from 
somewhere (generally, from multiple tables in another DBMS). 


as always, the main issue is concurrency.   can you guarantee that exactly 
> one connection at a time will be performing this operation and that during 
> so, no other connections will have any read or write locks of any kind on 
> this table?  otherwise it's not going to work. 
>

Yes, I can guarantee this in my environment.
 

>
> to implement the scenario, assuming you've figured out how to make sure a 
> connection has exclusive access, you've already spelled it out - just 
> execute the SQL you've described on the connection. 
>

The rotation of tables is not a problem. Of course I can do it by 
constructing simple SQL statement. I just want to simplify life for a 
client (client is an app for collecting data) - I want it should pass to me 
only one model (ModelA from my first post). When it will start collecting 
process it will retrieve from me a model to save data. When it will finish, 
it just tell me that the process is completed. It is easy to implement by 
declaring two identical models in client (for working table and for 
temporary table), but it seems redundant.
 

>
> as far as "build a class" or whatnot that sort of depends on app 
> architecture, I'd not bother creating a class if there's just one function 
> and no overarching pattern of class construction (see "Stop Writing 
> Classes!" for the general idea: http://pyvideo.org/video/880/ ) 
>

 I agree with you. May be I should revise my construction. But I'm still 
wondering how to create a copy of given SQLA model class (with another 
table name).

-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to