File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,10 @@ namespace NHibernate.Dialect
77{
88 public class Oracle9iDialect : Oracle8iDialect
99 {
10- public override string CurrentTimestampSelectString
11- {
12- get { return "select systimestamp from dual" ; }
13- }
10+ public override string CurrentTimestampSelectString =>
11+ $ "select { CurrentTimestampSQLFunctionName } from dual";
1412
15- public override string CurrentTimestampSQLFunctionName
16- {
17- get
18- {
19- // the standard SQL function name is current_timestamp...
20- return "current_timestamp" ;
21- }
22- }
13+ public override string CurrentTimestampSQLFunctionName => "localtimestamp" ;
2314
2415 // Current_timestamp is a timestamp with time zone, so it can always be converted back to UTC.
2516 /// <inheritdoc />
@@ -46,6 +37,9 @@ protected override void RegisterFunctions()
4637 {
4738 base . RegisterFunctions ( ) ;
4839
40+ RegisterFunction (
41+ "current_timestamp" ,
42+ new NoArgSQLFunction ( "localtimestamp" , NHibernateUtil . LocalDateTime , false ) ) ;
4943 RegisterFunction (
5044 "current_utctimestamp" ,
5145 new SQLFunctionTemplate ( NHibernateUtil . UtcDateTime , "SYS_EXTRACT_UTC(current_timestamp)" ) ) ;
You can’t perform that action at this time.
0 commit comments