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
ccf7adb0
Kaydet (Commit)
ccf7adb0
authored
Eyl 07, 2016
tarafından
Chris Jerdonek
Kaydeden (comit)
Claude Paroz
Eyl 07, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27172 -- Closed database cursor explicitly in two doc examples
üst
6a2af014
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
managers.txt
docs/topics/db/managers.txt
+1
-1
sql.txt
docs/topics/db/sql.txt
+1
-3
No files found.
docs/topics/db/managers.txt
Dosyayı görüntüle @
ccf7adb0
...
...
@@ -67,7 +67,7 @@ returns a list of all ``OpinionPoll`` objects, each with an extra
class PollManager(models.Manager):
def with_counts(self):
from django.db import connection
cursor = connection.cursor()
with connection.cursor() as cursor:
cursor.execute("""
SELECT p.id, p.question, p.poll_date, COUNT(*)
FROM polls_opinionpoll p, polls_response r
...
...
docs/topics/db/sql.txt
Dosyayı görüntüle @
ccf7adb0
...
...
@@ -250,10 +250,8 @@ For example::
from django.db import connection
def my_custom_sql(self):
cursor = connection.cursor()
with connection.cursor() as cursor:
cursor.execute("UPDATE bar SET foo = 1 WHERE baz = %s", [self.baz])
cursor.execute("SELECT foo FROM bar WHERE baz = %s", [self.baz])
row = cursor.fetchone()
...
...
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