I'm using SQLalchemy w/0.9a4 as such:
---
[dev.cfg]
sqlalchemy.dburi="postgres://database=xxxx&host=localhost&user=xxx"
sqlalchemy.echo = 1
[model.py]
import turbogears
engine = __engine__ = turbogears.database.PackageEngine("findmeon")
engine.echo = True
---
I tossed 2 echos in there, as neither seemed to work
I did a bunch of tracing / debugging / exploring and found that this
will turn echo on (at least in 'tg-admin shell' ):
engine._engine.echo = True
if anyone else is using SQLalchemy , can you confirm that is is a bug
or if this is likely an issue with my install ?
i think the issue is because echo isn't carried over into the engine
instantiation.
echo._engine is a None type on startup - its not a
'sqlalchemy.databases.postgres.PGSQLEngine object' until a query is
made
onece a query is made, it is instantiated, but there is no echo set.
at that point, using tg-admin shell, one can set 'engine._engine.echo =
True' , and echo will work. setting it before a query is made ( which
instantiates a connection ), will just raise an exception on a None
Type.