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))
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:
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
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: