got mapper, objectstore, inheritance unittest working with oracle8, tweaks to join syntax
if join.isouter:
# if outer join, push on the right side table as the current "outertable"
- outertable = self._outertable
self._outertable = join.right
# now re-visit the onclause, which will be used as a where clause
# (the first visit occured via the Join object itself right before it called visit_join())
join.onclause.accept_visitor(self)
- self._outertable = outertable
+ self._outertable = None
self.visit_compound(self.wheres[join])
self.strings[alias] = self.get_str(alias.original)
def visit_column(self, column):
- if self._use_ansi:
- return ansisql.ANSICompiler.visit_column(self, column)
-
- if column.table is self._outertable:
- self.strings[column] = "%s.%s(+)" % (column.table.name, column.name)
- else:
- self.strings[column] = "%s.%s" % (column.table.name, column.name)
+ ansisql.ANSICompiler.visit_column(self, column)
+ if not self._use_ansi and self._outertable is not None and column.table is self._outertable:
+ self.strings[column] = self.strings[column] + "(+)"
def visit_insert(self, insert):
"""inserts are required to have the primary keys be explicitly present.
engine = testbase.db
global foo, bar, foo_bar
foo = Table('foo', engine,
- Column('id', Integer, primary_key=True),
+ Column('id', Integer, Sequence('foo_id_seq'), primary_key=True),
Column('data', String(20)),
).create()
elif sys.argv[1] == '--db':
(param, DBTYPE) = (sys.argv.pop(1), sys.argv.pop(1))
-
+ opts = {}
if (None == db_uri):
p = DBTYPE.split('.')
if len(p) > 1:
db_uri = 'mysql://database=test&host=127.0.0.1&user=scott&password=tiger'
elif DBTYPE == 'oracle':
db_uri = 'oracle://user=scott&password=tiger'
+ elif DBTYPE == 'oracle8':
+ db_uri = 'oracle://user=scott&password=tiger'
+ opts = {'use_ansi':False}
if not db_uri:
raise "Could not create engine. specify --db <sqlite|sqlite_file|postgres|mysql|oracle> to test runner."
if PROXY:
- db = proxy.ProxyEngine(echo=echo, default_ordering=True)
+ db = proxy.ProxyEngine(echo=echo, default_ordering=True, **opts)
db.connect(db_uri)
else:
- db = engine.create_engine(db_uri, echo=echo, default_ordering=True)
+ db = engine.create_engine(db_uri, echo=echo, default_ordering=True, **opts)
db = EngineAssert(db)
class PersistTest(unittest.TestCase):