ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby concepts part 2 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby concepts part 2
#4654
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
The DBI provides two methods to either commit or rollback a transaction.

There is one more method called transaction which can be used to implement transactions.

There are two simple approaches to implement transactions
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4655
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
The second approach uses the transaction method.

This is simpler, because it takes a code block containing the statements that make up the transaction
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4656
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
The first approach uses DBI's commit and rollback methods to explicitly commit or cancel the transaction:
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4657
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
The transaction method executes the block, then invokes commit or rollback automatically, depending on whether the block succeeds or fails.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4658
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
COMMIT Operation

Commit is the operation which gives a green signal to database to finalize the changes and after this operation no change can be reverted back
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4659
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby concepts part 2 3 Years, 10 Months ago Karma: 0  
ROLLBACK Operation

If we are not satisfied with one or more of the changes and we want to revert back those changes completely then use rollback method
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved