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
84cafc2b
Kaydet (Commit)
84cafc2b
authored
Haz 05, 2014
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix missing highlighting in some code examples
üst
5643a3b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
queries.txt
docs/topics/db/queries.txt
+8
-6
No files found.
docs/topics/db/queries.txt
Dosyayı görüntüle @
84cafc2b
...
@@ -86,8 +86,8 @@ To save changes to an object that's already in the database, use
...
@@ -86,8 +86,8 @@ To save changes to an object that's already in the database, use
Given a ``Blog`` instance ``b5`` that has already been saved to the database,
Given a ``Blog`` instance ``b5`` that has already been saved to the database,
this example changes its name and updates its record in the database::
this example changes its name and updates its record in the database::
>> b5.name = 'New name'
>>
>
b5.name = 'New name'
>> b5.save()
>>
>
b5.save()
This performs an ``UPDATE`` SQL statement behind the scenes. Django doesn't hit
This performs an ``UPDATE`` SQL statement behind the scenes. Django doesn't hit
the database until you explicitly call :meth:`~django.db.models.Model.save`.
the database until you explicitly call :meth:`~django.db.models.Model.save`.
...
@@ -250,9 +250,9 @@ stored, used and reused.
...
@@ -250,9 +250,9 @@ stored, used and reused.
Example::
Example::
>> q1 = Entry.objects.filter(headline__startswith="What")
>>
>
q1 = Entry.objects.filter(headline__startswith="What")
>> q2 = q1.exclude(pub_date__gte=datetime.date.today())
>>
>
q2 = q1.exclude(pub_date__gte=datetime.date.today())
>> q3 = q1.filter(pub_date__gte=datetime.date.today())
>>
>
q3 = q1.filter(pub_date__gte=datetime.date.today())
These three ``QuerySets`` are separate. The first is a base
These three ``QuerySets`` are separate. The first is a base
:class:`~django.db.models.query.QuerySet` containing all entries that contain a
:class:`~django.db.models.query.QuerySet` containing all entries that contain a
...
@@ -393,7 +393,9 @@ Basic lookups keyword arguments take the form ``field__lookuptype=value``.
...
@@ -393,7 +393,9 @@ Basic lookups keyword arguments take the form ``field__lookuptype=value``.
>>> Entry.objects.filter(pub_date__lte='2006-01-01')
>>> Entry.objects.filter(pub_date__lte='2006-01-01')
translates (roughly) into the following SQL::
translates (roughly) into the following SQL:
.. code-block:: sql
SELECT * FROM blog_entry WHERE pub_date <= '2006-01-01';
SELECT * FROM blog_entry WHERE pub_date <= '2006-01-01';
...
...
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