Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.0.X] Removed support for passing params as dicts in the oracle bac…

…kend. Wasn't documented, didn't work, isn't necessary. Backport of [9418] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aef9663625c31ecfdeb91f25eb1631ef3ed4b5dd 1 parent 4007ac0
@ikelly ikelly authored
Showing with 7 additions and 24 deletions.
  1. +7 −24 django/db/backends/oracle/base.py
View
31 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:
Please sign in to comment.
Something went wrong with that request. Please try again.