]> 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:58:25 +0000 (08:58 -0500)
commit236bf7b5f118a6f34d8e56c4ebc5897e0a276b29
tree7190a9a896b6a014be87d607bdae84535dcd4572
parent60d7a9bd25e7dd642a220e4936f9adb66a22253f
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
(cherry picked from commit 688b4ca6a7f2e32c580d616c6dea1e68b7398fd2)
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/attributes.py