Commits

ike...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 04c76a3

[1.0.X] Removed support for passing params as dicts in the oracle backend. Wasn't documented, didn't work, isn't necessary. Backport of [9418] from trunk.

  • Participants
  • Parent commits 2e3bd8a
  • Branches releases/1.0.X

Comments (0)

Files changed (1)

File django/db/backends/oracle/base.py

     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: