[DB-SIG] paramstyles (mysql string length?)
gh at ghaering.de
Wed Apr 19 16:46:04 CEST 2006
M.-A. Lemburg wrote:
> Carsten Haese wrote:
>>On Wed, 2006-04-19 at 08:24, M.-A. Lemburg wrote:
>>>I've found the qmark style to be sufficient for everything
>>I agree. Considering that many modules already support qmark, and those
>>that currently use 'format'/'pyformat' would have to move to something
>>else if these are dropped, I'd like to suggest that supporting 'qmark'
>>style should become a required feature. Modules would be free to also
>>implement 'named' and/or 'numeric', but supporting 'qmark' should be
> I'm not sure whether that's easily possible for database modules
> which rely on different marker mechanisms, e.g. some modules
> probably use the implicit type information in the pyformat style
> to find out which method to use for binding variables.
The ones I know about (pysqlite 1.x, pyPgSQL, psycopg, MySQLdb) all only
look at the Python values, not at the pyformat format character for
deciding how to bind the variable.
More information about the DB-SIG