diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 086596068d..804b221f59 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -314,34 +314,17 @@ class FormatStylePlaceholderCursor(Database.Cursor): charset = 'utf-8' def _format_params(self, params): - if isinstance(params, dict): - result = {} - for key, value in params.items(): - result[smart_str(key, self.charset)] = OracleParam(param, self.charset) - return result - else: - return tuple([OracleParam(p, self.charset, True) for p in params]) + return tuple([OracleParam(p, self.charset, True) for p in params]) def _guess_input_sizes(self, params_list): - if isinstance(params_list[0], dict): - sizes = {} - iterators = [params.iteritems() for params in params_list] - else: - sizes = [None] * len(params_list[0]) - iterators = [enumerate(params) for params in params_list] - for iterator in iterators: - for key, value in iterator: - if value.input_size: sizes[key] = value.input_size - if isinstance(sizes, dict): - self.setinputsizes(**sizes) - else: - self.setinputsizes(*sizes) + sizes = [None] * len(params_list[0]) + for params in params_list: + for i, value in enumerate(params): + if value.input_size: sizes[i] = value.input_size + self.setinputsizes(*sizes) def _param_generator(self, params): - if isinstance(params, dict): - return dict([(k, p.smart_str) for k, p in params.iteritems()]) - else: - return [p.smart_str for p in params] + return [p.smart_str for p in params] def execute(self, query, params=None): if params is None: