[DB-SIG] Clarification of cursor.arraysize
mal at egenix.com
Tue Dec 19 09:43:00 CET 2006
On 2006-12-19 01:34, Carsten Haese wrote:
> On Tue, 2006-12-19 at 01:01 +0100, M.-A. Lemburg wrote:
>> On 2006-12-18 22:56, Art Protin wrote:
>>> While I am bothering you good people with my silly questions, I
>>> might just as well tack on another: if one invokes .executemany with a
>>> seq_of_parameters that is empty (like
>>> a_cursor.executemany(SQL, )
>>> ) shouldn't the interface module execute the query zero times, ie, not
>>> execute the query at all?
>> The SQL command could be a command that doesn't have any parameters.
>> In such a case, the above would be the same as .execute(SQL).
> I beg to differ. I think it's quite clear from the spec that
> cursor.executemany(SQL, ) is a no-op. To actually execute a
> parameter-less query with executemany, you'd have to pass an empty
> parameter tuple as in cursor.executemany(SQL, [()]).
You're right. Shouldn't be posting replies that late at night :-)
Professional Python Services directly from the Source (#1, Dec 19 2006)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the DB-SIG