Updated Oracle docs links to Oracle 12c.

This commit is contained in:
Mariusz Felisiak 2017-04-21 16:02:31 +02:00 committed by GitHub
parent b7dc998087
commit 87f9a3c5b2
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ WHEN (new.%(col_name)s IS NULL)
# IW = ISO week number
return "TO_CHAR(%s, 'IW')" % field_name
else:
# http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions050.htm
# https://docs.oracle.com/database/121/SQLRF/functions067.htm#SQLRF00639
return "EXTRACT(%s FROM %s)" % (lookup_type.upper(), field_name)
def date_interval_sql(self, timedelta):
@ -99,7 +99,7 @@ WHEN (new.%(col_name)s IS NULL)
return "NUMTODSINTERVAL(%06f, 'SECOND')" % (timedelta.total_seconds()), []
def date_trunc_sql(self, lookup_type, field_name):
# http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions230.htm#i1002084
# https://docs.oracle.com/database/121/SQLRF/functions271.htm#SQLRF52058
if lookup_type in ('year', 'month'):
return "TRUNC(%s, '%s')" % (field_name, lookup_type.upper())
else:
@ -135,7 +135,7 @@ WHEN (new.%(col_name)s IS NULL)
def datetime_trunc_sql(self, lookup_type, field_name, tzname):
field_name = self._convert_field_to_tz(field_name, tzname)
# http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions230.htm#i1002084
# https://docs.oracle.com/database/121/SQLRF/functions271.htm#SQLRF52058
if lookup_type in ('year', 'month'):
sql = "TRUNC(%s, '%s')" % (field_name, lookup_type.upper())
elif lookup_type == 'day':

View File

@ -76,7 +76,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Add it
self.add_field(model, new_temp_field)
# Explicit data type conversion
# https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements002.htm#sthref340
# https://docs.oracle.com/database/121/SQLRF/sql_elements002.htm#SQLRF51054
new_value = self.quote_name(old_field.column)
old_type = old_field.db_type(self.connection)
if re.match('^N?CLOB', old_type):