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
0de0699d
Kaydet (Commit)
0de0699d
authored
Ock 28, 2017
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Ock 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27788 -- Dropped support for Oracle < 12.1.
üst
a6755b29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
43 deletions
+24
-43
operations.py
django/contrib/gis/db/backends/oracle/operations.py
+4
-10
features.py
django/db/backends/base/features.py
+7
-10
features.py
django/db/backends/oracle/features.py
+0
-15
db-api.txt
docs/ref/contrib/gis/db-api.txt
+1
-1
functions.txt
docs/ref/contrib/gis/functions.txt
+1
-1
databases.txt
docs/ref/databases.txt
+1
-1
2.0.txt
docs/releases/2.0.txt
+7
-0
test_functions.py
tests/gis_tests/geoapp/test_functions.py
+2
-4
tests.py
tests/schema/tests.py
+1
-1
No files found.
django/contrib/gis/db/backends/oracle/operations.py
Dosyayı görüntüle @
0de0699d
...
@@ -17,7 +17,6 @@ from django.contrib.gis.db.models import aggregates
...
@@ -17,7 +17,6 @@ from django.contrib.gis.db.models import aggregates
from
django.contrib.gis.geometry.backend
import
Geometry
from
django.contrib.gis.geometry.backend
import
Geometry
from
django.contrib.gis.measure
import
Distance
from
django.contrib.gis.measure
import
Distance
from
django.db.backends.oracle.operations
import
DatabaseOperations
from
django.db.backends.oracle.operations
import
DatabaseOperations
from
django.utils.functional
import
cached_property
DEFAULT_TOLERANCE
=
'0.05'
DEFAULT_TOLERANCE
=
'0.05'
...
@@ -132,15 +131,10 @@ class OracleOperations(BaseSpatialOperations, DatabaseOperations):
...
@@ -132,15 +131,10 @@ class OracleOperations(BaseSpatialOperations, DatabaseOperations):
truncate_params
=
{
'relate'
:
None
}
truncate_params
=
{
'relate'
:
None
}
@cached_property
unsupported_functions
=
{
def
unsupported_functions
(
self
):
'AsGeoJSON'
,
'AsKML'
,
'AsSVG'
,
'Envelope'
,
'ForceRHR'
,
'GeoHash'
,
unsupported
=
{
'MakeValid'
,
'MemSize'
,
'Scale'
,
'SnapToGrid'
,
'Translate'
,
'AsGeoJSON'
,
'AsKML'
,
'AsSVG'
,
'Envelope'
,
'ForceRHR'
,
'GeoHash'
,
}
'MakeValid'
,
'MemSize'
,
'Scale'
,
'SnapToGrid'
,
'Translate'
,
}
if
self
.
connection
.
oracle_full_version
<
'12.1.0.2'
:
unsupported
.
add
(
'BoundingCircle'
)
return
unsupported
def
geo_quote_name
(
self
,
name
):
def
geo_quote_name
(
self
,
name
):
return
super
()
.
geo_quote_name
(
name
)
.
upper
()
return
super
()
.
geo_quote_name
(
name
)
.
upper
()
...
...
django/db/backends/base/features.py
Dosyayı görüntüle @
0de0699d
...
@@ -253,18 +253,15 @@ class BaseDatabaseFeatures:
...
@@ -253,18 +253,15 @@ class BaseDatabaseFeatures:
except
NotImplementedError
:
except
NotImplementedError
:
return
False
return
False
def
introspected_boolean_field_type
(
self
,
field
=
None
,
created_separately
=
False
):
def
introspected_boolean_field_type
(
self
,
field
=
None
):
"""
"""
What is the type returned when the backend introspects a BooleanField?
What is the type returned when the backend introspects a BooleanField?
The optional arguments may be used to give further details of the field to be
The `field` argument may be used to give further details of the field
introspected; in particular, they are provided by Django's test suite:
to be introspected.
field -- the field definition
created_separately -- True if the field was added via a SchemaEditor's AddField,
The return value from this function is compared by tests against actual
False if the field was created with the model
introspection results; it should provide expectations, not run an
introspection itself.
Note that return value from this function is compared by tests against actual
introspection results; it should provide expectations, not run an introspection
itself.
"""
"""
if
self
.
can_introspect_null
and
field
and
field
.
null
:
if
self
.
can_introspect_null
and
field
and
field
.
null
:
return
'NullBooleanField'
return
'NullBooleanField'
...
...
django/db/backends/oracle/features.py
Dosyayı görüntüle @
0de0699d
...
@@ -35,18 +35,3 @@ class DatabaseFeatures(BaseDatabaseFeatures):
...
@@ -35,18 +35,3 @@ class DatabaseFeatures(BaseDatabaseFeatures):
# Oracle doesn't ignore quoted identifiers case but the current backend
# Oracle doesn't ignore quoted identifiers case but the current backend
# does by uppercasing all identifiers.
# does by uppercasing all identifiers.
ignores_table_name_case
=
True
ignores_table_name_case
=
True
def
introspected_boolean_field_type
(
self
,
field
=
None
,
created_separately
=
False
):
"""
Some versions of Oracle -- we've seen this on 11.2.0.1 and suspect
it goes back -- have a weird bug where, when an integer column is
added to an existing table with a default, its precision is later
reported on introspection as 0, regardless of the real precision.
For Django introspection, this means that such columns are reported
as IntegerField even if they are really BigIntegerField or BooleanField.
The bug is solved in Oracle 11.2.0.2 and up.
"""
if
self
.
connection
.
oracle_full_version
<
'11.2.0.2'
and
field
and
field
.
has_default
()
and
created_separately
:
return
'IntegerField'
return
super
()
.
introspected_boolean_field_type
(
field
,
created_separately
)
docs/ref/contrib/gis/db-api.txt
Dosyayı görüntüle @
0de0699d
...
@@ -376,7 +376,7 @@ Function PostGIS Oracle MySQL Spat
...
@@ -376,7 +376,7 @@ Function PostGIS Oracle MySQL Spat
:class:`AsGML` X X X
:class:`AsGML` X X X
:class:`AsKML` X X
:class:`AsKML` X X
:class:`AsSVG` X X
:class:`AsSVG` X X
:class:`BoundingCircle` X X
(≥ 12.1.0.2)
:class:`BoundingCircle` X X
:class:`Centroid` X X X X
:class:`Centroid` X X X X
:class:`Difference` X X X (≥ 5.6.1) X
:class:`Difference` X X X (≥ 5.6.1) X
:class:`Distance` X X X (≥ 5.6.1) X
:class:`Distance` X X X (≥ 5.6.1) X
...
...
docs/ref/contrib/gis/functions.txt
Dosyayı görüntüle @
0de0699d
...
@@ -170,7 +170,7 @@ __ http://www.w3.org/Graphics/SVG/
...
@@ -170,7 +170,7 @@ __ http://www.w3.org/Graphics/SVG/
.. class:: BoundingCircle(expression, num_seg=48, **extra)
.. class:: BoundingCircle(expression, num_seg=48, **extra)
*Availability*: `PostGIS <http://postgis.net/docs/ST_MinimumBoundingCircle.html>`__,
*Availability*: `PostGIS <http://postgis.net/docs/ST_MinimumBoundingCircle.html>`__,
`Oracle
(≥ 12.1.0.2)
<https://docs.oracle.com/database/121/SPATL/GUID-82A61626-BB64-4793-B53D-A0DBEC91831A.htm#SPATL1554>`_
`Oracle <https://docs.oracle.com/database/121/SPATL/GUID-82A61626-BB64-4793-B53D-A0DBEC91831A.htm#SPATL1554>`_
Accepts a single geographic field or expression and returns the smallest circle
Accepts a single geographic field or expression and returns the smallest circle
polygon that can fully contain the geometry.
polygon that can fully contain the geometry.
...
...
docs/ref/databases.txt
Dosyayı görüntüle @
0de0699d
...
@@ -676,7 +676,7 @@ rather than a list. SQLite does not support this.
...
@@ -676,7 +676,7 @@ rather than a list. SQLite does not support this.
Oracle notes
Oracle notes
============
============
Django supports `Oracle Database Server`_ versions 1
1.2
and higher. Version
Django supports `Oracle Database Server`_ versions 1
2.1
and higher. Version
5.2 or higher of the `cx_Oracle`_ Python driver is required.
5.2 or higher of the `cx_Oracle`_ Python driver is required.
.. _`Oracle Database Server`: http://www.oracle.com/
.. _`Oracle Database Server`: http://www.oracle.com/
...
...
docs/releases/2.0.txt
Dosyayı görüntüle @
0de0699d
...
@@ -210,6 +210,13 @@ Database backend API
...
@@ -210,6 +210,13 @@ Database backend API
* ...
* ...
Dropped support for Oracle 11.2
-------------------------------
The end of upstream support for Oracle 11.2 is Dec. 2020. Django 1.11 will be
supported until April 2020 which almost reaches this date. Django 2.0
officially supports Oracle 12.1+.
Miscellaneous
Miscellaneous
-------------
-------------
...
...
tests/gis_tests/geoapp/test_functions.py
Dosyayı görüntüle @
0de0699d
...
@@ -305,10 +305,8 @@ class GISFunctionsTests(TestCase):
...
@@ -305,10 +305,8 @@ class GISFunctionsTests(TestCase):
for
c
in
mpoly_qs
:
for
c
in
mpoly_qs
:
self
.
assertEqual
(
c
.
mpoly
.
num_points
,
c
.
num_points
)
self
.
assertEqual
(
c
.
mpoly
.
num_points
,
c
.
num_points
)
if
not
oracle
:
for
c
in
City
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'point'
)):
# Oracle cannot count vertices in Point geometries.
self
.
assertEqual
(
c
.
num_points
,
1
)
for
c
in
City
.
objects
.
annotate
(
num_points
=
functions
.
NumPoints
(
'point'
)):
self
.
assertEqual
(
1
,
c
.
num_points
)
@skipUnlessDBFeature
(
"has_PointOnSurface_function"
)
@skipUnlessDBFeature
(
"has_PointOnSurface_function"
)
def
test_point_on_surface
(
self
):
def
test_point_on_surface
(
self
):
...
...
tests/schema/tests.py
Dosyayı görüntüle @
0de0699d
...
@@ -416,7 +416,7 @@ class SchemaTests(TransactionTestCase):
...
@@ -416,7 +416,7 @@ class SchemaTests(TransactionTestCase):
field_type
=
columns
[
'awesome'
][
0
]
field_type
=
columns
[
'awesome'
][
0
]
self
.
assertEqual
(
self
.
assertEqual
(
field_type
,
field_type
,
connection
.
features
.
introspected_boolean_field_type
(
new_field
,
created_separately
=
True
)
connection
.
features
.
introspected_boolean_field_type
(
new_field
)
)
)
def
test_add_field_default_transform
(
self
):
def
test_add_field_default_transform
(
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