summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-05-18 16:08:33 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-05-18 16:21:54 -0400
commit53af60b3536221f2503af29c1e90cf9db1295faf (patch)
tree13d5e142ed0759e63fb4fee7aa244519703e42ed /lib/sqlalchemy/orm/query.py
parentde1fd55af4ef352ebbc95e03d868aab2995a8261 (diff)
downloadsqlalchemy-53af60b3536221f2503af29c1e90cf9db1295faf.tar.gz
Streamline visitors.iterate
This method might be used more significantly in the ORM refactor, so further refine it. * all get_children() methods now work entirely based on iterators. Basically only select() was sensitive to this anymore and it now chains the iterators together * remove all kinds of flags like column_collections, schema_visitor that apparently aren't used anymore. * remove the "depthfirst" visitors as these don't seem to be used either. * make sure select() yields its columns first as these will be used to determine the current mapper. Change-Id: I05273a2d5306a57c2d1b0979050748cf3ac964bf
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r--lib/sqlalchemy/orm/query.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index 6e22a6904..db1fbea2c 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -4660,10 +4660,7 @@ class _ColumnEntity(_QueryEntity):
return self.mapper
else:
- for obj in visitors.iterate(
- self.column,
- {"column_tables": True, "column_collections": False},
- ):
+ for obj in visitors.iterate(self.column, {"column_tables": True},):
if "parententity" in obj._annotations:
return obj._annotations["parententity"]
elif "deepentity" in obj._annotations: