[TransWarp] PROPOSAL: drop requirement for 'joinTxn=True'
on SQL exec
Phillip J. Eby
pje at telecommunity.com
Fri Mar 7 11:39:17 EST 2003
At 06:29 PM 3/7/03 +0200, alexander smishlajev wrote:
>Phillip J. Eby wrote:
>>
>>>so i vote for leaving the "joinTxn" binding in the SQLCursor, but change
>>>default behaviour from 'joinTxn=False' to 'joinTxn=True'. then PEAK
>>>users willing to disable transactional mechanisms will have an option to
>>>do so, but they must know what they're doing.
>>I think this is a YAGNI, because what I would personally do is always
>>write "offending" read queries with "AT ISOLATION LEVEL 0" or whatever
>>the appropriate SQL clause is. This also has the advantage of being more
>>explicit for when you show a DBA or other SQL maven your code. :)
>
>as far as i know, each sql server has different syntax for such
>things. this means that using these features requires writing sql
>statements that are not portable. ... but maybe this my opinion is
>obsolete: i have worked with different sql servers for several years, but
>it was relatively long ago.
Most also at least make some show of implementing ANSI SQL92, which
includes the 'AT ISOLATION LEVEL' clause.
If you need to write code that's portable across multiple DB servers, you
can always extend the ISQLConnection interface to include methods that do
the right thing, and then your app can require DB implementations that
support the right thing. At some point when I get around to it, I plan to
add another property hierarchy to 'peak.ini' that will allow you to specify
connection drivers separately from SQL address schemes. This would let you
use, for example, the existing GadflyURL class with an enhanced
GadflyConnection class.
More information about the PEAK
mailing list