Skip to content

Commit 3f5b130

Browse files
committed
Merge branch '7.1'
# Conflicts: # Extensions/TestCommon/TestCommon.csproj # Extensions/Xtensive.Orm.Reprocessing/Xtensive.Orm.Reprocessing.csproj # Extensions/Xtensive.Orm.Tracking/Xtensive.Orm.Tracking.csproj # Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs # Orm/Xtensive.Orm/Orm/Linq/QueryHelper.cs # Orm/Xtensive.Orm/Orm/Linq/Translator.Expressions.cs # Orm/Xtensive.Orm/Orm/Providers/CommandProcessing/CommandFactory.cs # Orm/Xtensive.Orm/Orm/Providers/CommandProcessing/SqlPersistTask.cs # Orm/Xtensive.Orm/Orm/Providers/Requests/ParameterBinding.cs # Orm/Xtensive.Orm/Orm/Providers/TemporaryTables/TemporaryTableManager.cs # Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/AggregateProvider.cs # Orm/Xtensive.Orm/Orm/Rse/Providers/CompilableProviderVisitor.cs # Orm/Xtensive.Orm/Orm/Rse/Transformation/Internals/ApplyProviderCorrectorRewriter.cs # Orm/Xtensive.Orm/Sql/Ddl/Actions/SqlDropColumn.cs # Orm/Xtensive.Orm/Sql/Ddl/Actions/SqlDropConstraint.cs # Orm/Xtensive.Orm/Sql/Ddl/Actions/SqlRenameColumn.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlAlterDomain.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlAlterSequence.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlAlterTable.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateAssertion.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateCharcterSet.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateCollation.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateDomain.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreatePartitionFunction.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreatePartitionScheme.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateSchema.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateSequence.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateTable.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateTranslation.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlCreateView.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropAssertion.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropCharacterSet.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropCollation.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropIndex.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropPartitionFunction.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropPartitionScheme.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropSchema.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropSequence.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropTable.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropTranslation.cs # Orm/Xtensive.Orm/Sql/Ddl/SqlDropView.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlBetween.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlCast.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlCollate.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlColumnStub.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlMatch.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlSubQuery.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlTableColumn.cs # Orm/Xtensive.Orm/Sql/Dml/Expressions/SqlUserColumn.cs # Orm/Xtensive.Orm/Sql/Dml/Hints/SqlForceJoinOrderHint.cs # Orm/Xtensive.Orm/Sql/Dml/SqlJoinExpression.cs # Orm/Xtensive.Orm/Sql/Dml/SqlOrder.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlAssignment.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlDeclareVariable.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlDelete.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlInsert.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlQueryExpression.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlSelect.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlUpdate.cs # Orm/Xtensive.Orm/Sql/Dml/Statements/SqlWhile.cs # Orm/Xtensive.Orm/Tuples/Packed/TupleLayout.cs # Version.props # Weaver/Xtensive.Orm.Weaver/Xtensive.Orm.Weaver.csproj
2 parents b866e36 + bafc803 commit 3f5b130

334 files changed

Lines changed: 21398 additions & 2690 deletions

File tree

Some content is hidden

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

ChangeLog/6.0.13_Z_Final.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[main] Fixed certain cases of bad translation of casts via 'as' operator in LINQ queries
2+
[main] Addressed certain issues of translation connected with comparison with local entity instace within LINQ queries
3+
[main] Fixed rare issues of incorrect translation of filtered index expressions including conditional expressions
4+
[main] Join/LeftJoin is denied to have the same expression instance for both inner/outer selector
5+
[main] Addressed issue when wrong type of join was chosen when .First/FirstOrDefalult() method was used as subquery
6+
[main] Added dedicated exception when RenameFieldHint.TargetType exists in current model but absent in storage model
7+
[main] Xtensive.Sql.Model.NodeCollection<T>.Add() throws understandable exception in case of duplicate name of item
8+
[postgresql] Fixed issue of incorrect translation of contitional expressions including comparison with nullable fields

ChangeLog/7.0.5_Z_Final.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[main] Some constructors of SqlPersistTask marked Obsolete, new constructors provided
2+
[main] Some constructors of CalculateProvider marked Obsolete, new constructors provided
3+
[main] Some constructors of AggregateProvider marked Obsolete, new constructors provided
4+
[main] Updated BitFaster.Caching package
5+
[main] Certain optimizations connected to query translation made

ChangeLog/7.1.2_Z_Final.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[main] Addressed issue when cycles in Entity dependency graph were not detected
2+
[main] Intoduced DomainConfuguration.ExtensionConfigurations as unified configuration storage for extensions' configurations
3+
[main] DomainConfiguration.Load() method now has overloads which gets abstractions from Microsoft.Extensions.Configuration API
4+
[localization] LocalizationConfiguration.Load() method now has overloads which gets abstractions from Microsoft.Extensions.Configuration API
5+
[localization] ConfigureLocalizationExtension() extensions for DomainConfiguration are added, check ReadMe/documentation for examples of usage
6+
[reprocessing] ReprocessingConfiguration.Load() method now has overloads which gets abstractions from Microsoft.Extensions.Configuration API
7+
[reprocessing] ConfigureReprocessingExtension() extensions for DomainConfiguration are added, check ReadMe/documentation for examples of usage
8+
[security] SecurityConfiguration.Load() method now has overloads which gets abstractions from Microsoft.Extensions.Configuration API
9+
[security] ConfigureSecurityExtension() extensions for DomainConfiguration are added, check ReadMe/documentation for examples of usage

ChangeLog/7.1.2_dev.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<ProjectAssetsFile>$(MSBuildProjectExtensionsPath)project.assets.json</ProjectAssetsFile>
101101
<ProjectAssetsCacheFile>$(MSBuildProjectExtensionsPath)$(TargetFramework)\$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
102102
<OrmKeyFile>$(SolutionDir)Orm\Orm.snk</OrmKeyFile>
103+
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
103104
</PropertyGroup>
104105

105106
<!-- Populate standard properties. -->
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using Microsoft.Extensions.Configuration;
8+
using NUnit.Framework;
9+
10+
namespace TestCommon
11+
{
12+
public abstract class MicrosoftConfigurationTestBase
13+
{
14+
protected enum ConfigTypes
15+
{
16+
Json,
17+
Xml,
18+
}
19+
20+
protected IConfigurationRoot configurationRoot;
21+
22+
protected abstract ConfigTypes ConfigFormat { get; }
23+
24+
protected abstract void AddConfigurationFile(IConfigurationBuilder configurationBuilder);
25+
26+
[OneTimeSetUp]
27+
public virtual void BeforeAllTestsSetUp()
28+
{
29+
var configurationBuilder = new ConfigurationBuilder();
30+
configurationBuilder.SetBasePath(Directory.GetCurrentDirectory());
31+
AddConfigurationFile(configurationBuilder);
32+
configurationRoot = (ConfigurationRoot) configurationBuilder.Build();
33+
}
34+
35+
protected void IgnoreIfXml()
36+
{
37+
if (ConfigFormat == ConfigTypes.Xml)
38+
throw new IgnoreException("Not valid for Xml format");
39+
}
40+
protected void IgnoreIfJson()
41+
{
42+
if (ConfigFormat == ConfigTypes.Json)
43+
throw new IgnoreException("Not valid for JSON format");
44+
}
45+
46+
protected IConfigurationSection GetAndCheckConfigurationSection(string sectionName)
47+
{
48+
var section = configurationRoot.GetSection(sectionName);
49+
Assert.That(section, Is.Not.Null);
50+
return section;
51+
}
52+
}
53+
}

Extensions/TestCommon/TestCommon.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1919
<PackageReference Include="NUnit" Version="3.13.2" />
2020
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
21+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
22+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
23+
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="6.0.0" />
2124
</ItemGroup>
2225
<ItemGroup>
2326
<ProjectReference Include="..\..\Orm\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Xtensive.Orm.BulkOperations
2+
===========================
3+
4+
Summary
5+
-------
6+
The extension provides a set of IQueryable extension methods that are translated
7+
to server-side UPDATE or DELETE commands.
8+
9+
Prerequisites
10+
-------------
11+
DataObjects.Net 7.1.x (http://dataobjects.net)
12+
13+
14+
Examples of usage
15+
-----------------
16+
17+
**Example #1**. Update primitive property with a constant value:
18+
19+
```csharp
20+
session.Query.All<Bar>()
21+
.Where(a => a.Id == 1)
22+
.Set(a => a.Count, 2)
23+
Update();
24+
```
25+
26+
**Example #2** Updating persistent property with expression, computed on server:
27+
28+
```csharp
29+
session.Query.All<Bar>()
30+
.Where(a => a.Id==1)
31+
.Set(a => a.Count, a => a.Description.Length)
32+
.Update();
33+
```
34+
35+
**Example #3**. Setting a reference to an entity that is already loaded into current Session
36+
37+
```csharp
38+
// Emulating entity loading
39+
var bar = session.Query.Single<Bar>(1);
40+
41+
session.Query.All<Foo>()
42+
.Where(a => a.Id == 2)
43+
.Set(a => a.Bar, bar)
44+
.Update();
45+
```
46+
47+
**Example #4**. Setting a reference to an entity that is not loaded into Session, 1st way
48+
49+
```csharp
50+
session.Query.All<Foo>()
51+
.Where(a => a.Id == 1)
52+
.Set(a => a.Bar, a => Query.Single<Bar>(1))
53+
.Update();
54+
```
55+
56+
**Example #5**. Setting a reference to an entity that is not loaded into Session, 2nd way
57+
58+
```csharp
59+
session.Query.All<Foo>()
60+
.Where(a => a.Id == 1)
61+
.Set(a => a.Bar, a => Query.All<Bar>().Single(b => b.Name == "test"))
62+
.Update();
63+
```
64+
65+
**Example #6**. Constructing update expressions of the fly
66+
67+
```csharp
68+
bool condition = CheckCondition();
69+
var query = session.Query.All()<Bar>
70+
.Where(a => a.Id == 1)
71+
.Set(a => a.Count, 2);
72+
73+
if(condition)
74+
query = query.Set(a => a.Name, a => a.Name + "test");
75+
query.Update();
76+
```
77+
78+
**Example #7**. Updating lots of properties at once
79+
80+
```csharp
81+
session.Query.All<Bar>()
82+
.Where(a => a.Id == 1)
83+
Update(
84+
a => new Bar(null) { Count = 2, Name = a.Name + "test", /*dozens of other properties...*/ });
85+
```
86+
87+
**Example #8**. Deleting entities
88+
89+
```csharp
90+
session.Query.All<Foo>()
91+
.Where(a => a.Id == 1)
92+
.Delete();
93+
```

Extensions/Xtensive.Orm.BulkOperations/Readme.txt

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

Extensions/Xtensive.Orm.BulkOperations/Xtensive.Orm.BulkOperations.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
<AssemblyOriginatorKeyFile>$(ExtensionsKeyFile)</AssemblyOriginatorKeyFile>
1414
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1515
</PropertyGroup>
16-
<ItemGroup>
17-
<None Include="Readme.txt" />
16+
<PropertyGroup Label="Nuget ReadMe" Condition="$(GeneratePackageOnBuild) == 'true'">
17+
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
18+
</PropertyGroup>
19+
<ItemGroup Label="Nuget content">
20+
<Content Include="$(ProjectDir)NuGetContent\**">
21+
<PackagePath>.</PackagePath>
22+
</Content>
1823
</ItemGroup>
1924
<ItemGroup>
2025
<ProjectReference Include="..\..\Orm\Xtensive.Orm\Xtensive.Orm.csproj" />

0 commit comments

Comments
 (0)