[1.8.x] Refs #14030 -- Renamed CombinableMixin to Combinable
Removed unused method and updated docstrings.
Backport of 14d0bd67d4
from master
This commit is contained in:
parent
6c68e40e6e
commit
f858b51ee3
|
@ -11,7 +11,7 @@ from django.utils import timezone
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
|
|
||||||
|
|
||||||
class CombinableMixin(object):
|
class Combinable(object):
|
||||||
"""
|
"""
|
||||||
Provides the ability to combine one or two objects with
|
Provides the ability to combine one or two objects with
|
||||||
some connector. For example F('foo') + F('bar').
|
some connector. For example F('foo') + F('bar').
|
||||||
|
@ -184,6 +184,7 @@ class BaseExpression(object):
|
||||||
in this query
|
in this query
|
||||||
* reuse: a set of reusable joins for multijoins
|
* reuse: a set of reusable joins for multijoins
|
||||||
* summarize: a terminal aggregate clause
|
* summarize: a terminal aggregate clause
|
||||||
|
* for_save: whether this expression about to be used in a save or update
|
||||||
|
|
||||||
Returns: an ExpressionNode to be added to the query.
|
Returns: an ExpressionNode to be added to the query.
|
||||||
"""
|
"""
|
||||||
|
@ -297,9 +298,6 @@ class BaseExpression(object):
|
||||||
return agg, lookup
|
return agg, lookup
|
||||||
return False, ()
|
return False, ()
|
||||||
|
|
||||||
def prepare_database_save(self, field):
|
|
||||||
return self
|
|
||||||
|
|
||||||
def get_group_by_cols(self):
|
def get_group_by_cols(self):
|
||||||
if not self.contains_aggregate:
|
if not self.contains_aggregate:
|
||||||
return [self]
|
return [self]
|
||||||
|
@ -325,7 +323,7 @@ class BaseExpression(object):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
class ExpressionNode(BaseExpression, CombinableMixin):
|
class ExpressionNode(BaseExpression, Combinable):
|
||||||
"""
|
"""
|
||||||
An expression that can be combined with other expressions.
|
An expression that can be combined with other expressions.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue