Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
atomic transactions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kevin Geohagan  
View profile  
 More options Sep 10 2012, 1:14 pm
From: Kevin Geohagan <kevin.geoha...@gmail.com>
Date: Mon, 10 Sep 2012 10:14:48 -0700 (PDT)
Local: Mon, Sep 10 2012 1:14 pm
Subject: atomic transactions

I'm having trouble figuring out the proper way to do atomic commits.  My
intuition is that (for autocommit=False), everything passed to the
execute() method between calls to commit() (on a single given Cursor) gets
batched into a single atomic transaction.  Is that right, or should I be
trying to execute() everything in a big SQL statement?  Thanks.

K.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Kleehammer  
View profile  
 More options Sep 10 2012, 3:52 pm
From: Michael Kleehammer <mkleeham...@gmail.com>
Date: Mon, 10 Sep 2012 12:52:08 -0700 (PDT)
Local: Mon, Sep 10 2012 3:52 pm
Subject: Re: atomic transactions

You are correct - by default connections have autocommit set to False, so
everything you do is batched up, so to speak, until you call
Connection.commit (or Cursor.commit in recent source builds).

This makes coding very handy since you put the commit at the bottom of a
function.  If an exception occurs and the connection is closed (which
happens automatically if you don't keep references to it), the transaction
is rolled back.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Geohagan  
View profile  
 More options Sep 11 2012, 12:09 pm
From: Kevin Geohagan <kevin.geoha...@gmail.com>
Date: Tue, 11 Sep 2012 09:09:27 -0700 (PDT)
Local: Tues, Sep 11 2012 12:09 pm
Subject: Re: atomic transactions

Great, thanks for the help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »