From: Mike Bayer Date: Thu, 23 Mar 2006 07:38:28 +0000 (+0000) Subject: added explicit "convert date types to a string in bind params", since pysqlite1 doesn... X-Git-Tag: rel_0_1_5~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd39a0a78049f0e1978bc7990d7c677dbb891ac4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git added explicit "convert date types to a string in bind params", since pysqlite1 doesnet seem to do it, operation is synymous with what pysqlite2 does --- diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index ffa7c1bd45..0e208854e3 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -38,6 +38,11 @@ class SLSmallInteger(sqltypes.Smallinteger): class SLDateTime(sqltypes.DateTime): def get_col_spec(self): return "TIMESTAMP" + def convert_bind_param(self, value, engine): + if value is not None: + return str(value) + else: + return None def _cvt(self, value, engine, fmt): if value is None: return None