From a0ffeb546468e14fa9d99b30571f7b8f9b32f421 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 1 Feb 2008 01:16:18 +0000 Subject: - some consolidation of tests in select.py, moved other tests to more specific modules - added "now()" as a generic function; on SQLite and Oracle compiles as "CURRENT_TIMESTAMP"; "now()" on all others [ticket:943] --- lib/sqlalchemy/sql/functions.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy/sql/functions.py') diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index 869df46a7..be1d8eb61 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -35,6 +35,9 @@ class coalesce(GenericFunction): kwargs.setdefault('type_', _type_from_args(args)) GenericFunction.__init__(self, args=args, **kwargs) +class now(GenericFunction): + __return_type__ = sqltypes.DateTime + class concat(GenericFunction): __return_type__ = sqltypes.String def __init__(self, *args, **kwargs): -- cgit v1.2.1