summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index a9ef45dc1..3b996d6cb 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -987,6 +987,13 @@ class ClauseElement(Visitable):
@property
def _cloned_set(self):
+ """Return the set consisting all cloned anscestors of this ClauseElement.
+
+ Includes this ClauseElement. This accessor tends to be used for
+ FromClause objects to identify 'equivalent' FROM clauses, regardless
+ of transformative operations.
+
+ """
f = self
while f is not None:
yield f
@@ -1008,7 +1015,11 @@ class ClauseElement(Visitable):
if Annotated is None:
from sqlalchemy.sql.util import Annotated
return Annotated(self, values)
-
+
+ def _deannotate(self):
+ """return a copy of this ClauseElement with an empty annotations dictionary."""
+ return self._clone()
+
def unique_params(self, *optionaldict, **kwargs):
"""Return a copy with ``bindparam()`` elments replaced.