From 63488b2d1ea47d30db23e3e5659917fcb4ad027a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 Jul 2013 21:52:54 -0400 Subject: The newly added SQLite DATETIME arguments storage_format and regexp apparently were not fully implemented correctly; while the arguments were accepted, in practice they would have no effect; this has been fixed. Also in 0.8.3. [ticket:2781] --- lib/sqlalchemy/dialects/sqlite/base.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sqlalchemy/dialects/sqlite') diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index a9a81394f..a7bcda128 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -153,6 +153,12 @@ class _DateTimeMixin(object): if storage_format is not None: self._storage_format = storage_format + def adapt(self, cls, **kw): + if self._storage_format: + kw["storage_format"] = self._storage_format + if self._reg: + kw["regexp"] = self._reg + return util.constructor_copy(self, cls, **kw) class DATETIME(_DateTimeMixin, sqltypes.DateTime): """Represent a Python datetime object in SQLite using a string. -- cgit v1.2.1