On Jul 12, 2009, at 7:25 PM, Antoine Pitrou wrote:
> > Hello, > > Thanks for the lengthy (!) explanation. > > On Jul 13, 1:05 am, Michael Bayer <[email protected]> wrote: >> Postgres in >> particular has operations which, once failed, the transaction is not >> allowed to continue: > > Ouch. I'll have to change my strategy, then (I run unit tests with > SQLite but the production backend is PostgreSQL-based). > >> What SQLAlchemy offers that solves both issues is support of >> SAVEPOINT, via begin_nested(). Using begin_nested(), you can frame >> an operation that may potentially fail within a transaction, and then >> "roll back" to the point before its failure while maintaining the >> enclosing transaction. > > For some reason, calling rollback() or commit() after begin_nested() > doesn't work (with SQLite): pysqlite doesn't seem to support "SAVEPOINT" out of the box. Jason Kirtland found out a little bit about it here: http://itsystementwicklung.de/pipermail/list-pysqlite/2009-June/000412.html . But I'm not sure how that can be integrated with SQLA unless the pysqlite dialect issued an explicit BEGIN (and I thought perhaps Jason was going to look into integrating the correct sequences into the sqlite dialect). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
