diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-19 23:02:45 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-19 23:02:45 +0000 |
commit | 9cccdfb0fdd54e4a254842e0f68cd41a33912776 (patch) | |
tree | 9e669d4f04f2d2bca531ce016f62ee2d88ec68ab /lib/sqlalchemy/engine/base.py | |
parent | 16ef52392c55341ae94edfca5e4feafe216844a4 (diff) | |
download | sqlalchemy-9cccdfb0fdd54e4a254842e0f68cd41a33912776.tar.gz |
removed the "create_execution_context()" method from dialects and replaced
with a more succinct "dialect.execution_ctx_cls" member
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index dbcd5b76b..9efd73a89 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -177,11 +177,6 @@ class Dialect(object): raise NotImplementedError() - def create_execution_context(self, connection, compiled=None, compiled_parameters=None, statement=None, parameters=None): - """Return a new :class:`~sqlalchemy.engine.ExecutionContext` object.""" - - raise NotImplementedError() - def do_begin(self, connection): """Provide an implementation of *connection.begin()*, given a DB-API connection.""" @@ -314,9 +309,7 @@ class ExecutionContext(object): a list of Column objects for which a server-side default or inline SQL expression value was fired off. applies to inserts and updates. - The Dialect should provide an ExecutionContext via the - create_execution_context() method. The `pre_exec` and `post_exec` - methods will be called for compiled statements. + """ def create_cursor(self): @@ -927,7 +920,8 @@ class Connection(Connectable): def __create_execution_context(self, **kwargs): try: - return self.engine.dialect.create_execution_context(connection=self, **kwargs) + dialect = self.engine.dialect + return dialect.execution_ctx_cls(dialect, connection=self, **kwargs) except Exception, e: self._handle_dbapi_exception(e, kwargs.get('statement', None), kwargs.get('parameters', None), None) raise |