diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-29 19:06:33 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-29 19:06:33 -0500 |
| commit | 207fafe7e35b945a41e139b5507a8d73c7b019db (patch) | |
| tree | 36a859de332c9d4a94b8333dd18ef29aeb610c06 /test/sql | |
| parent | 58fab1be984a42400e67bdf7f15acd5a6d7c4b3c (diff) | |
| download | sqlalchemy-207fafe7e35b945a41e139b5507a8d73c7b019db.tar.gz | |
- add support for bindparam() called from AsFromText
- get PG dialect to work around "no nonexistent binds" rule for now,
though we might want to reconsider this behavior
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_text.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sql/test_text.py b/test/sql/test_text.py index af9f8db05..827f4dfb9 100644 --- a/test/sql/test_text.py +++ b/test/sql/test_text.py @@ -345,4 +345,16 @@ class AsFromTest(fixtures.TestBase, AssertsCompiledSQL): s, "SELECT mytable.myid, (select id from user) AS anon_1 " "FROM mytable WHERE mytable.myid = (select id from user)" + ) + + def test_build_bindparams(self): + t = text("select id from user :foo :bar :bat") + t = t.bindparams(bindparam("foo", type_=Integer)) + t = t.columns(id=Integer) + t = t.bindparams(bar=String) + t = t.bindparams(bindparam('bat', value='bat')) + + eq_( + set(t.element._bindparams), + set(["bat", "foo", "bar"]) )
\ No newline at end of file |
