summaryrefslogtreecommitdiff
path: root/docs/db-api.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-15 03:58:20 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-15 03:58:20 +0000
commit3429fc0ff23e33a0090abbe68b1a286fcf230788 (patch)
tree005ab80012697c9e5237b8fb318cc43e14151342 /docs/db-api.txt
parent44d51dae687e1edadec96fd8152ed369b34171e2 (diff)
queryset-refactor: Added a bunch of "new in development version" markers for
recent additions. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
-rw-r--r--docs/db-api.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 49c28d5d5a..6e121b8f3d 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -533,6 +533,11 @@ primary key if there is no ``Meta.ordering`` specified. For example::
...since the ``Blog`` model has no default ordering specified.
+**New in Django development version:** The syntax for ordering across related
+models has changed. See the `Django 0.96 documentation`_ for the old behaviour.
+
+.. _Django 0.96 documentation: http://www.djangoproject.com/documentation/0.96/model-api/#floatfield
+
There's no way to specify whether ordering should be case sensitive. With
respect to case-sensitivity, Django will order results however your database
backend normally orders them.
@@ -607,6 +612,9 @@ A couple of subtleties that are worth mentioning:
>>> Entry.objects.values('blog_id')
[{'blog_id': 1}, ...]
+**New in Django development version:** Previously, it was not possible to pass
+``blog_id`` to ``values()`` in the above example, only ``blog``.
+
A ``ValuesQuerySet`` is useful when you know you're only going to need values
from a small number of the available fields and you won't need the
functionality of a model instance object. It's more efficient to select only
@@ -1563,9 +1571,9 @@ This is equivalent to the following SQL ``WHERE`` clause::
You can compose statements of arbitrary complexity by combining ``Q`` objects
with the ``&`` and ``|`` operators. You can also use parenthetical grouping.
-``Q`` objects can also be negated using the ``~`` operator, allowing for
-combined lookups that combine both a normal query and a negated (``NOT``)
-query::
+**New in Django development version:** ``Q`` objects can also be negated using
+the ``~`` operator, allowing for combined lookups that combine both a normal
+query and a negated (``NOT``) query::
Q(question__startswith='Who') | ~Q(pub_date__year=2005)