On Fri, Dec 18, 2009 at 11:39 AM, Jeremy Evans <[email protected]>wrote:
> 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 > > -- Sorry for not making myself clear What I really intend to do is catch if there is error you know, like begin rescue end can I add a rescue there? I cannot seem to find any doc with source example Thanks -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -- 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.
