onyxfish/csvkit — pull request #125 by migonzalvar (2011-10-09 18:00:21+00:00)
Title: Escape quotes in insert statement generation

Escape quotes in insert statement generation using repr(). It also adds 2 tests with strings containing ```'``` and ```"```.

I know this is not a fully database specific solution but IMHO I think it's better than current situation. At least it works for me :-).

I also changed in test_sql.py make_insert_statement(self) to test_make_insert_statement(self) and fix a method call from _prepare_rows_for_serialization() to to_rows(serialize_dates=True).