Just a thought, if I don't commit those three tables together in my application, can I just use 3 Session objects to commit them separately, without having to worry about this two phase issue? I want to go simple, not sure if I can handle this fancy stuff:)
On Friday, August 14, 2015 at 5:20:07 PM UTC-7, Jinghui Niu wrote: > > Thanks Jonathan for pointing out the direction, it is very helpful to know > where I can find more info. > > On Friday, August 14, 2015 at 5:06:09 PM UTC-7, Jonathan Vanasco wrote: >> >> Well, this problem doesn't really have anything to do with SqlAlchemy -- >> you should probably ask people for advice on the Sqlite lists or Stack >> Overflow. >> >> You can segment out your database into 3 files using the example above. >> You will just run into an issue where -- because there isn't a >> two-phase-commit available in Sqlite, you will need to decide how to handle >> situations like (but not limited to): >> >> - the first and second databases committed, but the third database raised >> an error (you need to undo in the application) >> - the first and second databases committed, but your application was quit >> before the third database could commit (you need to undo from another >> application) >> >> You will have to decide how to handle that at the application and >> database levels, and then SqlAlchemy can be used to implement that >> strategy. >> >> I just want to be clear -- your concern right now is on the best way to >> use Sqlite to solve your problem -- not use Sqlalchemy. Once you figure >> that out, people here can be more helpful. >> > -- 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/d/optout.