summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/dialects/oracle/zxjdbc.py10
-rw-r--r--test/dialect/test_oracle.py1
-rw-r--r--test/engine/test_execute.py2
-rw-r--r--test/orm/test_naturalpks.py2
-rw-r--r--test/sql/test_returning.py4
-rw-r--r--test/sql/test_types.py2
6 files changed, 11 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/zxjdbc.py b/lib/sqlalchemy/dialects/oracle/zxjdbc.py
index fba16288a..5b4760ff8 100644
--- a/lib/sqlalchemy/dialects/oracle/zxjdbc.py
+++ b/lib/sqlalchemy/dialects/oracle/zxjdbc.py
@@ -53,17 +53,17 @@ class _ZxJDBCNumeric(sqltypes.Numeric):
class Oracle_zxjdbcCompiler(OracleCompiler):
def returning_clause(self, stmt, returning_cols):
- columnlist = list(expression._select_iterables(returning_cols))
+ self.returning_cols = list(expression._select_iterables(returning_cols))
# within_columns_clause=False so that labels (foo AS bar) don't render
columns = [self.process(c, within_columns_clause=False, result_map=self.result_map)
- for c in columnlist]
+ for c in self.returning_cols]
if not hasattr(self, 'returning_parameters'):
self.returning_parameters = []
binds = []
- for i, col in enumerate(columnlist):
+ for i, col in enumerate(self.returning_cols):
dbtype = col.type.dialect_impl(self.dialect).get_dbapi_type(self.dialect.dbapi)
self.returning_parameters.append((i + 1, dbtype))
@@ -123,10 +123,8 @@ class ReturningResultProxy(base.FullyBufferedResultProxy):
super(ReturningResultProxy, self).__init__(context)
def _cursor_description(self):
- returning = self.context.compiled.returning
-
ret = []
- for c in returning:
+ for c in self.context.compiled.returning_cols:
if hasattr(c, 'name'):
ret.append((c.name, c.type))
else:
diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py
index 5b64165d8..d007428a7 100644
--- a/test/dialect/test_oracle.py
+++ b/test/dialect/test_oracle.py
@@ -487,6 +487,7 @@ class TypesTest(TestBase, AssertsCompiledSQL):
finally:
t1.drop()
+ @testing.fails_on('+zxjdbc', 'Not yet known how to pass values of the INTERVAL type')
def test_interval(self):
for type_, expected in [
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index 9da0d4934..39d4144c8 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -189,7 +189,7 @@ class ProxyConnectionTest(TestBase):
insert2_params = (6, 'Foo')
if testing.against('oracle+zxjdbc'):
from sqlalchemy.dialects.oracle.zxjdbc import ReturningParam
- insert2_params.append(ReturningParam(12))
+ insert2_params += (ReturningParam(12),)
cursor = [
("CREATE TABLE t1", {}, ()),
("INSERT INTO t1 (c1, c2)", {'c2': 'some data', 'c1': 5}, (5, 'some data')),
diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py
index 44dce446b..7c7e51b73 100644
--- a/test/orm/test_naturalpks.py
+++ b/test/orm/test_naturalpks.py
@@ -747,7 +747,7 @@ class JoinedInheritanceTest(_base.MappedTest):
self._test_fk(True)
# PG etc. need passive=True to allow PK->PK cascade
- @testing.fails_on_everything_except('sqlite', '+zxjdbc')
+ @testing.fails_on_everything_except('sqlite', 'mysql+zxjdbc', 'postgresql+zxjdbc')
def test_fk_nonpassive(self):
self._test_fk(False)
diff --git a/test/sql/test_returning.py b/test/sql/test_returning.py
index ba3e2ebb9..332f4eef5 100644
--- a/test/sql/test_returning.py
+++ b/test/sql/test_returning.py
@@ -96,7 +96,7 @@ class ReturningTest(TestBase, AssertsExecutionResults):
eq_(result.fetchall(), [(1,)])
@testing.fails_on('postgresql', '')
- @testing.fails_on('oracle', '')
+ @testing.fails_on('oracle+cx_oracle', '')
@testing.crashes('mssql+mxodbc', 'Raises an error')
def test_executemany():
# return value is documented as failing with psycopg2/executemany
@@ -106,7 +106,7 @@ class ReturningTest(TestBase, AssertsExecutionResults):
if testing.against('mssql+zxjdbc'):
# jtds apparently returns only the first row
eq_(result2.fetchall(), [(2, 2, False, None)])
- elif testing.against('firebird', 'mssql'):
+ elif testing.against('firebird', 'mssql', 'oracle'):
# Multiple inserts only return the last row
eq_(result2.fetchall(), [(3, 3, True, None)])
else:
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
index 6a021b96f..6404783a5 100644
--- a/test/sql/test_types.py
+++ b/test/sql/test_types.py
@@ -1197,6 +1197,7 @@ class IntervalTest(TestBase, AssertsExecutionResults):
@testing.fails_on("+pg8000", "Not yet known how to pass values of the INTERVAL type")
@testing.fails_on("postgresql+zxjdbc", "Not yet known how to pass values of the INTERVAL type")
+ @testing.fails_on("oracle+zxjdbc", "Not yet known how to pass values of the INTERVAL type")
def test_roundtrip(self):
small_delta = datetime.timedelta(days=15, seconds=5874)
delta = datetime.timedelta(414)
@@ -1210,6 +1211,7 @@ class IntervalTest(TestBase, AssertsExecutionResults):
eq_(row['native_interval_args'], delta)
eq_(row['non_native_interval'], delta)
+ @testing.fails_on("oracle+zxjdbc", "Not yet known how to pass values of the INTERVAL type")
def test_null(self):
interval_table.insert().execute(id=1, native_inverval=None, non_native_interval=None)
row = interval_table.select().execute().first()