From 7dc4df8a68eafd406e7378eedbb9c26188611a5c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 6 Dec 2009 22:58:05 +0000 Subject: - The Boolean type, when used on a backend that doesn't have native boolean support, will generate a CHECK constraint "col IN (0, 1)" along with the int/smallint- based column type. This can be switched off if desired with create_constraint=False. Note that MySQL has no native boolean *or* CHECK constraint support so this feature isn't available on that platform. [ticket:1589] --- lib/sqlalchemy/dialects/sqlite/base.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/sqlalchemy/dialects/sqlite/base.py') diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index 2b929331a..d83eb4b86 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -146,23 +146,7 @@ class TIME(_DateTimeMixin, sqltypes.Time): def result_processor(self, dialect, coltype): return self._result_processor(datetime.time) -class _SLBoolean(sqltypes.Boolean): - def bind_processor(self, dialect): - def process(value): - if value is None: - return None - return value and 1 or 0 - return process - - def result_processor(self, dialect, coltype): - def process(value): - if value is None: - return None - return value == 1 - return process - colspecs = { - sqltypes.Boolean: _SLBoolean, sqltypes.Date: DATE, sqltypes.DateTime: DATETIME, sqltypes.Float: _SLFloat, -- cgit v1.2.1