Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Idea on how to encapsulate many ORM operations into a transaction ? #9

@xadhoom

Description

@xadhoom

I'm thinking a way to implement a transaction handling to protect several operations,
somethink like AR does:

Account.transaction do
balance.save!
account.save!
end

(see http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html for other examples).

this is very useful when you want to do several operations with the orm and rollback if any of these operations fails. The rollback can be automatic (like twisted txns do) and an exception can be raised back to the application.

what do you suggest can be the best way to implement into twistar ?
I can start looking at it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions