Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
8bfc7cc6
Kaydet (Commit)
8bfc7cc6
authored
Eki 11, 2013
tarafından
Cody Scott
Kaydeden (comit)
Tim Graham
Eki 11, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor edits to docs/topics/db/queries.txt.
üst
848101bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
queries.txt
docs/topics/db/queries.txt
+9
-8
No files found.
docs/topics/db/queries.txt
Dosyayı görüntüle @
8bfc7cc6
...
...
@@ -140,8 +140,8 @@ To retrieve objects from your database, construct a
:class:`~django.db.models.Manager` on your model class.
A :class:`~django.db.models.query.QuerySet` represents a collection of objects
from your database. It can have zero, one or many *filters*
-- criteria that
narrow down the collection based on
given parameters. In SQL terms, a
from your database. It can have zero, one or many *filters*
. Filters narrow
down the query results based on the
given parameters. In SQL terms, a
:class:`~django.db.models.query.QuerySet` equates to a ``SELECT`` statement,
and a filter is a limiting clause such as ``WHERE`` or ``LIMIT``.
...
...
@@ -257,10 +257,10 @@ Example::
These three ``QuerySets`` are separate. The first is a base
:class:`~django.db.models.query.QuerySet` containing all entries that contain a
headline starting with "What". The second is a subset of the first, with an
additional criteria that excludes records whose ``pub_date`` is
greater than
now
. The third is a subset of the first, with an additional criteria that
selects only the records whose ``pub_date`` is
greater than now. The initial
:class:`~django.db.models.query.QuerySet` (``q1``) is unaffected by the
additional criteria that excludes records whose ``pub_date`` is
today or in the
future
. The third is a subset of the first, with an additional criteria that
selects only the records whose ``pub_date`` is
today or in the future. The
initial
:class:`~django.db.models.query.QuerySet` (``q1``) is unaffected by the
refinement process.
.. _querysets-are-lazy:
...
...
@@ -1079,8 +1079,9 @@ the foreign key aren't saved to the database until you call
>>> e.blog = some_blog
>>> e.save()
If a :class:`~django.db.models.ForeignKey` field has ``null=True`` set (i.e., it allows ``NULL``
values), you can assign ``None`` to it. Example::
If a :class:`~django.db.models.ForeignKey` field has ``null=True`` set (i.e.,
it allows ``NULL`` values), you can assign ``None`` to remove the relation.
Example::
>>> e = Entry.objects.get(id=2)
>>> e.blog = None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment