[jifty-devel] JDBI transactions

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Mar 15 08:23:02 EDT 2007


On 3/13/07, Andrew Sterling Hanenkamp <andrew.hanenkamp at boomer.com> wrote:
>
>
> While looking into a way to make the V-M class instantiation work better, I
> did some digging in JDBI transactions. I got to thinking about it and was
> thinking that it would be nice to have a transaction system that could do
> the following:
>
> Truly nested transactions: If a rollback is nested within a commit, the code
> of that rollback is removed from the ultimate commit (which is not currently
> the case, as far as I can tell).
As I far as I know mysql doesn't support nested transactions, but has
save points which could be used to do this, however I never tried it.

> The ability to store code as part of a transaction that gets run on ultimate
> commit or on ultimate rollback.
Yes, this is great idea if I got it right :)

> Creating a "transaction { }" wrapper method that will execute a coderef  and
> perform automatic rollback on exception or automatic commit otherwise.
> Encapsulating transactions in objects that could be manipulated in a
> straightforward manner---rather than as a collection of methods on
> Jifty::DBI::Handle.
Sounds cool.

> I looked around on CPAN to see if there was already a module for helping
> with this, but the modules either require wrapping DBI (e.g.,
> DBIx::Transaction) or don't really work the way I have described (e.g.,
> DBIx::Roles::Transaction). All the transaction modules I see are also tied
> to some specific file- or DBI-based task and don't provide tools to help
> with the execute on commit/rollback feature.
>
> Ideas or comments?
>
> Cheers,
> Andrew
>
>
> --
> Andrew Sterling Hanenkamp
> Interaction Developer
> Boomer Consulting, Inc.
>
> 1.785.537.2358 ext. 17
> 1.888.266.6375 ext. 17
> 1.785.537.4545 (fax)
>
> 610 Humboldt
> Manhattan, KS 66502
>
> http://www.boomer.com/about/team/andrew-hanenkamp.html
> andrew.hanenkamp at boomer.com
>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
>


-- 
Best regards, Ruslan.


More information about the jifty-devel mailing list