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
7
7
{
8
8
public class Oracle9iDialect : Oracle8iDialect
9
9
{
10
- public override string CurrentTimestampSelectString
11
- {
12
- get { return "select systimestamp from dual" ; }
13
- }
10
+ public override string CurrentTimestampSelectString =>
11
+ $ "select { CurrentTimestampSQLFunctionName } from dual";
14
12
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" ;
23
14
24
15
// Current_timestamp is a timestamp with time zone, so it can always be converted back to UTC.
25
16
/// <inheritdoc />
@@ -46,6 +37,9 @@ protected override void RegisterFunctions()
46
37
{
47
38
base . RegisterFunctions ( ) ;
48
39
40
+ RegisterFunction (
41
+ "current_timestamp" ,
42
+ new NoArgSQLFunction ( "localtimestamp" , NHibernateUtil . LocalDateTime , false ) ) ;
49
43
RegisterFunction (
50
44
"current_utctimestamp" ,
51
45
new SQLFunctionTemplate ( NHibernateUtil . UtcDateTime , "SYS_EXTRACT_UTC(current_timestamp)" ) ) ;
You can’t perform that action at this time.
0 commit comments