diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-12-06 22:23:10 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-12-06 22:23:10 +0000 |
commit | 541b6772e9b8a09b10bd7a16fa9e2b7f693d1194 (patch) | |
tree | 5dc22ca324eafbb6ac48a296f02f166984252d46 /test/dialect/mssql.py | |
parent | 3ac9c93e260aa1a5d9c88a648bf7d1213a0e817f (diff) | |
download | sqlalchemy-541b6772e9b8a09b10bd7a16fa9e2b7f693d1194.tar.gz |
- generation of "unique" bind parameters has been simplified to use the same
"unique identifier" mechanisms as everything else. This doesn't affect
user code, except any code that might have been hardcoded against the generated
names. Generated bind params now have the form "<paramname>_<num>",
whereas before only the second bind of the same name would have this form.
- bindparam() objects themselves can be used as keys for execute(), i.e.
statement.execute({bind1:'foo', bind2:'bar'})
Diffstat (limited to 'test/dialect/mssql.py')
-rwxr-xr-x | test/dialect/mssql.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/dialect/mssql.py b/test/dialect/mssql.py index 3b40ed354..1a8504701 100755 --- a/test/dialect/mssql.py +++ b/test/dialect/mssql.py @@ -16,7 +16,7 @@ class CompileTest(SQLCompileTest): def test_update(self): t = table('sometable', column('somecolumn')) - self.assert_compile(t.update(t.c.somecolumn==7), "UPDATE sometable SET somecolumn=:somecolumn WHERE sometable.somecolumn = :sometable_somecolumn", dict(somecolumn=10)) + self.assert_compile(t.update(t.c.somecolumn==7), "UPDATE sometable SET somecolumn=:somecolumn WHERE sometable.somecolumn = :sometable_somecolumn_1", dict(somecolumn=10)) def test_count(self): t = table('sometable', column('somecolumn')) @@ -40,12 +40,12 @@ class CompileTest(SQLCompileTest): select([t2.c.col3.label('col3'), t2.c.col4.label('col4')], t2.c.col2.in_(["t2col2r2", "t2col2r3"])) ) u = union(s1, s2, order_by=['col3', 'col4']) - self.assert_compile(u, "SELECT t1.col3 AS col3, t1.col4 AS col4 FROM t1 WHERE t1.col2 IN (:t1_col2, :t1_col2_1) UNION SELECT t2.col3 AS col3, t2.col4 AS col4 FROM t2 WHERE t2.col2 IN (:t2_col2, :t2_col2_1) ORDER BY col3, col4") + self.assert_compile(u, "SELECT t1.col3 AS col3, t1.col4 AS col4 FROM t1 WHERE t1.col2 IN (:t1_col2_1, :t1_col2_2) UNION SELECT t2.col3 AS col3, t2.col4 AS col4 FROM t2 WHERE t2.col2 IN (:t2_col2_3, :t2_col2_4) ORDER BY col3, col4") - self.assert_compile(u.alias('bar').select(), "SELECT bar.col3, bar.col4 FROM (SELECT t1.col3 AS col3, t1.col4 AS col4 FROM t1 WHERE t1.col2 IN (:t1_col2, :t1_col2_1) UNION SELECT t2.col3 AS col3, t2.col4 AS col4 FROM t2 WHERE t2.col2 IN (:t2_col2, :t2_col2_1)) AS bar") + self.assert_compile(u.alias('bar').select(), "SELECT bar.col3, bar.col4 FROM (SELECT t1.col3 AS col3, t1.col4 AS col4 FROM t1 WHERE t1.col2 IN (:t1_col2_1, :t1_col2_2) UNION SELECT t2.col3 AS col3, t2.col4 AS col4 FROM t2 WHERE t2.col2 IN (:t2_col2_3, :t2_col2_4)) AS bar") def test_function(self): - self.assert_compile(func.foo(1, 2), "foo(:foo, :foo_1)") + self.assert_compile(func.foo(1, 2), "foo(:foo_1, :foo_2)") self.assert_compile(func.current_time(), "CURRENT_TIME") self.assert_compile(func.foo(), "foo()") |