On Dec 17, 7:18 pm, hendra kusuma <[email protected]> wrote:
> Dear All,
>
> I am new member here
> I just learning ruby for about 1-2 year
> and I found sequel few months ago
>
> It's good and I really like it
>
> One simple question
> how do we know if a process is not successful in  transaction?
>
> DB.transaction do
>   dataset.insert(:field => data)
> end

If the insert raises an error, the transaction will be rolled back,
and the Sequel::DatabaseError will be reraised.  So if that code
doesn't raise an error, the process was successful.

Jeremy

--

You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en.


Reply via email to