Skip to content

Commit 5c6467d

Browse files
committed
Oracle: Correct view drop statement
1 parent 2541d4f commit 5c6467d

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

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

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ public override void Translate(SqlCompilerContext context, SqlDropTable node)
143143
}
144144
}
145145

146+
public override void Translate(SqlCompilerContext context, SqlDropView node)
147+
{
148+
_ = context.Output.Append("DROP VIEW ");
149+
Translate(context, node.View);
150+
if (node.Cascade) {
151+
_ = context.Output.Append(" CASCADE CONSTRAINTS");
152+
}
153+
}
154+
146155
/// <inheritdoc/>
147156
public override void Translate(SqlCompilerContext context, SqlDropSequence node)
148157
{
@@ -370,21 +379,6 @@ public override void Translate(IOutput output, SqlFunctionType type)
370379
}
371380
}
372381

373-
/// <inheritdoc/>
374-
public override string TranslateToString(SqlFunctionType type)
375-
{
376-
return type switch {
377-
SqlFunctionType.Truncate or SqlFunctionType.DateTimeTruncate => "TRUNC",
378-
SqlFunctionType.IntervalNegate => "-1*",
379-
SqlFunctionType.Substring => "SUBSTR",
380-
SqlFunctionType.Log => "LN",
381-
SqlFunctionType.Log10 => "LOG",
382-
SqlFunctionType.Ceiling => "CEIL",
383-
SqlFunctionType.CurrentDateTimeOffset => "CURRENT_TIMESTAMP",
384-
_ => base.TranslateToString(type),
385-
};
386-
}
387-
388382
/// <inheritdoc/>
389383
public override void Translate(IOutput output, SqlNodeType type)
390384
{

0 commit comments

Comments
 (0)