summaryrefslogtreecommitdiff
path: root/test/sql/query.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-09-26 17:08:19 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-09-26 17:08:19 +0000
commit3e672bbfc8d284b58208987d5fb858e424d02111 (patch)
treef0ddef9742f0a25f93922cdb429dec68e3139e10 /test/sql/query.py
parent9d16ae440b416358b469e6881f1203095233c37c (diff)
downloadsqlalchemy-3e672bbfc8d284b58208987d5fb858e424d02111.tar.gz
- created a link between QueryContext and SelectionContext; the attribute
dictionary of QueryContext is now passed to SelectionContext inside of Query.instances(), allowing messages to be passed between the two stages. - removed the recent "exact match" behavior of Alias objects, they're back to their usual behavior. - tightened up the relationship between the Query's generation of "eager load" aliases, and Query.instances() which actually grabs the eagerly loaded rows. If the aliases were not specifically generated for that statement by EagerLoader, the EagerLoader will not take effect when the rows are fetched. This prevents columns from being grabbed accidentally as being part of an eager load when they were not meant for such, which can happen with textual SQL as well as some inheritance situations. It's particularly important since the "anonymous aliasing" of columns uses simple integer counts now to generate labels.
Diffstat (limited to 'test/sql/query.py')
-rw-r--r--test/sql/query.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/test/sql/query.py b/test/sql/query.py
index e64425e91..a519dd974 100644
--- a/test/sql/query.py
+++ b/test/sql/query.py
@@ -429,22 +429,6 @@ class QueryTest(PersistTest):
self.assertEqual([x.lower() for x in r.keys()], ['user_name', 'user_id'])
self.assertEqual(r.values(), ['foo', 1])
- def test_exact_match(self):
- """test that an Alias object only targets result columns that were generated
- from that Alias. This is also part of eager_relations.py/test_no_false_hits.
- """
-
- users.insert().execute(user_id=1, user_name='ed')
- users_alias = users.alias()
- result = users.select().execute()
- row = result.fetchone()
- assert users_alias.c.user_id not in row
-
- result = users_alias.select().execute()
- row = result.fetchone()
- assert users_alias.c.user_id in row
-
-
@testing.unsupported('oracle', 'firebird')
def test_column_accessor_shadow(self):
meta = MetaData(testbase.db)