diff options
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 1 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/functions.py | 5 |
2 files changed, 5 insertions, 1 deletions
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 |