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
21bb71ef
Unverified
Kaydet (Commit)
21bb71ef
authored
Şub 06, 2019
tarafından
Mariusz Felisiak
Kaydeden (comit)
GitHub
Şub 06, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #30157 -- Dropped support for Oracle 12.1.
Thanks Tim Graham for the review.
üst
10b0fd15
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
81 deletions
+9
-81
compiler.py
django/db/backends/oracle/compiler.py
+0
-60
features.py
django/db/backends/oracle/features.py
+1
-13
operations.py
django/db/backends/oracle/operations.py
+0
-6
index.txt
docs/ref/contrib/gis/install/index.txt
+1
-1
databases.txt
docs/ref/databases.txt
+1
-1
3.0.txt
docs/releases/3.0.txt
+6
-0
No files found.
django/db/backends/oracle/compiler.py
deleted
100644 → 0
Dosyayı görüntüle @
10b0fd15
from
django.db
import
NotSupportedError
from
django.db.models.sql
import
compiler
class
SQLCompiler
(
compiler
.
SQLCompiler
):
def
as_sql
(
self
,
with_limits
=
True
,
with_col_aliases
=
False
):
"""
Create the SQL for this query. Return the SQL string and list of
parameters. This is overridden from the original Query class to handle
the restriction in Oracle 12.1 and emulate LIMIT and OFFSET with
a subquery.
If 'with_limits' is False, any limit/offset information is not included
in the query.
"""
# Whether the query must be constructed using limit/offset.
do_offset
=
with_limits
and
(
self
.
query
.
high_mark
is
not
None
or
self
.
query
.
low_mark
)
if
not
do_offset
:
sql
,
params
=
super
()
.
as_sql
(
with_limits
=
False
,
with_col_aliases
=
with_col_aliases
)
elif
not
self
.
connection
.
features
.
supports_select_for_update_with_limit
and
self
.
query
.
select_for_update
:
raise
NotSupportedError
(
'LIMIT/OFFSET is not supported with select_for_update on this '
'database backend.'
)
else
:
sql
,
params
=
super
()
.
as_sql
(
with_limits
=
False
,
with_col_aliases
=
True
)
# Wrap the base query in an outer SELECT * with boundaries on
# the "_RN" column. This is the canonical way to emulate LIMIT
# and OFFSET on Oracle.
high_where
=
''
if
self
.
query
.
high_mark
is
not
None
:
high_where
=
'WHERE ROWNUM <=
%
d'
%
(
self
.
query
.
high_mark
,)
if
self
.
query
.
low_mark
:
sql
=
(
'SELECT * FROM (SELECT "_SUB".*, ROWNUM AS "_RN" FROM (
%
s) '
'"_SUB"
%
s) WHERE "_RN" >
%
d'
%
(
sql
,
high_where
,
self
.
query
.
low_mark
)
)
else
:
# Simplify the query to support subqueries if there's no offset.
sql
=
(
'SELECT * FROM (SELECT "_SUB".* FROM (
%
s) "_SUB"
%
s)'
%
(
sql
,
high_where
)
)
return
sql
,
params
class
SQLInsertCompiler
(
compiler
.
SQLInsertCompiler
,
SQLCompiler
):
pass
class
SQLDeleteCompiler
(
compiler
.
SQLDeleteCompiler
,
SQLCompiler
):
pass
class
SQLUpdateCompiler
(
compiler
.
SQLUpdateCompiler
,
SQLCompiler
):
pass
class
SQLAggregateCompiler
(
compiler
.
SQLAggregateCompiler
,
SQLCompiler
):
pass
django/db/backends/oracle/features.py
Dosyayı görüntüle @
21bb71ef
from
django.db.backends.base.features
import
BaseDatabaseFeatures
from
django.db.backends.base.features
import
BaseDatabaseFeatures
from
django.db.utils
import
InterfaceError
from
django.db.utils
import
InterfaceError
from
django.utils.functional
import
cached_property
class
DatabaseFeatures
(
BaseDatabaseFeatures
):
class
DatabaseFeatures
(
BaseDatabaseFeatures
):
...
@@ -56,15 +55,4 @@ class DatabaseFeatures(BaseDatabaseFeatures):
...
@@ -56,15 +55,4 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_ignore_conflicts
=
False
supports_ignore_conflicts
=
False
max_query_params
=
2
**
16
-
1
max_query_params
=
2
**
16
-
1
supports_partial_indexes
=
False
supports_partial_indexes
=
False
supports_slicing_ordering_in_compound
=
True
@cached_property
def
has_fetch_offset_support
(
self
):
return
self
.
connection
.
oracle_version
>=
(
12
,
2
)
@cached_property
def
allow_sliced_subqueries_with_in
(
self
):
return
self
.
has_fetch_offset_support
@cached_property
def
supports_slicing_ordering_in_compound
(
self
):
return
self
.
has_fetch_offset_support
django/db/backends/oracle/operations.py
Dosyayı görüntüle @
21bb71ef
...
@@ -580,9 +580,3 @@ END;
...
@@ -580,9 +580,3 @@ END;
if
fields
:
if
fields
:
return
self
.
connection
.
features
.
max_query_params
//
len
(
fields
)
return
self
.
connection
.
features
.
max_query_params
//
len
(
fields
)
return
len
(
objs
)
return
len
(
objs
)
@cached_property
def
compiler_module
(
self
):
if
self
.
connection
.
features
.
has_fetch_offset_support
:
return
super
()
.
compiler_module
return
'django.db.backends.oracle.compiler'
docs/ref/contrib/gis/install/index.txt
Dosyayı görüntüle @
21bb71ef
...
@@ -60,7 +60,7 @@ Database Library Requirements Supported Versions Notes
...
@@ -60,7 +60,7 @@ Database Library Requirements Supported Versions Notes
================== ============================== ================== =========================================
================== ============================== ================== =========================================
PostgreSQL GEOS, GDAL, PROJ.4, PostGIS 9.5+ Requires PostGIS.
PostgreSQL GEOS, GDAL, PROJ.4, PostGIS 9.5+ Requires PostGIS.
MySQL GEOS, GDAL 5.6+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
MySQL GEOS, GDAL 5.6+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
Oracle GEOS, GDAL 12.
1
+ XE not supported.
Oracle GEOS, GDAL 12.
2
+ XE not supported.
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.8.3+ Requires SpatiaLite 4.3+
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.8.3+ Requires SpatiaLite 4.3+
================== ============================== ================== =========================================
================== ============================== ================== =========================================
...
...
docs/ref/databases.txt
Dosyayı görüntüle @
21bb71ef
...
@@ -730,7 +730,7 @@ iterator. Your code must handle this.
...
@@ -730,7 +730,7 @@ iterator. Your code must handle this.
Oracle notes
Oracle notes
============
============
Django supports `Oracle Database Server`_ versions 12.
1
and higher. Version
Django supports `Oracle Database Server`_ versions 12.
2
and higher. Version
6.0 or higher of the `cx_Oracle`_ Python driver is required.
6.0 or higher of the `cx_Oracle`_ Python driver is required.
.. _`Oracle Database Server`: https://www.oracle.com/
.. _`Oracle Database Server`: https://www.oracle.com/
...
...
docs/releases/3.0.txt
Dosyayı görüntüle @
21bb71ef
...
@@ -235,6 +235,12 @@ Dropped support for PostgreSQL 9.4
...
@@ -235,6 +235,12 @@ Dropped support for PostgreSQL 9.4
Upstream support for PostgreSQL 9.4 ends in December 2019. Django 3.0 supports
Upstream support for PostgreSQL 9.4 ends in December 2019. Django 3.0 supports
PostgreSQL 9.5 and higher.
PostgreSQL 9.5 and higher.
Dropped support for Oracle 12.1
-------------------------------
Upstream support for Oracle 12.1 ends in July 2021. Django 2.2 will be
supported until April 2022. Django 3.0 officially supports Oracle 12.2 and 18c.
Removed private Python 2 compatibility APIs
Removed private Python 2 compatibility APIs
-------------------------------------------
-------------------------------------------
...
...
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