Project

General

Profile

« Previous | Next » 

Revision 862

sql.py: If run_raw_query.debug flag is set, print each query executed (on a single line)

View differences:

lib/sql.py
5 5
import sys
6 6

  
7 7
import exc
8
import strings
8 9
import util
9 10

  
10 11
##### Exceptions
......
51 52
##### Querying
52 53

  
53 54
def run_raw_query(db, query, params=None):
55
    if run_raw_query.debug: sys.stderr.write(strings.one_line(query)+'\n')
54 56
    cur = db.cursor()
55 57
    try: cur.execute(query, params)
56 58
    except Exception, e:

Also available in: Unified diff