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
5008a4db
Kaydet (Commit)
5008a4db
authored
Ock 18, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed legacy ORM lookup support per deprecation timeline; refs #16187.
üst
5792e6a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
27 deletions
+2
-27
query.py
django/db/models/sql/query.py
+2
-19
where.py
django/db/models/sql/where.py
+0
-0
tree.py
django/utils/tree.py
+0
-8
No files found.
django/db/models/sql/query.py
Dosyayı görüntüle @
5008a4db
...
...
@@ -24,7 +24,7 @@ from django.db.models.sql.constants import (QUERY_TERMS, ORDER_DIR, SINGLE,
ORDER_PATTERN
,
INNER
,
LOUTER
)
from
django.db.models.sql.datastructures
import
(
EmptyResultSet
,
Empty
,
MultiJoin
,
Join
,
BaseTable
)
from
django.db.models.sql.where
import
(
WhereNode
,
Constraint
,
EverythingNode
,
from
django.db.models.sql.where
import
(
WhereNode
,
EverythingNode
,
ExtraWhere
,
AND
,
OR
,
EmptyWhere
)
from
django.utils
import
six
from
django.utils.deprecation
import
RemovedInDjango20Warning
...
...
@@ -1130,10 +1130,6 @@ class Query(object):
clause
=
self
.
where_class
()
if
reffed_aggregate
:
condition
=
self
.
build_lookup
(
lookups
,
reffed_aggregate
,
value
)
if
not
condition
:
# Backwards compat for custom lookups
assert
len
(
lookups
)
==
1
condition
=
(
reffed_aggregate
,
lookups
[
0
],
value
)
clause
.
add
(
condition
,
AND
)
return
clause
,
[]
...
...
@@ -1176,20 +1172,7 @@ class Query(object):
else
:
col
=
targets
[
0
]
.
get_col
(
alias
,
field
)
condition
=
self
.
build_lookup
(
lookups
,
col
,
value
)
if
not
condition
:
# Backwards compat for custom lookups
if
lookups
[
0
]
not
in
self
.
query_terms
:
raise
FieldError
(
"Join on field '
%
s' not permitted. Did you "
"misspell '
%
s' for the lookup type?"
%
(
col
.
output_field
.
name
,
lookups
[
0
]))
if
len
(
lookups
)
>
1
:
raise
FieldError
(
"Nested lookup '
%
s' not supported."
%
LOOKUP_SEP
.
join
(
lookups
))
condition
=
(
Constraint
(
alias
,
targets
[
0
]
.
column
,
field
),
lookups
[
0
],
value
)
lookup_type
=
lookups
[
-
1
]
else
:
lookup_type
=
condition
.
lookup_name
lookup_type
=
condition
.
lookup_name
clause
.
add
(
condition
,
AND
)
...
...
django/db/models/sql/where.py
Dosyayı görüntüle @
5008a4db
This diff is collapsed.
Click to expand it.
django/utils/tree.py
Dosyayı görüntüle @
5008a4db
...
...
@@ -81,13 +81,6 @@ class Node(object):
"""
return
other
in
self
.
children
def
_prepare_data
(
self
,
data
):
"""
A subclass hook for doing subclass specific transformations of the
given data on combine() or add().
"""
return
data
def
add
(
self
,
data
,
conn_type
,
squash
=
True
):
"""
Combines this tree and the data represented by data using the
...
...
@@ -105,7 +98,6 @@ class Node(object):
"""
if
data
in
self
.
children
:
return
data
data
=
self
.
_prepare_data
(
data
)
if
not
squash
:
self
.
children
.
append
(
data
)
return
data
...
...
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