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
2d425116
Kaydet (Commit)
2d425116
authored
Haz 12, 2014
tarafından
Moayad Mardini
Kaydeden (comit)
Tim Graham
Haz 12, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22349 -- Added a note clarifying `RawQuerySet` has no `__len__`.
Thanks cdestigter for the report.
üst
38616697
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
AUTHORS
AUTHORS
+1
-0
sql.txt
docs/topics/db/sql.txt
+13
-1
No files found.
AUTHORS
Dosyayı görüntüle @
2d425116
...
...
@@ -422,6 +422,7 @@ answer newbie questions, and generally made Django that much better:
Javier Mansilla <javimansilla@gmail.com>
masonsimon+django@gmail.com
Manuzhai
Moayad Mardini <moayad.m@gmail.com>
Petr Marhoun <petr.marhoun@gmail.com>
Petar Marić <http://www.petarmaric.com/>
Nuno Mariz <nmariz@gmail.com>
...
...
docs/topics/db/sql.txt
Dosyayı görüntüle @
2d425116
...
...
@@ -33,7 +33,8 @@ return model instances:
This method takes a raw SQL query, executes it, and returns a
``django.db.models.query.RawQuerySet`` instance. This ``RawQuerySet`` instance
can be iterated over just like a normal QuerySet to provide object instances.
can be iterated over just like a normal
:class:`~django.db.models.query.QuerySet` to provide object instances.
This is best illustrated with an example. Suppose you have the following model::
...
...
@@ -84,6 +85,17 @@ options that make it very powerful.
both rows will match. To prevent this, perform the correct typecasting
before using the value in a query.
.. warning::
While a ``RawQuerySet`` instance can be iterated over like a normal
:class:`~django.db.models.query.QuerySet`, ``RawQuerySet`` doesn't
implement all methods you can use with ``QuerySet``. For example,
``__bool__()`` and ``__len__()`` are not defined in ``RawQuerySet``, and
thus all ``RawQuerySet`` instances are considered ``True``. The reason
these methods are not implemented in ``RawQuerySet`` is that implementing
them without internal caching would be a performance drawback and adding
such caching would be backward incompatible.
Mapping query fields to model fields
------------------------------------
...
...
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