From df68f307775a545e067f3a8a3f6bcc9e1f11d9b2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 18 Dec 2007 06:13:42 +0000 Subject: get most oracle tests in sql working again.... --- lib/sqlalchemy/sql/compiler.py | 1 + lib/sqlalchemy/sql/functions.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 30b4089d3..247285384 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -90,6 +90,7 @@ FUNCTIONS = { functions.current_user: 'CURRENT_USER', functions.localtime: 'LOCALTIME', functions.localtimestamp: 'LOCALTIMESTAMP', + functions.sysdate: 'sysdate', functions.session_user :'SESSION_USER', functions.user: 'USER' } diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index d39032b91..869df46a7 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -67,6 +67,9 @@ class localtimestamp(AnsiFunction): class session_user(AnsiFunction): __return_type__ = sqltypes.String +class sysdate(AnsiFunction): + __return_type__ = sqltypes.DateTime + class user(AnsiFunction): __return_type__ = sqltypes.String @@ -75,4 +78,4 @@ def _type_from_args(args): if not isinstance(a.type, sqltypes.NullType): return a.type else: - return sqltypes.NullType \ No newline at end of file + return sqltypes.NullType -- cgit v1.2.1