logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Transaction-handling issues: msg#00015

Subject: Transaction-handling issues
Dear all,

One thing of the PySQLite interface that I find confusing is the  
transaction handling. It is convenient to have automatic transaction- 
begin but the way it combines with explicit transactions is  
confusing. Following are my issues, and a change proposal.

When automatic transactions are enabled, as per the default, PySQLite  
automatically issues a begin statement before it first executes an  
update or other dml-statement. In this mode, begin should never be  
added programmaticaly as an SQL-statement. Doing so will raise an  
error as soon as PySQLite does the automatic begin. The error mesage  
in this case is: "SQL Logic error or missing database".

The type of begin statement that is automaticly inserted can be any  
of the supported SQLite types (DEFERRED, IMMEDIATE, EXCLUSIVE). By  
default it is "" which is equivalent to DEFERRED. What confuses here  
is IMMEDIATE. As it is only inserted at the first dml, it actually  
becomes equivalent to DEFERRED.

Commit should, with the default operation mode, only be programmed as  
a call to the corresponding method. Commit as an SQL-statement should  
not be used. Doing so is punished by an error: "cannot commit - no  
transaction is active". While the changes really have been committed.

With automatic transaction-begin disabled (isolation_level=None), the  
other way around only commit as an SQL-statement may be used. Using  
the commit method in this mode, does not cause an error. But neither  
does it really commit changes.

Now I like to know if the following proposal makes sense.

To make PySQLite handle commit as an SQL-statement equally to the  
method. The only distinction would be that the method nay be called  
also if there are no changes to commit.

Secondly, but this may be more dificult, to allow a transaction to be  
explicitly started using BEGIN also when in the default operating  
mode. The interface should then be aware of the new transaction state.

I assume that this proposal is not against the dbapi v.2  
specification and that it would be "downwards compatible".

Best regards, Edzard Pasma


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe