Skip to content

Commit 141694f

Browse files
committed
Fix merge problems
1 parent 551b647 commit 141694f

File tree

6 files changed

+6
-24
lines changed

6 files changed

+6
-24
lines changed

Extensions/Xtensive.Orm.BulkOperations/Internals/SetOperation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ private void AddComputedStaticExpression(AddValueContext addContext)
134134

135135
var request = parent.GetRequest(parent.QueryProvider.CreateQuery<T>(selectExpression));
136136
var sqlSelect = request.Query;
137-
SqlExpression ex = sqlSelect.OrderBy[0].Expression;
138-
if (ex is SqlCast sqlCast) {
139-
ex = sqlCast.Operand;
137+
SqlExpression exp = sqlSelect.OrderBy[0].Expression;
138+
if (exp is SqlCast sqlCast) {
139+
exp = sqlCast.Operand;
140140
}
141141
if (exp is not SqlPlaceholder placeholder) {
142142
parent.Bindings.AddRange(request.ParameterBindings);

Orm/Xtensive.Orm.MySql/Sql.Drivers.MySql/v5_6/ServerInfoProvider.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public override DataTypeCollection GetDataTypesInfo()
2020
DataTypeFeatures.Grouping | DataTypeFeatures.Ordering | DataTypeFeatures.Multiple;
2121

2222
var index = DataTypeFeatures.Indexing | DataTypeFeatures.KeyConstraint;
23-
24-
#if NET6_0_OR_GREATER
2523
types.DateTime = DataTypeInfo.Range(SqlType.DateTime, common | index,
2624
new ValueRange<DateTime>(new DateTime(1000, 1, 1), new DateTime(9999, 12, 31)),
2725
"datetime(6)");
@@ -31,11 +29,7 @@ public override DataTypeCollection GetDataTypesInfo()
3129
"date");
3230

3331
types.TimeOnly = DataTypeInfo.Range(SqlType.Time, common | index, ValueRange.TimeOnly, "time(6)");
34-
#else
35-
types.DateTime = DataTypeInfo.Range(SqlType.DateTime, common | index,
36-
new ValueRange<DateTime>(new DateTime(1000, 1, 1), new DateTime(9999, 12, 31)),
37-
"datetime(6)", "time(6)");
38-
#endif
32+
3933
return types;
4034
}
4135

Orm/Xtensive.Orm.Tests.Sql/DateTimeIntervalTest.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public abstract class DateTimeIntervalTest : SqlTest
2121
StorageProviderInfo.Instance.CheckProviderIs(StorageProvider.Firebird)
2222
? new DateTime(2000, 12, 11, 10, 9, 8)
2323
: new DateTime(2000, 12, 11, 10, 9, 8, 765);
24-
#if NET6_0_OR_GREATER
2524

2625
protected static readonly DateOnly DefaultDateOnly = new DateOnly(2001, 2, 3);
2726
protected static readonly DateOnly SecondDateOnly = new DateOnly(2000, 12, 11);
@@ -378,7 +377,6 @@ private SqlExpression PrepareDateTimeLiteral(DateTime value)
378377
}
379378
return SqlDml.Literal(value);
380379
}
381-
#if NET6_0_OR_GREATER
382380

383381
private SqlExpression PrepareDateLiteral(DateOnly value)
384382
{
@@ -395,6 +393,5 @@ private SqlExpression PrepareTimeLiteral(TimeOnly value)
395393
}
396394
return SqlDml.Literal(value);
397395
}
398-
#endif
399396
}
400397
}

Orm/Xtensive.Orm.Tests/Linq/DateTimeAndDateTimeOffset/DateTime/OperationsTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public void AddMonthsTest()
8080
RunWrongTest<SingleDateTimeEntity>(s, c => c.DateTime.AddMonths(1) == FirstDateTime.AddMonths(2));
8181
RunWrongTest<SingleDateTimeEntity>(s, c => c.MillisecondDateTime.AddMonths(-1) == FirstMillisecondDateTime.AddMonths(-2));
8282
RunWrongTest<SingleDateTimeEntity>(s, c => c.NullableDateTime.Value.AddMonths(33) == NullableDateTime.AddMonths(44));
83+
});
84+
}
8385

8486
[Test]
8587
public void MinMaxValueAddMonthsTest()

Orm/Xtensive.Orm.Tests/Model/HierarchyRootValidationTest.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ public void InvalidNonPersistentKeyTypesForDefaultGeneratorTest()
264264
Assert.That(ex.Message.Contains(UnableToCreateKeyForMsg));
265265
}
266266

267-
#if NET6_0_OR_GREATER
268267
configuration = CreateDomainConfiguration(new[] { typeof(Models.NonPersistentStorageSupporedTypesAsKeys.TimeOnlyKeyEntity) });
269268
Assert.DoesNotThrow(() => domain = Domain.Build(configuration));
270269
Assert.That(domain, Is.Not.Null);
@@ -300,7 +299,6 @@ public void InvalidNonPersistentKeyTypesForDefaultGeneratorTest()
300299
});
301300
Assert.That(ex.Message.Contains(UnableToCreateKeyForMsg));
302301
}
303-
#endif
304302

305303
configuration = CreateDomainConfiguration(new[] { typeof(Models.NonPersistentStorageSupporedTypesAsKeys.DateTimeKeyEntity) });
306304
Assert.DoesNotThrow(() => domain = Domain.Build(configuration));
@@ -1627,8 +1625,6 @@ public TimeSpanKeyEntity(Session session)
16271625
}
16281626
}
16291627

1630-
#if NET6_0_OR_GREATER
1631-
16321628
[HierarchyRoot]
16331629
public class TimeOnlyKeyEntity : Entity
16341630
{
@@ -1661,8 +1657,6 @@ public DateOnlyKeyEntity(Session session)
16611657
}
16621658
}
16631659

1664-
#endif
1665-
16661660
[HierarchyRoot]
16671661
public class DateTimeKeyEntity : Entity
16681662
{

Orm/Xtensive.Orm/Core/Internals/ValueStringBuilder.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,7 @@ public void Append(string? s)
149149
if (origPos > chars.Length - s.Length) {
150150
Grow(s.Length);
151151
}
152-
153-
#if NET6_0_OR_GREATER
154152
s.CopyTo(chars.Slice(origPos));
155-
#else
156-
s.AsSpan().CopyTo(chars.Slice(origPos));
157-
#endif
158153
position += s.Length;
159154
}
160155
}

0 commit comments

Comments
 (0)