[DB-SIG] paramstyles, again (and now voting)

Carl Karsten carl at personnelware.com
Mon Jun 4 19:13:52 CEST 2007


Carsten Haese wrote:
 > On Mon, 2007-06-04 at 16:32 +0200, M.-A. Lemburg wrote:
 >> On 2007-06-04 16:00, Carsten Haese wrote:
 >>>> So I'm:
 >>>>
 >>>>  * +1 on making support one param style mandatory for all
 >>>>    implementations
 >>> Any one? Let's make named mandatory, then.
 >> I intentionally left this open :-)
 >>
 >> We should have a vote on it. Let's gather votes for say two weeks
 >> and then see what the outcome is.
 >
 > Here's my vote:
 >
 > +1 on qmark
 > +1 on named
 > +0 on numeric
 > -1 on format
 > -1 on pyformat
 >
 >>> +1, let's discuss what that interface should look like.
 >> We basically have two options:
 >>
 >>  * use an attribute which is inherited from connections to
 >>    cursors
 >>
 >>  * use a get/set method approach with much the same meaning
 >>
 >> For simplicity, I'd be in favor of adding a settable
 >> .paramstyle attribute.
 >
 > +1 on connection.paramstyle and cursor.paramstyle attributes.
 >
 > We should also discuss what is to happen to the .paramstyle module
 > attribute. Naturally, the attribute would reflect the module's default
 > style (and this default should not be settable module wide). However, we

Hmm, default style brings up a new issue:
If there will be more than one style, should there be a common default?

 > might want to convey which paramstyles the module can accept. I see two
 > options:
 >
 > * Invent a new module attribute called paramstyles that is a list or set
 > of supported paramstyles.
 > * Simply raise ValueError if the programmer requests an unsupported
 > parameter style.

I kinda think it been decided that the set of styles will be required of all
modules.  But given that it was never voted on, add it to the ballot.

Carl K



More information about the DB-SIG mailing list