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
ced3e6b1
Kaydet (Commit)
ced3e6b1
authored
Agu 20, 2013
tarafından
Anssi Kääriäinen
Kaydeden (comit)
Andrew Godwin
Agu 21, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed test failure caused by different NULL ordering between backends
üst
cea72045
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
__init__.py
django/db/backends/__init__.py
+3
-0
base.py
django/db/backends/postgresql_psycopg2/base.py
+1
-0
models.py
tests/queries/models.py
+4
-0
tests.py
tests/queries/tests.py
+6
-2
No files found.
django/db/backends/__init__.py
Dosyayı görüntüle @
ced3e6b1
...
...
@@ -599,6 +599,9 @@ class BaseDatabaseFeatures(object):
# to remove any ordering?
requires_explicit_null_ordering_when_grouping
=
False
# Does the backend order NULL values as largest or smallest?
nulls_order_largest
=
False
# Is there a 1000 item limit on query parameters?
supports_1000_query_parameters
=
True
...
...
django/db/backends/postgresql_psycopg2/base.py
Dosyayı görüntüle @
ced3e6b1
...
...
@@ -58,6 +58,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
can_distinct_on_fields
=
True
can_rollback_ddl
=
True
supports_combined_alters
=
True
nulls_order_largest
=
True
class
DatabaseWrapper
(
BaseDatabaseWrapper
):
...
...
tests/queries/models.py
Dosyayı görüntüle @
ced3e6b1
...
...
@@ -262,9 +262,13 @@ class ReservedName(models.Model):
return
self
.
name
# A simpler shared-foreign-key setup that can expose some problems.
@python_2_unicode_compatible
class
SharedConnection
(
models
.
Model
):
data
=
models
.
CharField
(
max_length
=
10
)
def
__str__
(
self
):
return
self
.
data
class
PointerA
(
models
.
Model
):
connection
=
models
.
ForeignKey
(
SharedConnection
)
...
...
tests/queries/tests.py
Dosyayı görüntüle @
ced3e6b1
...
...
@@ -2984,7 +2984,11 @@ class Ticket14056Tests(TestCase):
s2
=
SharedConnection
.
objects
.
create
(
data
=
's2'
)
s3
=
SharedConnection
.
objects
.
create
(
data
=
's3'
)
PointerA
.
objects
.
create
(
connection
=
s2
)
expected_ordering
=
(
[
s1
,
s3
,
s2
]
if
connection
.
features
.
nulls_order_largest
else
[
s2
,
s1
,
s3
]
)
self
.
assertQuerysetEqual
(
SharedConnection
.
objects
.
order_by
(
'pointera__connection'
,
'pk'
),
[
s1
,
s3
,
s2
]
,
lambda
x
:
x
SharedConnection
.
objects
.
order_by
(
'
-
pointera__connection'
,
'pk'
),
expected_ordering
,
lambda
x
:
x
)
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