<s> """<STR_LIT>""" <EOL> from sqlalchemy . dialects . sybase . base import SybaseDialect , SybaseExecutionContext <EOL> from sqlalchemy . connectors . pyodbc import PyODBCConnector <EOL> from sqlalchemy import types as sqltypes , processors <EOL> import decimal <EOL> class _SybNumeric_pyodbc ( sqltypes . Numeric ) : <EOL> """<STR_LIT>""" <EOL> def bind_processor ( self , dialect ) : <EOL> super_process = super ( _SybNumeric_pyodbc , self ) . bind_processor ( dialect ) <EOL> def process ( value ) : <EOL> if self . asdecimal and isinstance ( value , decimal . Decimal ) : <EOL> if value . adjusted ( ) < - <NUM_LIT:6> : <EOL> return processors . to_float ( value ) <EOL> if super_process : <EOL> return super_process ( value ) <EOL> else : <EOL> return value <EOL> return process <EOL> class SybaseExecutionContext_pyodbc ( SybaseExecutionContext ) : <EOL> def set_ddl_autocommit ( self , connection , value ) : <EOL> if value : <EOL> connection . autocommit = True <EOL> else : <EOL> connection . autocommit = False <EOL> class SybaseDialect_pyodbc ( PyODBCConnector , SybaseDialect ) : <EOL> execution_ctx_cls = SybaseExecutionContext_pyodbc <EOL> colspecs = { <EOL> sqltypes . Numeric : _SybNumeric_pyodbc , <EOL> } <EOL> dialect = SybaseDialect_pyodbc </s>
