On 15 jan, 14:47, "Michael Bayer" <[email protected]> wrote:
>
> > How can I circunvent this?
>
> use db.ahr_relat.c.query ?
>
Yes, Mike, how can I access the column called "query" in the table
ahr_relat?
Calling db.ahr_relat.c.query will raise "AttributeError: query" as
expected, given that db.ahr_relat.c.has_key('query') is False (as
demonstrated in the previous example I sent).
Look:
>>> r = db.ahr_relat.first()
>>> r.c.query
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.5-
py2.6.egg/sqlalchemy/util.py", line 649, in __getattr__
raise AttributeError(key)
AttributeError: query
>>> r._table.c.query
Column(u'query', PGText(length=None, convert_unicode=False,
assert_unicode=None), table=<ahr_relat>)
Thanks in advance,
--
Paulo
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.