diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-04 18:53:35 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-03-04 18:53:35 +0000 |
commit | 7ad8cc9420f796dfcafbc84dc06453fc3eb51abe (patch) | |
tree | 1be784c617d361f40e29d1b5ceb2b7ef5f8e1893 /lib/sqlalchemy/engine.py | |
parent | e9999c74e6d476685f5c0ca741d86be3ef5050a0 (diff) | |
download | sqlalchemy-7ad8cc9420f796dfcafbc84dc06453fc3eb51abe.tar.gz |
removed the dependency of ANSICompiler on SQLEngine. you can now make ANSICompilers and compile SQL with no engine at all.
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r-- | lib/sqlalchemy/engine.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py index e57cc7bc3..d07dd5734 100644 --- a/lib/sqlalchemy/engine.py +++ b/lib/sqlalchemy/engine.py @@ -227,15 +227,12 @@ class SQLEngine(schema.SchemaEngine): self._paramstyle = 'named' if self._paramstyle == 'named': - self.bindtemplate = ':%s' self.positional=False elif self._paramstyle == 'pyformat': - self.bindtemplate = "%%(%s)s" self.positional=False elif self._paramstyle == 'qmark' or self._paramstyle == 'format' or self._paramstyle == 'numeric': # for positional, use pyformat internally, ANSICompiler will convert # to appropriate character upon compilation - self.bindtemplate = "%%(%s)s" self.positional = True else: raise DBAPIError("Unsupported paramstyle '%s'" % self._paramstyle) @@ -310,8 +307,7 @@ class SQLEngine(schema.SchemaEngine): instance of this engine's SQLCompiler, compiles the ClauseElement, and returns the newly compiled object.""" compiler = self.compiler(statement, parameters, **kwargs) - statement.accept_visitor(compiler) - compiler.after_compile() + compiler.compile() return compiler def reflecttable(self, table): |