Skip to content

Commit f8e7629

Browse files
committed
Declares DateTimeOffset operations as arithmetic expressions
1 parent 86b7285 commit f8e7629

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Orm/Xtensive.Orm/Sql/Internals/SqlValidator.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2010 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44

55
using System;
66
using System.Collections.Generic;
@@ -112,8 +112,10 @@ public static bool IsBooleanExpression(SqlExpression node)
112112

113113
public static bool IsArithmeticExpression(SqlExpression node)
114114
{
115-
if (node==null)
115+
if (node==null) {
116116
return true;
117+
}
118+
117119
switch (node.NodeType) {
118120
case SqlNodeType.Add:
119121
case SqlNodeType.Avg:
@@ -148,6 +150,9 @@ public static bool IsArithmeticExpression(SqlExpression node)
148150
case SqlNodeType.DateTimeMinusInterval:
149151
case SqlNodeType.DateTimePlusInterval:
150152
case SqlNodeType.DateTimeMinusDateTime:
153+
case SqlNodeType.DateTimeOffsetMinusInterval:
154+
case SqlNodeType.DateTimeOffsetPlusInterval:
155+
case SqlNodeType.DateTimeOffsetMinusDateTimeOffset:
151156
return true;
152157
case SqlNodeType.Variant:
153158
var variant = (SqlVariant) node;

0 commit comments

Comments
 (0)