1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[soc2009/multidb] Merged up to trunk r10865

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2009-06-02 02:46:02 +00:00
parent 059dac0207
commit 4cd29f2520
17 changed files with 1188 additions and 470 deletions

View File

@@ -689,7 +689,7 @@ class BaseQuery(object):
If 'with_aliases' is true, any column names that are duplicated
(without the table names) are given unique aliases. This is needed in
some cases to avoid ambiguitity with nested queries.
some cases to avoid ambiguity with nested queries.
"""
qn = self.quote_name_unless_alias
qn2 = self.connection.ops.quote_name
@@ -1303,7 +1303,7 @@ class BaseQuery(object):
opts = self.model._meta
root_alias = self.tables[0]
seen = {None: root_alias}
# Skip all proxy to the root proxied model
proxied_model = get_proxied_model(opts)
@@ -1732,7 +1732,7 @@ class BaseQuery(object):
raise MultiJoin(pos + 1)
if model:
# The field lives on a base class of the current model.
# Skip the chain of proxy to the concrete proxied model
# Skip the chain of proxy to the concrete proxied model
proxied_model = get_proxied_model(opts)
for int_model in opts.get_base_chain(model):
@@ -2362,7 +2362,7 @@ class BaseQuery(object):
return cursor
if result_type == SINGLE:
if self.ordering_aliases:
return cursor.fetchone()[:-len(results.ordering_aliases)]
return cursor.fetchone()[:-len(self.ordering_aliases)]
return cursor.fetchone()
# The MULTI case.