Skip to content

Commit 723cbaf

Browse files
committed
Merge branch '6.0'
# Conflicts: # Extensions/Xtensive.Orm.BulkOperations.Tests/Other.cs # Orm/Xtensive.Orm.Firebird/Sql.Drivers.Firebird/v2_5/Extractor.cs # Orm/Xtensive.Orm.Firebird/Sql.Drivers.Firebird/v2_5/Translator.cs # Orm/Xtensive.Orm.Oracle/Sql.Drivers.Oracle/v09/Extractor.cs # Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/Connection.cs # Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/v3/Extractor.cs # Orm/Xtensive.Orm.Tests/Issues/IssueJira0570_InOperationDoesNotCreateTemporaryTable.cs # Orm/Xtensive.Orm.Tests/Issues/IssueJira0778_PrefetchStackOverflow.cs # Orm/Xtensive.Orm.Tests/Linq/ComplexTest.cs # Orm/Xtensive.Orm.Tests/Linq/FreeTextTest.cs # Orm/Xtensive.Orm.Tests/Linq/InTest.cs # Orm/Xtensive.Orm.Tests/Linq/SelectTest.cs # Orm/Xtensive.Orm.Tests/Storage/ApplyTest.cs # Orm/Xtensive.Orm.Tests/Storage/AsyncQueries/AsAsyncExtensionTest.cs # Orm/Xtensive.Orm.Tests/Storage/AsyncQueries/PersistWithAsyncQueriesTest.cs # Orm/Xtensive.Orm.Tests/Storage/CompiledQueryTest.cs # Orm/Xtensive.Orm.Tests/Storage/Multinode/TypeIdAllocationTest.cs # Orm/Xtensive.Orm.Tests/Storage/Prefetch/PrefetchTest.cs # Orm/Xtensive.Orm.Tests/Storage/QueryBuilderTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/BuildOnEmptySchemaTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/ColumnTypeTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/DomainUpgradeTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/FullText/DynamicFullTextCatalogTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/NodeBasedExtractedModelBuilderTest.cs # Orm/Xtensive.Orm.Tests/Upgrade/UpgradeContextTest.cs # Orm/Xtensive.Orm/Comparison/ComparerProvider.cs # Orm/Xtensive.Orm/Linq/SerializableExpressions/SerializableConstantExpression.cs # Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs # Orm/Xtensive.Orm/Orm/OperationLog.cs # Orm/Xtensive.Orm/Orm/Providers/Expressions/ExpressionProcessor.Helpers.cs # Orm/Xtensive.Orm/Orm/Providers/Expressions/ExpressionProcessor.cs # Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/TimeSpanCompilers.cs # Orm/Xtensive.Orm/Orm/Providers/SqlCompiler.cs # Orm/Xtensive.Orm/Orm/QueryableExtensions.cs # Orm/Xtensive.Orm/Orm/Session.Persist.cs # Orm/Xtensive.Orm/Orm/TransactionalExtensions.cs # Orm/Xtensive.Orm/Orm/Validation/Constraints/RegexConstraint.cs # Orm/Xtensive.Orm/Orm/Validation/PropertyValidator.cs # Orm/Xtensive.Orm/Orm/WellKnown.cs # Orm/Xtensive.Orm/Sql/Compiler/SqlTranslator.cs # Version.props
2 parents 9341c53 + 3d010c6 commit 723cbaf

File tree

321 files changed

+11858
-10438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+11858
-10438
lines changed

ChangeLog/6.0.6_Z_Final.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[main] Obsolete CompilerContainerAttribute.ExtensionType property is removed
2+
[main] Obsolete BuildingContext.Current and BuildingContext.Demand() are removed
3+
[main] Obsolete DomainConfiguration.DefaultSectionName field is removed
4+
[main] Obsolete IOperationSection.Replay() and its implementations are removed
5+
[main] Obsolete OperationCapturer.Attach(IOperationLogger) is removed
6+
[main] Obsolete ProviderFeatures.SingleSessionAccess and ServerFeatures.SingleSessionAccess are removed
7+
[main] Obsolete DomainUpgradeModeExtensions.RequiresInitializingStage() is removed
8+
[main] Obsolete UpgradeContext.OriginalConfiguration property is removed
9+
[main] Obsolete UpgradeStage.Initializing is removed
10+
[main] Obsolete parameterless constructor of RegexConstraint is removed
11+
[main] Obsolete PropertyValidator.Mode property is removed
12+
[main] Obsolete ConstraintMode type is removed
13+
[main] Obsolete EntityExtensions.IsRemoved() is removed
14+
[main] Obsolete QueryableExtensions.Remove() is removed
15+
[main] Obsolete Transaction.Open() methods are removed
16+
[main] Obsolete TransactionalExtensions.InvokeTransactionally() methods are removed
17+
[main] Obsolete TypeExtensions.GetTypeInfo() methods are removed
18+
[main] Obsolete VersionCapturer.Attach() is removed
19+
[main] Obsolete VersionValidator.Attach() property is removed
20+
[main] Obsolete WellKnown class members are removed
21+
[main] Obsolete ServerFeatures property is removed
22+
[main] Fixed possible cases of broken serialization due to comparers
23+
[main] Fixed rare cases of insert wrong data into some table columns for SingleTable hierarchies
24+
[main] Exception message about unsupported by storage type became more informative
25+
[firebird] Another error code that means unique contraint violation is treated correctly
26+
[firebird] Improved formatting for Float and Double constants within queries
27+
[firebird] Improved work with DateTime query parameters
28+
[firebird] Fixed columns' default value extraction
29+
[mysql] Another error code that means unique contraint violation is treated correctly
30+
[mysql] Fixed DateTime.DayOfWeek translation
31+
[oracle] Changed NULLs ordering settings. Now order is the same as in .NET
32+
[oracle] Improved resolution of TimeSpan literal values on translation
33+
[oracle] Starting from v11 schema names don't have to be in upper-case as storage allowes names in any case
34+
[oracle] Improved translation of Math.Ceiling(), Math.Truncate() and Math.Floor()
35+
[oracle] Fixed byte array fields comparison translation e.g. in Where statements
36+
[oracle] Improved translation of DateTimeOffset's LocalDateTime, ToLocalTime() and ToUniversalTime() members
37+
[postgresql] Improved performance of First(), FirstOrDefault() being subqueries
38+
[postgresql] Improved translation of Math.Ceiling(), Math.Truncate() and Math.Floor() methods
39+
[postgresql] Skip Commit/Rollback operations for already completed transaction to prevent exception overlaping
40+
[sqlite] Fixed some foreign key extraction issues
41+
[sqlite] Improved work with DateTime query parameters
42+
[sqlserver] Fixed incorrect DateTimeOffset.Date part extraction
43+
[sqlserver] Improved translation of DateTimeOffset's LocalDateTime and TimeOfDay members
44+
[reprocessing] ExecuteActionStrategy.Execute doesn't get external session though Session.Current at all
45+
[reprocessing] Introduced DomainExtension.WithSession() and IExecuteConfiguration.WithSession() methods to pass external session
Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,35 @@
11
// Copyright (C) 2019-2020 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
4-
5-
using System.Collections.Generic;
64
using NUnit.Framework;
75
using TestCommon.Model;
8-
using Xtensive.Core;
9-
using Xtensive.Orm;
106
using Xtensive.Orm.Configuration;
7+
using Xtensive.Orm.Tests;
118

129
namespace TestCommon
1310
{
1411
[TestFixture]
15-
public abstract class CommonModelTest
12+
public abstract class CommonModelTest : AutoBuildTest
1613
{
17-
private List<Session> notDisposed;
18-
19-
protected Domain Domain { get; private set; }
14+
private bool justBuilt = true;
2015

2116
[SetUp]
2217
public virtual void SetUp()
2318
{
24-
CheckRequirements();
25-
var config = BuildConfiguration();
26-
Domain = BuildDomain(config);
27-
notDisposed = new List<Session>();
28-
Domain.SessionOpen += (sender, args) => {
29-
notDisposed.Add(args.Session);
30-
args.Session.Events.Disposing += (o, eventArgs) => {
31-
lock (notDisposed) {
32-
notDisposed.Remove(args.Session);
33-
}
34-
};
35-
};
36-
PopulateData();
19+
if (justBuilt) {
20+
justBuilt = false;
21+
}
22+
else {
23+
RebuildDomain();
24+
}
3725
}
3826

39-
[TearDown]
40-
public virtual void TearDown()
41-
{
42-
if (notDisposed!=null)
43-
Assert.That(notDisposed, Is.Empty);
44-
Assert.That(SessionScope.CurrentSession, Is.Null);
45-
Domain.DisposeSafely();
46-
}
4727

48-
protected virtual DomainConfiguration BuildConfiguration()
28+
protected override DomainConfiguration BuildConfiguration()
4929
{
50-
var configuration = DomainConfigurationFactory.Create();
30+
var configuration = base.BuildConfiguration();
5131
configuration.Types.Register(typeof (Bar).Assembly);
5232
return configuration;
5333
}
54-
55-
protected virtual Domain BuildDomain(DomainConfiguration configuration)
56-
{
57-
return Domain.Build(configuration);
58-
}
59-
60-
protected virtual void PopulateData()
61-
{
62-
}
63-
64-
protected virtual void CheckRequirements()
65-
{
66-
}
6734
}
6835
}

Extensions/TestCommon/DomainConfigurationFactory.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

Extensions/TestCommon/HasAccessToConfigurationTest.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

Extensions/TestCommon/TestCommon.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
1212
<PackageReference Include="NUnit" Version="3.12.0" />
13-
<PackageReference Include="NUnit3TestAdapter" Version="3.15.0" />
13+
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
1414
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
1515
</ItemGroup>
1616
<ItemGroup>

Extensions/TestCommon/TestConfiguration.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

Extensions/TestCommon/Tests/TestConfigurationTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
using System;
1+
using System;
22
using NUnit.Framework;
3+
using Xtensive.Orm.Tests;
34

45
namespace TestCommon.Tests
56
{

Extensions/Xtensive.Orm.BulkOperations.Tests/AutoBuildTest.cs renamed to Extensions/Xtensive.Orm.BulkOperations.Tests/BulkOperationBaseTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
using NUnit.Framework;
1+
using NUnit.Framework;
22
using TestCommon;
33
using TestCommon.Model;
44
using Xtensive.Orm.Configuration;
55

66
namespace Xtensive.Orm.BulkOperations.Tests
77
{
88
[TestFixture]
9-
public abstract class AutoBuildTest : CommonModelTest
9+
public abstract class BulkOperationBaseTest : CommonModelTest
1010
{
1111
protected override DomainConfiguration BuildConfiguration()
1212
{
1313
var configuration = base.BuildConfiguration();
14-
configuration.Types.Register(typeof (IUpdatable<>).Assembly);
15-
configuration.Types.Register(typeof (AutoBuildTest).Assembly);
14+
configuration.Types.Register(typeof(IUpdatable<>).Assembly);
15+
configuration.Types.Register(typeof(BulkOperationBaseTest).Assembly);
1616
return configuration;
1717
}
1818
}

Extensions/Xtensive.Orm.BulkOperations.Tests/ContainsTest.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2020 Xtensive LLC.
1+
// Copyright (C) 2020-2021 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
44

@@ -29,7 +29,7 @@ public TagType(Session session, long id)
2929

3030
namespace Xtensive.Orm.BulkOperations.Tests
3131
{
32-
public class ContainsTest : AutoBuildTest
32+
public class ContainsTest : BulkOperationBaseTest
3333
{
3434
private long[] tagIds;
3535

@@ -45,8 +45,10 @@ protected override void PopulateData()
4545
tagIds = Enumerable.Range(0, 100).Select(i => (long) i).ToArray();
4646
using (var session = Domain.OpenSession())
4747
using (var transaction = session.OpenTransaction()) {
48-
foreach (var id in tagIds.Concat(Enumerable.Repeat(1000, 1).Select(i => (long) i)))
49-
new TagType(session, id) { ProjectedValueAdjustment = -1 };
48+
foreach (var id in tagIds.Concat(Enumerable.Repeat(1000, 1).Select(i => (long) i))) {
49+
_ = new TagType(session, id) { ProjectedValueAdjustment = -1 };
50+
}
51+
5052
transaction.Complete();
5153
}
5254
}
@@ -86,7 +88,7 @@ public void Test3()
8688
{
8789
using (var session = Domain.OpenSession())
8890
using (var tx = session.OpenTransaction()) {
89-
Assert.Throws<NotSupportedException>(() => session.Query.All<TagType>()
91+
_ = Assert.Throws<NotSupportedException>(() => session.Query.All<TagType>()
9092
.Where(t => t.Id.In(IncludeAlgorithm.TemporaryTable, tagIds))
9193
.Set(t => t.ProjectedValueAdjustment, 2)
9294
.Update());

Extensions/Xtensive.Orm.BulkOperations.Tests/Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static class Extensions
88
{
99
public static void AssertCommandCount(this Session session, IResolveConstraint expression, Action action)
1010
{
11-
int count = 0;
11+
var count = 0;
1212
session.Events.DbCommandExecuting += (sender, args) => count++;
1313
action();
1414
Assert.That(count, expression);

0 commit comments

Comments
 (0)