summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-03-09 13:24:54 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-03-09 13:24:54 -0500
commit852e9954aaec7205e7ebaf3d0b232e1e8ff20e63 (patch)
treeeda5a78cc0f9a496c4b662885a4b5810669d6dc6 /lib/sqlalchemy/sql/util.py
parentd2a256a3ad48341e013b6e7a3e911495e5b5d31a (diff)
downloadsqlalchemy-852e9954aaec7205e7ebaf3d0b232e1e8ff20e63.tar.gz
A meaningful :attr:`.QueryableAttribute.info` attribute is
added, which proxies down to the ``.info`` attribute on either the :class:`.schema.Column` object if directly present, or the :class:`.MapperProperty` otherwise. The full behavior is documented and ensured by tests to remain stable. [ticket:2675]
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
-rw-r--r--lib/sqlalchemy/sql/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py
index fd138cfec..27ba0f95b 100644
--- a/lib/sqlalchemy/sql/util.py
+++ b/lib/sqlalchemy/sql/util.py
@@ -507,6 +507,9 @@ class AnnotatedColumnElement(Annotated):
"""pull 'key' from parent, if not present"""
return self._Annotated__element.key
+ @util.memoized_property
+ def info(self):
+ return self._Annotated__element.info
# hard-generate Annotated subclasses. this technique
# is used instead of on-the-fly types (i.e. type.__new__())