do not quote non-string values

This commit is contained in:
Jeremy Carbaugh 2010-03-09 10:49:55 -05:00 committed by James Turk
parent 6ffce4cf6e
commit 96e8dd7b45

View File

@ -137,6 +137,8 @@ class SqlDumpEmitter(Emitter):
table_name, '`,`'.join(fieldnames))
def quote(self, item):
if not isinstance(item, ('unicode','str')):
return "%s" % item
item = item.replace("\\","\\\\").replace("'","\\'").replace(chr(0),'0')
return "'%s'" % item