Useful MySQL Routines

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Apr 19 13:16:51 CEST 2009

In message <mailman.4148.1240135989.11746.python-list at>, Tino 
Wildenhain wrote:

> Lawrence D'Oliveiro wrote:
>> I've done a writeup on some of the basic routines I frequently use here
>> <>.
> Why is that specific to mysql?

Because that's all I've used so far. Though sqlite looks interesting for 
single-user stuff...

> Btw, the bulkinserter could be better done by using executemany
> and select usefull batch sizes.

Hmm, I've never bothered with executemany. The code as written copes 
comfortably with 10,000 records or so.

> If you allow query construnction
> better don't forget appropriate quoting of table- and column names
> too to be on the safe side.

Hmm, I never worried about that, because I was I tried to be careful in the 
names I chose. And I've never allowed object names to come from user input 

Besides, how do you deal with characters that are still illegal when quoted 

More information about the Python-list mailing list