mirror of https://github.com/django/django.git
Made DatabaseWrapper.oracle_version() return a full version tuple.
This commit is contained in:
parent
82f286cf6f
commit
90d93a1b42
|
@ -300,17 +300,10 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def oracle_full_version(self):
|
|
||||||
with self.temporary_connection():
|
|
||||||
return self.connection.version
|
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def oracle_version(self):
|
def oracle_version(self):
|
||||||
try:
|
with self.temporary_connection():
|
||||||
return int(self.oracle_full_version.split('.')[0])
|
return tuple(int(x) for x in self.connection.version.split('.'))
|
||||||
except ValueError:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
class OracleParam:
|
class OracleParam:
|
||||||
|
|
Loading…
Reference in New Issue