From aca84bebb091a51ceeb911249c366e17b954826a Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Mon, 30 Mar 2009 20:41:48 +0000 Subject: extract() is now dialect-sensitive and supports SQLite and others. --- lib/sqlalchemy/databases/mysql.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sqlalchemy/databases/mysql.py') diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 3d71bb723..c2b233a6e 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -1914,6 +1914,10 @@ class MySQLCompiler(compiler.DefaultCompiler): "utc_timestamp":"UTC_TIMESTAMP" }) + extract_map = compiler.DefaultCompiler.extract_map.copy() + extract_map.update ({ + 'milliseconds': 'millisecond', + }) def visit_typeclause(self, typeclause): type_ = typeclause.type.dialect_impl(self.dialect) -- cgit v1.2.1