2014-08-18 01:06:25 +08:00
|
|
|
from django.db.backends.oracle.base import (
|
|
|
|
DatabaseWrapper as OracleDatabaseWrapper,
|
|
|
|
DatabaseFeatures as OracleDatabaseFeatures,
|
|
|
|
)
|
|
|
|
from django.contrib.gis.db.backends.base import BaseSpatialFeatures
|
2009-12-22 23:18:51 +08:00
|
|
|
from django.contrib.gis.db.backends.oracle.creation import OracleCreation
|
2010-01-19 05:02:47 +08:00
|
|
|
from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection
|
2009-12-22 23:18:51 +08:00
|
|
|
from django.contrib.gis.db.backends.oracle.operations import OracleOperations
|
2014-09-18 19:42:51 +08:00
|
|
|
from django.contrib.gis.db.backends.oracle.schema import OracleGISSchemaEditor
|
2009-12-22 23:18:51 +08:00
|
|
|
|
2013-10-27 11:57:08 +08:00
|
|
|
|
2014-08-18 01:06:25 +08:00
|
|
|
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
|
2014-09-18 03:55:34 +08:00
|
|
|
supports_add_srs_entry = False
|
2014-09-18 05:58:20 +08:00
|
|
|
supports_geometry_field_introspection = False
|
2014-08-18 01:06:25 +08:00
|
|
|
|
|
|
|
|
2009-12-22 23:18:51 +08:00
|
|
|
class DatabaseWrapper(OracleDatabaseWrapper):
|
2014-09-26 01:59:03 +08:00
|
|
|
SchemaEditorClass = OracleGISSchemaEditor
|
|
|
|
|
2009-12-22 23:18:51 +08:00
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super(DatabaseWrapper, self).__init__(*args, **kwargs)
|
2014-08-18 01:06:25 +08:00
|
|
|
self.features = DatabaseFeatures(self)
|
2009-12-22 23:18:51 +08:00
|
|
|
self.ops = OracleOperations(self)
|
2010-01-19 05:02:47 +08:00
|
|
|
self.creation = OracleCreation(self)
|
|
|
|
self.introspection = OracleIntrospection(self)
|