[DB-SIG] paramstyles, again (and now voting)
carsten at uniqsys.com
Mon Jun 4 17:17:25 CEST 2007
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
> * 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
might want to convey which paramstyles the module can accept. I see two
* 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
I think the second one should be done regardless, but I'd be in favor of
also having the explicit paramstyles metadata.
More information about the DB-SIG