Revision 867
Added by Aaron Marcuse-Kubitza almost 13 years ago
sql.py | ||
---|---|---|
57 | 57 |
##### Querying |
58 | 58 |
|
59 | 59 |
def run_raw_query(db, query, params=None): |
60 |
if run_raw_query.debug: sys.stderr.write(strings.one_line(query)+'\n') |
|
61 | 60 |
cur = db.cursor() |
62 | 61 |
try: cur.execute(query, params) |
63 | 62 |
except Exception, e: |
64 | 63 |
_add_cursor_info(e, cur) |
65 | 64 |
raise |
65 |
if run_raw_query.debug: |
|
66 |
sys.stderr.write(strings.one_line(get_cur_query(cur))+'\n') |
|
66 | 67 |
return cur |
67 | 68 |
|
68 | 69 |
##### Recoverable querying |
Also available in: Unified diff
sql.py: run_raw_query(): In debug mode, print query after params have been substituted in