[DB-SIG] Clarification of cursor.arraysize
carsten at uniqsys.com
Tue Dec 19 01:34:43 CET 2006
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, [()]).
Carsten Haese | Phone: (419) 861-3331
Software Engineer | Direct Line: (419) 794-2531
Unique Systems, Inc. | FAX: (419) 893-2840
1687 Woodlands Drive | Cell: (419) 343-7045
Maumee, OH 43537 | Email: carsten at uniqsys.com
More information about the DB-SIG