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
34f27f91
Kaydet (Commit)
34f27f91
authored
Eyl 06, 2017
tarafından
Sergey Fedoseev
Kaydeden (comit)
Tim Graham
Eyl 06, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replaced @cached_property with class attributes where possible.
üst
690fc30d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
34 deletions
+17
-34
operations.py
django/contrib/gis/db/backends/postgis/operations.py
+1
-4
operations.py
django/contrib/gis/db/backends/spatialite/operations.py
+9
-11
features.py
django/db/backends/sqlite3/features.py
+7
-19
No files found.
django/contrib/gis/db/backends/postgis/operations.py
Dosyayı görüntüle @
34f27f91
...
@@ -134,10 +134,7 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
...
@@ -134,10 +134,7 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
unsupported_functions
=
set
()
unsupported_functions
=
set
()
@cached_property
select
=
'
%
s::bytea'
def
select
(
self
):
return
'
%
s::bytea'
select_extent
=
None
select_extent
=
None
def
__init__
(
self
,
connection
):
def
__init__
(
self
,
connection
):
...
...
django/contrib/gis/db/backends/spatialite/operations.py
Dosyayı görüntüle @
34f27f91
...
@@ -68,17 +68,15 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
...
@@ -68,17 +68,15 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
def
select
(
self
):
def
select
(
self
):
return
'CAST (AsEWKB(
%
s) AS BLOB)'
if
self
.
spatial_version
>=
(
4
,
3
,
0
)
else
'AsText(
%
s)'
return
'CAST (AsEWKB(
%
s) AS BLOB)'
if
self
.
spatial_version
>=
(
4
,
3
,
0
)
else
'AsText(
%
s)'
@cached_property
function_names
=
{
def
function_names
(
self
):
'Length'
:
'ST_Length'
,
return
{
'LineLocatePoint'
:
'ST_Line_Locate_Point'
,
'Length'
:
'ST_Length'
,
'NumPoints'
:
'ST_NPoints'
,
'LineLocatePoint'
:
'ST_Line_Locate_Point'
,
'Reverse'
:
'ST_Reverse'
,
'NumPoints'
:
'ST_NPoints'
,
'Scale'
:
'ScaleCoords'
,
'Reverse'
:
'ST_Reverse'
,
'Translate'
:
'ST_Translate'
,
'Scale'
:
'ScaleCoords'
,
'Union'
:
'ST_Union'
,
'Translate'
:
'ST_Translate'
,
}
'Union'
:
'ST_Union'
,
}
@cached_property
@cached_property
def
unsupported_functions
(
self
):
def
unsupported_functions
(
self
):
...
...
django/db/backends/sqlite3/features.py
Dosyayı görüntüle @
34f27f91
...
@@ -31,25 +31,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
...
@@ -31,25 +31,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_temporal_subtraction
=
True
supports_temporal_subtraction
=
True
ignores_table_name_case
=
True
ignores_table_name_case
=
True
supports_cast_with_precision
=
False
supports_cast_with_precision
=
False
uses_savepoints
=
Database
.
sqlite_version_info
>=
(
3
,
6
,
8
)
@cached_property
supports_index_column_ordering
=
Database
.
sqlite_version_info
>=
(
3
,
3
,
0
)
def
uses_savepoints
(
self
):
can_release_savepoints
=
uses_savepoints
return
Database
.
sqlite_version_info
>=
(
3
,
6
,
8
)
can_share_in_memory_db
=
(
Database
.
__name__
==
'sqlite3.dbapi2'
and
@cached_property
Database
.
sqlite_version_info
>=
(
3
,
7
,
13
)
def
supports_index_column_ordering
(
self
):
)
return
Database
.
sqlite_version_info
>=
(
3
,
3
,
0
)
@cached_property
def
can_release_savepoints
(
self
):
return
self
.
uses_savepoints
@cached_property
def
can_share_in_memory_db
(
self
):
return
(
Database
.
__name__
==
'sqlite3.dbapi2'
and
Database
.
sqlite_version_info
>=
(
3
,
7
,
13
)
)
@cached_property
@cached_property
def
supports_stddev
(
self
):
def
supports_stddev
(
self
):
...
...
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