Refs #27795 -- Removed unneeded force_text calls from the Oracle backend.
This commit is contained in:
parent
8c6a3062dd
commit
e5dce7b0fb
|
@ -451,7 +451,7 @@ class FormatStylePlaceholderCursor:
|
|||
# Handle params as sequence
|
||||
args = [(':arg%d' % i) for i in range(len(params))]
|
||||
query = query % tuple(args)
|
||||
return force_text(query, self.charset), self._format_params(params)
|
||||
return query, self._format_params(params)
|
||||
|
||||
def execute(self, query, params=None):
|
||||
query, params = self._fix_for_params(query, params, unify_by_values=True)
|
||||
|
|
|
@ -6,7 +6,6 @@ from django.db.backends.base.introspection import (
|
|||
BaseDatabaseIntrospection, FieldInfo, TableInfo,
|
||||
)
|
||||
from django.utils.deprecation import RemovedInDjango21Warning
|
||||
from django.utils.encoding import force_text
|
||||
|
||||
|
||||
class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
|
@ -75,7 +74,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
|||
self.cache_bust_counter))
|
||||
description = []
|
||||
for desc in cursor.description:
|
||||
name = force_text(desc[0]) # cx_Oracle always returns a 'str'
|
||||
name = desc[0]
|
||||
internal_size, default = field_map[name]
|
||||
name = name % {} # cx_Oracle, for some reason, doubles percent signs.
|
||||
description.append(FieldInfo(*(
|
||||
|
|
|
@ -6,7 +6,7 @@ from django.conf import settings
|
|||
from django.db.backends.base.operations import BaseDatabaseOperations
|
||||
from django.db.backends.utils import strip_quotes, truncate_name
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
from django.utils.encoding import force_bytes
|
||||
|
||||
from .base import Database
|
||||
from .utils import BulkInsertMapper, InsertIdVar, Oracle_datetime
|
||||
|
@ -182,7 +182,7 @@ WHEN (new.%(col_name)s IS NULL)
|
|||
|
||||
def convert_textfield_value(self, value, expression, connection, context):
|
||||
if isinstance(value, Database.LOB):
|
||||
value = force_text(value.read())
|
||||
value = value.read()
|
||||
return value
|
||||
|
||||
def convert_binaryfield_value(self, value, expression, connection, context):
|
||||
|
@ -277,7 +277,7 @@ WHEN (new.%(col_name)s IS NULL)
|
|||
def process_clob(self, value):
|
||||
if value is None:
|
||||
return ''
|
||||
return force_text(value.read())
|
||||
return value.read()
|
||||
|
||||
def quote_name(self, name):
|
||||
# SQL92 requires delimited (quoted) names to be case-sensitive. When
|
||||
|
|
Loading…
Reference in New Issue