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
816eae35
Kaydet (Commit)
816eae35
authored
Eki 13, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed unused EmptyResultSets in SQLCompilers.
Unused since
ed1bcf05
.
üst
cd09524f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
compiler.py
django/db/models/sql/compiler.py
+1
-9
No files found.
django/db/models/sql/compiler.py
Dosyayı görüntüle @
816eae35
...
...
@@ -482,10 +482,7 @@ class SQLCompiler(object):
not
self
.
query
.
distinct_fields
and
not
self
.
query
.
select_for_update
):
obj
.
clear_ordering
(
True
)
nested_sql
=
obj
.
get_compiler
(
connection
=
self
.
connection
)
.
as_sql
(
subquery
=
True
)
if
nested_sql
==
(
''
,
()):
raise
EmptyResultSet
return
nested_sql
return
obj
.
get_compiler
(
connection
=
self
.
connection
)
.
as_sql
(
subquery
=
True
)
def
get_default_columns
(
self
,
start_alias
=
None
,
opts
=
None
,
from_parent
=
None
):
"""
...
...
@@ -1221,11 +1218,6 @@ class SQLAggregateCompiler(SQLCompiler):
Creates the SQL for this query. Returns the SQL string and list of
parameters.
"""
# Empty SQL for the inner query is a marker that the inner query
# isn't going to produce any results. This can happen when doing
# LIMIT 0 queries (generated by qs[:0]) for example.
if
not
self
.
query
.
subquery
:
raise
EmptyResultSet
sql
,
params
=
[],
[]
for
annotation
in
self
.
query
.
annotation_select
.
values
():
ann_sql
,
ann_params
=
self
.
compile
(
annotation
,
select_format
=
True
)
...
...
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