summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-02-01 01:16:18 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-02-01 01:16:18 +0000
commita0ffeb546468e14fa9d99b30571f7b8f9b32f421 (patch)
tree607a0ba4ae7ca8ff38eed0b57cd2e2a3e21c18fe /lib/sqlalchemy/sql/functions.py
parent7bf0fca85856a3662f713e3cc9e451b3c0ac344b (diff)
downloadsqlalchemy-a0ffeb546468e14fa9d99b30571f7b8f9b32f421.tar.gz
- 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]
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py3
1 files changed, 3 insertions, 0 deletions
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):