summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/visitors.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-04-07 01:12:44 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-04-07 01:12:44 +0000
commite3b2305d6721a1f1ed20f9c520765f7c33876f32 (patch)
tree8fa4a5565f42dc836a22c44219762dee4b933fd7 /lib/sqlalchemy/sql/visitors.py
parent5b3cddc48e5b436a0c46f0df3b016a837d823c92 (diff)
downloadsqlalchemy-e3b2305d6721a1f1ed20f9c520765f7c33876f32.tar.gz
- merged -r4458:4466 of query_columns branch
- this branch changes query.values() to immediately return an iterator, adds a new "aliased" construct which will be the primary method to get at aliased columns when using values() - tentative ORM versions of _join and _outerjoin are not yet public, would like to integrate with Query better (work continues in the branch) - lots of fixes to expressions regarding cloning and correlation. Some apparent ORM bug-workarounds removed. - to fix a recursion issue with anonymous identifiers, bind parameters generated against columns now just use the name of the column instead of the tablename_columnname label (plus the unique integer counter). this way expensive recursive schemes aren't needed for the anon identifier logic. This, as usual, impacted a ton of compiler unit tests which needed a search-n-replace for the new bind names.
Diffstat (limited to 'lib/sqlalchemy/sql/visitors.py')
-rw-r--r--lib/sqlalchemy/sql/visitors.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/visitors.py b/lib/sqlalchemy/sql/visitors.py
index 7eccc9b89..792391929 100644
--- a/lib/sqlalchemy/sql/visitors.py
+++ b/lib/sqlalchemy/sql/visitors.py
@@ -161,7 +161,14 @@ class NoColumnVisitor(ClauseVisitor):
__traverse_options__ = {'column_collections':False}
-
+class NullVisitor(ClauseVisitor):
+ def traverse(self, obj, clone=False):
+ next = getattr(self, '_next', None)
+ if next:
+ return next.traverse(obj, clone=clone)
+ else:
+ return obj
+
def traverse(clause, **kwargs):
"""traverse the given clause, applying visit functions passed in as keyword arguments."""