mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
queryset-refactor: Removed some tuple unpacking in a function signature.
This isn't going to be permitted in Python 3, so might as well not use it here. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
83e00a2371
commit
e2b3c50cf0
@ -607,16 +607,19 @@ class Query(object):
|
||||
return True
|
||||
return False
|
||||
|
||||
def join(self, (lhs, table, lhs_col, col), always_create=False,
|
||||
exclusions=(), promote=False, outer_if_first=False, nullable=False):
|
||||
def join(self, connection, always_create=False, exclusions=(),
|
||||
promote=False, outer_if_first=False, nullable=False):
|
||||
"""
|
||||
Returns an alias for a join between 'table' and 'lhs' on the given
|
||||
columns, either reusing an existing alias for that join or creating a
|
||||
new one.
|
||||
Returns an alias for the join in 'connection', either reusing an
|
||||
existing alias for that join or creating a new one. 'connection' is a
|
||||
tuple (lhs, table, lhs_col, col) where 'lhs' is either an existing
|
||||
table alias or a table name. The join correspods to the SQL equivalent
|
||||
of::
|
||||
|
||||
'lhs' is either an existing table alias or a table name. If
|
||||
'always_create' is True, a new alias is always created, regardless of
|
||||
whether one already exists or not.
|
||||
lhs.lhs_col = table.col
|
||||
|
||||
If 'always_create' is True, a new alias is always created, regardless
|
||||
of whether one already exists or not.
|
||||
|
||||
If 'exclusions' is specified, it is something satisfying the container
|
||||
protocol ("foo in exclusions" must work) and specifies a list of
|
||||
@ -633,6 +636,7 @@ class Query(object):
|
||||
If 'nullable' is True, the join can potentially involve NULL values and
|
||||
is a candidate for promotion (to "left outer") when combining querysets.
|
||||
"""
|
||||
lhs, table, lhs_col, col = connection
|
||||
if lhs is None:
|
||||
lhs_table = None
|
||||
is_table = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user