summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2014-12-01 09:28:01 +0200
committerTim Graham <timograham@gmail.com>2015-01-08 14:07:54 -0500
commit0c7633178fa9410f102e4708cef979b873bccb76 (patch)
treecd46a196f4066f5759623ccb1ede096c5806a414 /docs
parentb8abfe141be17f20079f55b921dcaf7abe116c4b (diff)
Fixed #24020 -- Refactored SQL compiler to use expressions
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/custom-model-fields.txt2
-rw-r--r--docs/ref/models/expressions.txt2
-rw-r--r--docs/ref/models/fields.txt2
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
index 6474742222..f35cc41d3d 100644
--- a/docs/howto/custom-model-fields.txt
+++ b/docs/howto/custom-model-fields.txt
@@ -483,7 +483,7 @@ instances::
class HandField(models.Field):
# ...
- def from_db_value(self, value, connection):
+ def from_db_value(self, value, connection, context):
if value is None:
return value
return parse_hand(value)
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index defcdb0217..126455aba4 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -399,7 +399,7 @@ calling the appropriate methods on the wrapped expression.
clone.expression = self.expression.relabeled_clone(change_map)
return clone
- .. method:: convert_value(self, value, connection)
+ .. method:: convert_value(self, value, connection, context)
A hook allowing the expression to coerce ``value`` into a more
appropriate type.
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index bc214fae00..8604137afe 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1670,7 +1670,7 @@ Field API reference
When loading data, :meth:`from_db_value` is used:
- .. method:: from_db_value(value, connection)
+ .. method:: from_db_value(value, connection, context)
.. versionadded:: 1.8