Revision 2193
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
149 | 149 |
self.autocommit = autocommit |
150 | 150 |
self.caching = caching |
151 | 151 |
self.log_debug = log_debug |
152 |
self.debug = log_debug != log_debug_none |
|
152 | 153 |
|
153 | 154 |
self.__db = None |
154 | 155 |
self.query_results = {} |
... | ... | |
268 | 269 |
# Run query |
269 | 270 |
cur.execute(query, params) |
270 | 271 |
finally: |
271 |
if self.log_debug != log_debug_none: # only compute msg if needed
|
|
272 |
if self.debug: # only compute msg if needed
|
|
272 | 273 |
if used_cache: cache_status = 'Cache hit' |
273 | 274 |
elif cacheable: cache_status = 'Cache miss' |
274 | 275 |
else: cache_status = 'Non-cacheable' |
Also available in: Unified diff
sql.py: DbConn: Store whether in debug mode (log_debug != log_debug_none) for easy use by methods