Re: [SQLObject] connection URI and debug?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Mike W. <li...@mi...> - 2004-07-30 17:43:05
|
On Fri, 2004-07-30 at 10:06, wo...@un... wrote: > I use current svn 0.6 version. > How can I view SQL when using URIs (mysql://user:pass@host/dbname)? > Documentation says it is possible to pass the keyword argument debug=1 to > connection object, and it works with MySQLConnection(), > but how can I achieve the same with URI string? Try something like this: connection = connectionForURI(dsn) connection.debug = True If that doesn't behave, there may be some implementation differences between PostgresConnection (which I use) and MySQL and others. I've noted some minor differences between Postgres and sqlite adaptors. > BTW simpleperson.py example tries to set debug but fails: > Traceback (most recent call last): > File "simpleperson.py", line 59, in ? > conn.debug = 1 > AttributeError: 'str' object has no attribute 'debug' |