From 886ddcd12db97984cdb1cc94b9abaee5df4eb6d5 Mon Sep 17 00:00:00 2001 From: Michael Trier Date: Mon, 22 Dec 2008 20:20:55 +0000 Subject: Major refactoring of the MSSQL dialect. Thanks zzzeek. Includes simplifying the IDENTITY handling and the exception handling. Also includes a cleanup of the connection string handling for pyodbc to favor the DSN syntax. --- lib/sqlalchemy/engine/default.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine/default.py') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 11fd43df5..682ab526c 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -259,6 +259,9 @@ class DefaultExecutionContext(base.ExecutionContext): def post_exec(self): pass + def handle_dbapi_exception(self, e): + pass + def get_result_proxy(self): return base.ResultProxy(self) @@ -306,7 +309,7 @@ class DefaultExecutionContext(base.ExecutionContext): try: self.cursor.setinputsizes(*inputsizes) except Exception, e: - self._connection._handle_dbapi_exception(e, None, None, None) + self._connection._handle_dbapi_exception(e, None, None, None, self) raise else: inputsizes = {} @@ -318,7 +321,7 @@ class DefaultExecutionContext(base.ExecutionContext): try: self.cursor.setinputsizes(**inputsizes) except Exception, e: - self._connection._handle_dbapi_exception(e, None, None, None) + self._connection._handle_dbapi_exception(e, None, None, None, self) raise def __process_defaults(self): -- cgit v1.2.1