as invalidated connections, DEBUG for all the acquire/return
logging. `echo_pool` can be False, None, True or "debug"
the same way as `echo` works.
+
+ - All pyodbc-dialects now support extra pyodbc-specific
+ kw arguments 'ansi', 'unicode_results', 'autocommit'.
+ [ticket:1621]
- deprecated or removed
* result.last_inserted_ids() is deprecated. Use
from sqlalchemy.connectors import Connector
+from sqlalchemy.util import asbool
import sys
import re
keys = opts
query = url.query
+ connect_args = {}
+ for param in ('ansi', 'unicode_results', 'autocommit'):
+ if param in keys:
+ connect_args[param] = asbool(keys.pop(param))
+
if 'odbc_connect' in keys:
connectors = [urllib.unquote_plus(keys.pop('odbc_connect'))]
else:
connectors.append("AutoTranslate=%s" % keys.pop("odbc_autotranslate"))
connectors.extend(['%s=%s' % (k,v) for k,v in keys.iteritems()])
- return [[";".join (connectors)], {}]
-
+ return [[";".join (connectors)], connect_args]
+
def is_disconnect(self, e):
if isinstance(e, self.dbapi.ProgrammingError):
return "The cursor's connection has been closed." in str(e) or 'Attempt to use a closed connection.' in str(e)