After a quick look at the execute () method of the Cursor object of the MySQLdb package (it seems to be a de facto package for integrating with mysql, I think), it seems that (at least by default) this is only string interpolation and quoting, and not the actual parameterized query:
if args is not None: query = query % db.literal(args)
If this is not string interpolation, then what is?
In the case of execution, it actually tries to perform insert / replace as a single statement, rather than execute it in a loop. Something about it seems to be no magic. At least not by default.
EDIT: Oh, I just realized that the modulo operator can be overestimated, but I felt like a hoax and blurred the source. However, no mod overrides were found.
shylent Dec 22 '09 at 18:04 2009-12-22 18:04
source share