From: Mike Bayer Date: Sat, 24 Sep 2005 03:25:19 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~601 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=665d50932598ccc80f8c6c54b42dd2cb0e862781;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index e8f382308c..fca984ba4b 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -40,16 +40,15 @@ class ANSISQLEngine(sqlalchemy.engine.SQLEngine): def schemadropper(self, proxy, **params): return ANSISchemaDropper(proxy, **params) + def compiler(self, statement, bindparams): + return ANSICompiler(self, statement, bindparams) + def connect_args(self): return ([],{}) def dbapi(self): return object() - def compile(self, statement, bindparams): - compiler = ANSICompiler(self, statement, bindparams) - statement.accept_visitor(compiler) - return compiler class ANSICompiler(sql.Compiled): def __init__(self, engine, statement, bindparams): diff --git a/test/select.py b/test/select.py index b54c73e1b6..58bd809e3c 100644 --- a/test/select.py +++ b/test/select.py @@ -33,7 +33,7 @@ table3 = Table( class SQLTest(PersistTest): def runtest(self, clause, result, engine = None, params = None): c = clause.compile(engine, params) - print "\n" + str(c) + repr(c.get_params()) + self.echo("\n" + str(c) + repr(c.get_params())) cc = re.sub(r'\n', '', str(c)) self.assert_(cc == result)