mirror of
https://github.com/django/django.git
synced 2025-07-06 02:39:12 +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 True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def join(self, (lhs, table, lhs_col, col), always_create=False,
|
def join(self, connection, always_create=False, exclusions=(),
|
||||||
exclusions=(), promote=False, outer_if_first=False, nullable=False):
|
promote=False, outer_if_first=False, nullable=False):
|
||||||
"""
|
"""
|
||||||
Returns an alias for a join between 'table' and 'lhs' on the given
|
Returns an alias for the join in 'connection', either reusing an
|
||||||
columns, either reusing an existing alias for that join or creating a
|
existing alias for that join or creating a new one. 'connection' is a
|
||||||
new one.
|
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
|
lhs.lhs_col = table.col
|
||||||
'always_create' is True, a new alias is always created, regardless of
|
|
||||||
whether one already exists or not.
|
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
|
If 'exclusions' is specified, it is something satisfying the container
|
||||||
protocol ("foo in exclusions" must work) and specifies a list of
|
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
|
If 'nullable' is True, the join can potentially involve NULL values and
|
||||||
is a candidate for promotion (to "left outer") when combining querysets.
|
is a candidate for promotion (to "left outer") when combining querysets.
|
||||||
"""
|
"""
|
||||||
|
lhs, table, lhs_col, col = connection
|
||||||
if lhs is None:
|
if lhs is None:
|
||||||
lhs_table = None
|
lhs_table = None
|
||||||
is_table = False
|
is_table = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user