I see but I've done some database work back in the days. If you keep business 
logic on application side you often need reading from database too in your 
write transactions for enforcing rules etc.

I think something like this is a possible use case:
    
    
    db.startTransaction(t):
      read status of some (previously committed) business document,
      if everything checks:
        confirm money (business) transaction
        commit
      else:
         rollback
         show error
    
    
    Run

I mean, there are times you may not know if you will commit or rollback before 
starting transaction. Thats what I had in mind. 

Reply via email to