mirror of
				https://github.com/django/django.git
				synced 2025-10-29 00:26:07 +00:00 
			
		
		
		
	Updated Oracle docs links to Oracle 12c.
This commit is contained in:
		| @@ -89,7 +89,7 @@ WHEN (new.%(col_name)s IS NULL) | |||||||
|             # IW = ISO week number |             # IW = ISO week number | ||||||
|             return "TO_CHAR(%s, 'IW')" % field_name |             return "TO_CHAR(%s, 'IW')" % field_name | ||||||
|         else: |         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) |             return "EXTRACT(%s FROM %s)" % (lookup_type.upper(), field_name) | ||||||
|  |  | ||||||
|     def date_interval_sql(self, timedelta): |     def date_interval_sql(self, timedelta): | ||||||
| @@ -99,7 +99,7 @@ WHEN (new.%(col_name)s IS NULL) | |||||||
|         return "NUMTODSINTERVAL(%06f, 'SECOND')" % (timedelta.total_seconds()), [] |         return "NUMTODSINTERVAL(%06f, 'SECOND')" % (timedelta.total_seconds()), [] | ||||||
|  |  | ||||||
|     def date_trunc_sql(self, lookup_type, field_name): |     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'): |         if lookup_type in ('year', 'month'): | ||||||
|             return "TRUNC(%s, '%s')" % (field_name, lookup_type.upper()) |             return "TRUNC(%s, '%s')" % (field_name, lookup_type.upper()) | ||||||
|         else: |         else: | ||||||
| @@ -135,7 +135,7 @@ WHEN (new.%(col_name)s IS NULL) | |||||||
|  |  | ||||||
|     def datetime_trunc_sql(self, lookup_type, field_name, tzname): |     def datetime_trunc_sql(self, lookup_type, field_name, tzname): | ||||||
|         field_name = self._convert_field_to_tz(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'): |         if lookup_type in ('year', 'month'): | ||||||
|             sql = "TRUNC(%s, '%s')" % (field_name, lookup_type.upper()) |             sql = "TRUNC(%s, '%s')" % (field_name, lookup_type.upper()) | ||||||
|         elif lookup_type == 'day': |         elif lookup_type == 'day': | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): | |||||||
|         # Add it |         # Add it | ||||||
|         self.add_field(model, new_temp_field) |         self.add_field(model, new_temp_field) | ||||||
|         # Explicit data type conversion |         # 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) |         new_value = self.quote_name(old_field.column) | ||||||
|         old_type = old_field.db_type(self.connection) |         old_type = old_field.db_type(self.connection) | ||||||
|         if re.match('^N?CLOB', old_type): |         if re.match('^N?CLOB', old_type): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user