DB-API format string conventions

2004-12-28 Thread Craig Ringer
Hi all I've recently been writing some code that for various reasons needs to support a couple of different PostgreSQL APIs for Python, and have the potential for MySQL support down the track. I've been running into a fair bit of trouble with the DB API, in particular the freedom it gives DB modul

Re: DB-API format string conventions

2004-12-28 Thread Craig Ringer
On Tue, 2004-12-28 at 18:29, Craig Ringer wrote: > Would there be any interest in releasing a DB-API 2.1 with one > parameter style made MANDATORY, and a tuple of other supported styles in > .paramstyles ? I think existing modules implemented in Python could be > retrofitted to take extended

Re: DB-API format string conventions

2004-12-28 Thread Steve Holden
Craig Ringer wrote: On Tue, 2004-12-28 at 18:29, Craig Ringer wrote: Would there be any interest in releasing a DB-API 2.1 with one parameter style made MANDATORY, and a tuple of other supported styles in .paramstyles ? I think existing modules implemented in Python could be retrofitted to

Re: DB-API format string conventions

2004-12-28 Thread Skip Montanaro
Craig> IMO it'd also be very nice to support **kw calling style, ie to Craig> make: Craig> cursor.execute("SELECT somerow FROM table WHERE otherrow = %(name)s", Craig>{'name': 'fred'}) Craig> equivalent to: Craig> cursor.execute("SELECT somerow FROM table

Re: DB-API format string conventions

2004-12-28 Thread Craig Ringer
On Tue, 2004-12-28 at 21:16, Steve Holden wrote: > > So ... anybody for a DB-API 2.1 with mandatory pyformat support and a > > tuple dbmodule.paramstyles for supported styles? > > Well, you can certainly put me down as supporting less variability in > allowed paramstyles, to the extent that it

Re: DB-API format string conventions

2004-12-28 Thread Dan Sommers
On Tue, 28 Dec 2004 19:08:10 +0800, Craig Ringer <[EMAIL PROTECTED]> wrote: > IMO it'd also be very nice to support **kw calling style, ie to make: > cursor.execute("SELECT somerow FROM table WHERE otherrow = %(name)s", >{'name': 'fred'}) > equivalent to: > cursor.execute("SELEC

Re: DB-API format string conventions

2004-12-28 Thread Denis S. Otkidach
On Tue, 28 Dec 2004 22:02:59 +0800 Craig Ringer <[EMAIL PROTECTED]> wrote: > I'm not actually against the number of choices available, I'm just > concerned that there is currently no _single_ choice that can be > guaranteed to work, and that it's hard to identify all styles a given > API supports.

[Fwd: Re: DB-API format string conventions]

2004-12-28 Thread Steve Holden
[posted after mailing response in error] Craig Ringer wrote: On Tue, 2004-12-28 at 21:16, Steve Holden wrote: So ... anybody for a DB-API 2.1 with mandatory pyformat support and a tuple dbmodule.paramstyles for supported styles? Well, you can certainly put me down as supporting less variability i