Skip to content

Commit db586ac

Browse files
committed
SqlDml.TimeToNanoseconds added
1 parent de92f46 commit db586ac

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

Orm/Xtensive.Orm/Sql/Dml/SqlFunctionType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public enum SqlFunctionType
7474
TimeToString,
7575
TimeToDateTime,
7676
TimeToDateTimeOffset,
77+
TimeToNanoseconds,
7778
#endif
7879

7980
DateTimeConstruct,

Orm/Xtensive.Orm/Sql/SqlDml.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,12 @@ public static SqlFunctionCall TimeToDateTime(SqlExpression expression)
755755
return new SqlFunctionCall(SqlFunctionType.TimeToDateTime, expression);
756756
}
757757

758+
public static SqlExpression TimeToNanoseconds(SqlExpression source)
759+
{
760+
ArgumentNullException.ThrowIfNull(source, nameof(source));
761+
return new SqlFunctionCall(SqlFunctionType.TimeToNanoseconds, source);
762+
}
763+
758764
public static SqlFunctionCall TimeToDateTimeOffset(SqlExpression expression)
759765
{
760766
ArgumentValidator.EnsureArgumentNotNull(expression, "expression");
@@ -783,13 +789,13 @@ public static SqlFunctionCall IntervalConstruct(SqlExpression nanoseconds)
783789
public static SqlFunctionCall IntervalToMilliseconds(SqlExpression source)
784790
{
785791
ArgumentValidator.EnsureArgumentNotNull(source, "source");
786-
return new SqlFunctionCall(SqlFunctionType.IntervalToMilliseconds, source);
792+
return new SqlFunctionCall(SqlFunctionType.IntervalToMilliseconds, source);
787793
}
788794

789795
public static SqlFunctionCall IntervalToNanoseconds(SqlExpression source)
790796
{
791797
ArgumentValidator.EnsureArgumentNotNull(source, "source");
792-
return new SqlFunctionCall(SqlFunctionType.IntervalToNanoseconds, source);
798+
return new SqlFunctionCall(SqlFunctionType.IntervalToNanoseconds, source);
793799
}
794800

795801
public static SqlFunctionCall IntervalAbs(SqlExpression source)

0 commit comments

Comments
 (0)