]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use .expression accessor for hybrid example
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Dec 2020 13:52:15 +0000 (08:52 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Dec 2020 13:52:15 +0000 (08:52 -0500)
commit688b4ca6a7f2e32c580d616c6dea1e68b7398fd2
tree3210687271cac82ae76671dd26dbcc74b5299c91
parente8c6780d9e102a49cc2b1c7a1e5d735c81659caf
Use .expression accessor for hybrid example

hybrids since 1.1 use InstrumentedAttribute at the expression
level, so this doc needed to illustrate how to get at the
SQL expression.  Also added a docstring for
QueryableAttribute.expression.

Fixes: #5773
Change-Id: I4941d245ec947999abfa8e13f047e06a0bd47e5b
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/attributes.py