to int, for DBAPIs such as pymssql that naively call
str() on values.
- The 'info' attribute of Column is copied during
Column.copy(), i.e. as occurs when using columns
in declarative mixins. [ticket:1967]
+
+ - Added a bind processor for booleans which coerces
+ to int, for DBAPIs such as pymssql that naively call
+ str() on values.
- engine
- Implemented sequence check capability for the C
return type_(*map(int, rmatch(value).groups(0)))
return process
+def boolean_to_int(value):
+ if value is None:
+ return None
+ else:
+ return int(value)
+
try:
from sqlalchemy.cprocessors import UnicodeResultProcessor, \
DecimalResultProcessor, \
)
table.append_constraint(e)
+ def bind_processor(self, dialect):
+ if dialect.supports_native_boolean:
+ return None
+ else:
+ return processors.boolean_to_int
+
def result_processor(self, dialect, coltype):
if dialect.supports_native_boolean:
return None