-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathTranslator.cs
More file actions
35 lines (30 loc) · 946 Bytes
/
Translator.cs
File metadata and controls
35 lines (30 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (C) 2009-2022 Xtensive LLC.
// This code is distributed under MIT license terms.
// See the License.txt file in the project root for more information.
// Created by: Denis Krjuchkov
// Created: 2009.07.17
using System;
using Xtensive.Sql.Compiler;
using Xtensive.Sql.Ddl;
using Xtensive.Sql.Dml;
namespace Xtensive.Sql.Drivers.Oracle.v11
{
internal class Translator : v10.Translator
{
public override void OrderExit(SqlCompilerContext context, SqlOrder node) =>
context.Output.Append(node.Ascending ? "ASC NULLS FIRST" : "DESC NULLS LAST");
/// <inheritdoc/>
public override string Translate(SqlValueType type)
{
// we need to explicitly specify maximum interval precision
return type.Type == SqlType.Interval
? "INTERVAL DAY(6) TO SECOND(7)"
: base.Translate(type);
}
// Constructors
public Translator(SqlDriver driver)
: base(driver)
{
}
}
}