diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-11 18:25:21 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-11 18:25:21 -0400 |
| commit | cc29c4afff20dd251dbc045a490da9942f98b1bf (patch) | |
| tree | 377fe62a05dcb6555f21026259589010491cd109 /test/dialect | |
| parent | 3e810771a8ace7351fcd43deaf55891fd1c30a53 (diff) | |
| download | sqlalchemy-cc29c4afff20dd251dbc045a490da9942f98b1bf.tar.gz | |
- Fixed long-standing bug in Oracle dialect where bound parameter
names that started with numbers would not be quoted, as Oracle
doesn't like numerics in bound parameter names.
fixes #2138
Diffstat (limited to 'test/dialect')
| -rw-r--r-- | test/dialect/test_oracle.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py index 36eacf864..a771c5d80 100644 --- a/test/dialect/test_oracle.py +++ b/test/dialect/test_oracle.py @@ -104,6 +104,28 @@ class QuotedBindRoundTripTest(fixtures.TestBase): (2, 2, 2) ) + def test_numeric_bind_round_trip(self): + eq_( + testing.db.scalar( + select([ + literal_column("2", type_=Integer()) + + bindparam("2_1", value=2)]) + ), + 4 + ) + + @testing.provide_metadata + def test_numeric_bind_in_crud(self): + t = Table( + "asfd", self.metadata, + Column("100K", Integer) + ) + t.create() + + testing.db.execute(t.insert(), {"100K": 10}) + eq_( + testing.db.scalar(t.select()), 10 + ) class CompileTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = "oracle" #oracle.dialect() |
