Refs #27632 -- Simplified params dict creation for Oracle (#7772)

This commit is contained in:
Josh Smeaton 2017-01-01 12:39:03 +11:00 committed by GitHub
parent 2b4bb78f79
commit 26c9f529c9
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ class FormatStylePlaceholderCursor(object):
params = [(param, type(param)) for param in params] params = [(param, type(param)) for param in params]
params_dict = {param: ':arg%d' % i for i, param in enumerate(set(params))} params_dict = {param: ':arg%d' % i for i, param in enumerate(set(params))}
args = [params_dict[param] for param in params] args = [params_dict[param] for param in params]
params = dict(zip(params_dict.values(), list(zip(*params_dict.keys()))[0])) params = {value: key[0] for key, value in params_dict.items()}
query = query % tuple(args) query = query % tuple(args)
else: else:
# Handle params as sequence # Handle params as sequence