Revision 2371
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
23 | 23 |
elif hasattr(cur, '_last_executed'): raw_query = cur._last_executed |
24 | 24 |
|
25 | 25 |
if raw_query != None: return raw_query |
26 |
else: return repr(input_query)+' % '+repr(input_params)
|
|
26 |
else: return '[input] '+strings.ustr(input_query)+' % '+repr(input_params)
|
|
27 | 27 |
|
28 | 28 |
def _add_cursor_info(e, *args, **kw_args): |
29 | 29 |
'''For params, see get_cur_query()''' |
Also available in: Unified diff
sql.py: get_cur_query(): If no raw query: Use strings.ustr() instead of repr() to ensure that if the exception is parsed, embedded quotes will not be double-escaped. Prefix the query by [input] to show that it's not the raw query.