Hello Phillip :)
IMHO, your best options are the SA examples (in the source code) folder and, for further abstractions, you could check SA test units :) Works great for me! Cheers, Richard. Em 2013-04-18 17:22, Philipp Kraus escreveu: > Hello, > I try to use SQLAlchemy in buildscripts for SCons, so I run my SCons script and depend on the data all tables are created. > I'm new with SQLAlchemy and Python database access, so can I create a transaction with SQLAlchemy for the create table > statements and also the insert statements, so if one of them creates an error, the full transaction is rollbacked ? > I think I need something like: > try > start_transaction() > metadata.drop_all > metadata.create_all > metadata.insert > insert.execute > commit_transaction() > except : > rollback_transaction() > Can anybody explain me please, in which case I can add a transaction around the drop and create and the insert calls. > Thanks a lot > > -- > 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?hl=en [1]. > For more options, visit https://groups.google.com/groups/opt_out [2]. Links: ------ [1] http://groups.google.com/group/sqlalchemy?hl=en [2] https://groups.google.com/groups/opt_out -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.