diff options
| author | Brad Allen <bradallen137@gmail.com> | 2010-03-18 14:05:59 -0600 |
|---|---|---|
| committer | Brad Allen <bradallen137@gmail.com> | 2010-03-18 14:05:59 -0600 |
| commit | 49627de3d81bd7b60b241740a4792dcf3f0bd1d5 (patch) | |
| tree | 78eda3cc5fbc41661453a9d858ce76e95f0d65ab /lib/sqlalchemy/dialects/mssql/mxodbc.py | |
| parent | ecef296c6da91adaed575963d4e28e3d97ccdc60 (diff) | |
| download | sqlalchemy-49627de3d81bd7b60b241740a4792dcf3f0bd1d5.tar.gz | |
Removed MxNumeric and MxFloat because now the sqlalchemy.types base classes support dialects having a class attribute of "supports_native_decimal" indicating native Python Demimal support. Adjusted mssql+mxodbc to use the sqlalchemy.types base classes for Float and Numeric instead of using the base mssql dialect's numeric types.
Diffstat (limited to 'lib/sqlalchemy/dialects/mssql/mxodbc.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/mxodbc.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/mxodbc.py b/lib/sqlalchemy/dialects/mssql/mxodbc.py index 2ff2f39f7..30d14bf38 100644 --- a/lib/sqlalchemy/dialects/mssql/mxodbc.py +++ b/lib/sqlalchemy/dialects/mssql/mxodbc.py @@ -3,10 +3,11 @@ import sys from sqlalchemy import types as sqltypes from sqlalchemy import util -from sqlalchemy.connectors.mxodbc import MxODBCConnector, MxNumeric, MxFloat +from sqlalchemy.connectors.mxodbc import MxODBCConnector from sqlalchemy.dialects.mssql.pyodbc import MSExecutionContext_pyodbc -from sqlalchemy.dialects.mssql.base import MSExecutionContext, MSDialect, \ - MSSQLCompiler, MSSQLStrictCompiler +from sqlalchemy.dialects.mssql.base import (MSExecutionContext, MSDialect, + MSSQLCompiler, MSSQLStrictCompiler, + _MSDateTime, _MSDate, TIME) class MSExecutionContext_mxodbc(MSExecutionContext_pyodbc): @@ -24,17 +25,14 @@ class MSDialect_mxodbc(MxODBCConnector, MSDialect): # TODO: may want to use this only if FreeTDS is not in use, # since FreeTDS doesn't seem to use native binds. statement_compiler = MSSQLStrictCompiler - execution_ctx_cls = MSExecutionContext_mxodbc - colspecs = util.update_copy( - MSDialect.colspecs, - { - sqltypes.Numeric : MxNumeric, - sqltypes.Float : MxFloat - }, - ) + colspecs = { + #sqltypes.Numeric : _MSNumeric, + sqltypes.DateTime : _MSDateTime, + sqltypes.Date : _MSDate, + sqltypes.Time : TIME, + } - def __init__(self, description_encoding='latin-1', **params): super(MSDialect_mxodbc, self).__init__(**params) |
