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
9ecf2803
Kaydet (Commit)
9ecf2803
authored
Agu 11, 2017
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Agu 11, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed obsolete DecimalComparisonLookup.
Unneeded since
c3c6c92d
.
üst
f3e350d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
38 deletions
+1
-38
lookups.py
django/db/models/lookups.py
+1
-38
No files found.
django/db/models/lookups.py
Dosyayı görüntüle @
9ecf2803
import
itertools
import
itertools
import
math
import
math
from
copy
import
copy
from
copy
import
copy
from
decimal
import
Decimal
from
django.core.exceptions
import
EmptyResultSet
from
django.core.exceptions
import
EmptyResultSet
from
django.db.models.expressions
import
Func
,
Value
from
django.db.models.expressions
import
Func
,
Value
from
django.db.models.fields
import
(
from
django.db.models.fields
import
DateTimeField
,
Field
,
IntegerField
DateTimeField
,
DecimalField
,
Field
,
IntegerField
,
)
from
django.db.models.query_utils
import
RegisterLookupMixin
from
django.db.models.query_utils
import
RegisterLookupMixin
from
django.utils.functional
import
cached_property
from
django.utils.functional
import
cached_property
...
@@ -298,40 +295,6 @@ class IntegerLessThan(IntegerFieldFloatRounding, LessThan):
...
@@ -298,40 +295,6 @@ class IntegerLessThan(IntegerFieldFloatRounding, LessThan):
pass
pass
class
DecimalComparisonLookup
:
def
as_sqlite
(
self
,
compiler
,
connection
):
lhs_sql
,
params
=
self
.
process_lhs
(
compiler
,
connection
)
rhs_sql
,
rhs_params
=
self
.
process_rhs
(
compiler
,
connection
)
params
.
extend
(
rhs_params
)
# For comparisons whose lhs is a DecimalField, cast rhs AS NUMERIC
# because the rhs will have been converted to a string by the
# rev_typecast_decimal() adapter.
if
isinstance
(
self
.
rhs
,
Decimal
):
rhs_sql
=
'CAST(
%
s AS NUMERIC)'
%
rhs_sql
rhs_sql
=
self
.
get_rhs_op
(
connection
,
rhs_sql
)
return
'
%
s
%
s'
%
(
lhs_sql
,
rhs_sql
),
params
@DecimalField.register_lookup
class
DecimalGreaterThan
(
DecimalComparisonLookup
,
GreaterThan
):
pass
@DecimalField.register_lookup
class
DecimalGreaterThanOrEqual
(
DecimalComparisonLookup
,
GreaterThanOrEqual
):
pass
@DecimalField.register_lookup
class
DecimalLessThan
(
DecimalComparisonLookup
,
LessThan
):
pass
@DecimalField.register_lookup
class
DecimalLessThanOrEqual
(
DecimalComparisonLookup
,
LessThanOrEqual
):
pass
@Field.register_lookup
@Field.register_lookup
class
In
(
FieldGetDbPrepValueIterableMixin
,
BuiltinLookup
):
class
In
(
FieldGetDbPrepValueIterableMixin
,
BuiltinLookup
):
lookup_name
=
'in'
lookup_name
=
'in'
...
...
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