diff options
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 4 | ||||
| -rw-r--r-- | test/engine/test_execute.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 5499b34e7..74562a70e 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -419,7 +419,7 @@ class DefaultExecutionContext(base.ExecutionContext): param.append(processors[key](compiled_params[key])) else: param.append(compiled_params[key]) - parameters.append(param) + parameters.append(tuple(param)) else: encode = not self.dialect.supports_unicode_statements for compiled_params in compiled_parameters: @@ -438,7 +438,7 @@ class DefaultExecutionContext(base.ExecutionContext): else: param[key] = compiled_params[key] parameters.append(param) - return parameters + return tuple(parameters) def should_autocommit_text(self, statement): return AUTOCOMMIT_REGEXP.match(statement) diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index a498508d7..4a45fceb3 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -151,20 +151,20 @@ class ProxyConnectionTest(TestBase): if not testing.against('oracle+zxjdbc'): # or engine.dialect.preexecute_pk_sequences: cursor = [ ("CREATE TABLE t1", {}, ()), - ("INSERT INTO t1 (c1, c2)", {'c2': 'some data', 'c1': 5}, [5, 'some data']), - ("SELECT lower", {'lower_2':'Foo'}, ['Foo']), - ("INSERT INTO t1 (c1, c2)", {'c2': 'foo', 'c1': 6}, [6, 'foo']), + ("INSERT INTO t1 (c1, c2)", {'c2': 'some data', 'c1': 5}, (5, 'some data')), + ("SELECT lower", {'lower_2':'Foo'}, ('Foo',)), + ("INSERT INTO t1 (c1, c2)", {'c2': 'foo', 'c1': 6}, (6, 'foo')), ("select * from t1", {}, ()), ("DROP TABLE t1", {}, ()) ] else: - insert2_params = [6, 'Foo'] + insert2_params = (6, 'Foo') if testing.against('oracle+zxjdbc'): from sqlalchemy.dialects.oracle.zxjdbc import ReturningParam insert2_params.append(ReturningParam(12)) cursor = [ ("CREATE TABLE t1", {}, ()), - ("INSERT INTO t1 (c1, c2)", {'c2': 'some data', 'c1': 5}, [5, 'some data']), + ("INSERT INTO t1 (c1, c2)", {'c2': 'some data', 'c1': 5}, (5, 'some data')), ("INSERT INTO t1 (c1, c2)", {'c1': 6, "lower_2":"Foo"}, insert2_params), # bind param name 'lower_2' might be incorrect ("select * from t1", {}, ()), ("DROP TABLE t1", {}, ()) |
