Skip to content

Commit 93b4245

Browse files
committed
Important! Change NULLs behavior in ORDER BY clause
The rest of storages have nulls order similar to .NET ordering algorithm so now Oracle v11 and above have the same order as .NET
1 parent 328f039 commit 93b4245

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Orm/Xtensive.Orm.Oracle/Sql.Drivers.Oracle/v11/Translator.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System;
88
using Xtensive.Sql.Compiler;
99
using Xtensive.Sql.Ddl;
10+
using Xtensive.Sql.Dml;
1011

1112
namespace Xtensive.Sql.Drivers.Oracle.v11
1213
{
@@ -32,6 +33,14 @@ public override string Translate(SqlCompilerContext context, SqlCreateIndex node
3233
return base.Translate(context, node, section);
3334
}
3435

36+
public override string Translate(SqlCompilerContext context, SqlOrder node, NodeSection section)
37+
{
38+
if (section == NodeSection.Exit) {
39+
return node.Ascending ? "ASC NULLS FIRST" : "DESC NULLS LAST";
40+
}
41+
return string.Empty;
42+
}
43+
3544
public override string Translate(SqlValueType type)
3645
{
3746
// we need to explicitly specify maximum interval precision

0 commit comments

Comments
 (0)