[IronPython] Django 1.1 on IronPython 2.6rc2 findings
vernondcole at gmail.com
Thu Oct 29 16:04:15 CET 2009
I am cross posting here my inquiry sent to db-sig about how to change
paramstyles, along with the only response.
If you feel that option #1 below is NOT the way to go, please say something
M.-A. Lemburg ✆ to me, db-sig
> show details Sep 26
> Vernon Cole wrote:
> > I am planning to add, as an extension, the ability for adodbapi to change
> > its paramstyle. I personally like "named" much better than "qmark", and
> > happens that django expects to have "format", so I will add that, too.
> > My question is, what would be an appropriate way to specify the altered
> > paramstyle?
> > 1) As an attribute of the connection:
> > con = adodbapi.connect('spam eggs")
> > con.paramstyle = "named"
> Most other configuration parameters are made available on
> connections and cursors (with the cursor setting overriding the
> connection one), so I think that's the most DB-API
> compatible way of implementing this.
> > 2) Make the module global mutable:
> > adodbapi.adodbapi.paramstyle = "named" # [ ick! ]
> > 3) As a named parameter of the connection:
> > con = adodbapi.connect("spam eggs", paramstyle="named")
> > Has anyone else done this?
> > How did they do it?
> > How will some speculated future db-api version 3.0 want it?
> Probably in the way you mentioned above.
> The module global would then provide to the default setting.
> Marc-Andre Lemburg
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users