summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index e27b97802..416a4e82e 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -300,6 +300,13 @@ class ClauseElement(
f = f._is_clone_of
return s
+ @property
+ def entity_namespace(self):
+ raise AttributeError(
+ "This SQL expression has no entity namespace "
+ "with which to filter from."
+ )
+
def __getstate__(self):
d = self.__dict__.copy()
d.pop("_is_clone_of", None)
@@ -4664,6 +4671,13 @@ class ColumnClause(
# expect the columns of tables and subqueries to be leaf nodes.
return []
+ @property
+ def entity_namespace(self):
+ if self.table is not None:
+ return self.table.entity_namespace
+ else:
+ return super(ColumnClause, self).entity_namespace
+
@HasMemoized.memoized_attribute
def _from_objects(self):
t = self.table