[DB-SIG] Next Version [was Re: Preparing statement API]
Stuart 'Zen' Bishop
zen@cs.rmit.edu.au
Mon, 31 Jan 2000 10:56:35 +1100 (EST)
On Sun, 30 Jan 2000, M.-A. Lemburg wrote:
> Quoting is generally not needed since you pass in the data
> via bound parameters. The DB interface does the needed quoting
> (if any) without user intervention.
I have largish Perl program that couldn't function without it - sort of
a command line data miner. Now that I think of it, it probably could have
been written using named parameters (rather than positional - what generic
PerlDBI supports). It would still be nice to access this though (eg. a GUI
SQL query builder or DBA tool that needs to be able to show the generated
HTML). Every DA needs the code, so it would be nice to access it :-)
> > con.autocommit(1)
> > mode = con.autocommit()
> >
> > As discussed above. An interesting point from the docs - 'Drivers
> > should always default to AutoCommit mode. (An unfortunate choice
> > forced on the DBI by ODBC and JDBC conventions.)'. I see no
> > reason why we can't do it properly :-)
>
> See above... all drivers should default to auto-commit mode
> being *disabled*.
Yes - properly :-) Death to MySQL! *duck*.
> Not sure what you're talking about here... what issues were there ?
I'm not sure either :-) I seem to remember some discussion about transaction
starts, but I can't find it in the archives :-( It is either FUD, an
overactive imagination on my part, or relates to the following from
http://www.zope.org/Members/petrilli/DARoadmap :
self._begin - This is called at the beginning of every transaction.
Depending on your database, and its implementation of "implicit
transactions", you may or may not have to do anything here besides a
pass.
If the PyDB API states that a new transaction is implicitly started on
connection, rollback or commit, or the first executable command afterwards,
then self._begin in a ZopeDA->PyDB adaptor can just be 'pass'. This
might be part of the SQL spec - I'm not sure.
I can't think of any databases I've dealt with that self._begin would
be needed. Can anyone think of situations where it *is* needed? I think
ZopeDA's need the call, as they are designed to support non-SQL databases
as well such as IMAP, LDAP, plain text, ad infinitum.
--
___
// Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au
// E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au
//__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen