Let's say I have the following code:
public void doSomething() {
// begin transaction
// do stuff 1
...
// update a row which must be committed now
...
// do stuff 2
...
// commit transaction
}
I've kept the large amount of work on the database in the one method to simplify the pseudo code. However, basically I have a series of database work that I won't want to commit until the end. In the middle of the transaction above, I need to commit something to a row without committing the rest of the transaction. How would I commit that small bit of work without affecting the rest of the transaction?