Revision 2068
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
255 | 255 |
'''For args, see DbConn.run_query()''' |
256 | 256 |
return db.run_query(*args, **kw_args) |
257 | 257 |
|
258 |
def mogrify(db, query, params): |
|
259 |
module = util.root_module(db.db) |
|
260 |
if module == 'psycopg2': return db.db.cursor().mogrify(query, params) |
|
261 |
else: raise NotImplementedError("Can't mogrify query for "+module+ |
|
262 |
' database') |
|
263 |
|
|
258 | 264 |
##### Recoverable querying |
259 | 265 |
|
260 | 266 |
def with_savepoint(db, func): |
Also available in: Unified diff
sql.py: Added mogrify()