Revision 2500
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
115 | 115 |
else: quote = '"' |
116 | 116 |
elif module == 'MySQLdb': quote = '`' |
117 | 117 |
else: raise NotImplementedError("Can't escape name for "+module+' database') |
118 |
return quote + name.replace(quote, quote+quote) + quote |
|
119 |
# doubling an embedded quote escapes it in both PostgreSQL and MySQL |
|
118 |
return sql_gen.esc_name(name, quote) |
|
120 | 119 |
|
121 | 120 |
def esc_name_by_engine(engine, name, **kw_args): |
122 | 121 |
return esc_name_by_module(db_engines[engine][0], name, **kw_args) |
Also available in: Unified diff
sql.py: esc_name_by_module(): Use new sql_gen.esc_name()