Skip to content

Commit 04ce01d

Browse files
authored
Merge branch 'master' into upstream/RefactorProviderVisitor
2 parents 2433b55 + 5fb1d6a commit 04ce01d

482 files changed

Lines changed: 17541 additions & 7052 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.11_Z_Final.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main] Added an option to remove cached queries of removing storage node along with the node, default behavior remains the same
2+
[postgresql] Dedicated exception when the extracting schema doesn't exist or it belongs to another user
3+
[weaver] Fixed constructor processing with try...catch, catch section now has correct leave

ChangeLog/7.1.0-Beta-2-dev.txt

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

ChangeLog/7.1.0-Beta-2.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[main] NET6 support
2+
[main] Obsolete CatalogHelper class has been removed
3+
[main] Obsolete ReacreateTableHint has been removed
4+
[main] Obsolete Session.SelectStorageNode() method is removed
5+
[main] Obsolete methods from ArrayExtensions, EnumerableExtensions and QueryableExtensions have been removed
6+
[main] Obsolete DeleteDataHint.PostCopy property has been removed
7+
[main] Obsolete QueryEndpoint's members have been removed
8+
[main] Obsolete Query's members have been removed
9+
[main] Obsolete members of DelayedScalarQuery<T> have been removed
10+
[main] Obsolete FieldInfo.IsDynalicallyDefined property's been removed (FieldInfo.IsDynamicallyDefined is still there)
11+
[main] Changed translation of queries when DomainConfiguration.ShareStorageSchemaOverNodes set to true
12+
[main] StorageDriver.Compile(ISqlCompileUnit, NodeConfiguration) became obsolete
13+
[main] SqlNodeActualizer became obsolete
14+
[main] LockableExtensions.EnsureNotLocked() became obsolete, implementation moved to LockableBase directly
15+
[main] TypeInfoCollection.FindAncestor method became obsolete, use new TypeInfo.Ancestor property
16+
[main] TypeInfoCollection.FindDescendants methods became obsolete, use new TypeInfo.DirectDescendants/.AllDescendants properties
17+
[main] TypeInfoCollection.FindInterfaces methods became obsolete, use new TypeInfo.DirectInterfaces/.AllInterfaces properties
18+
[main] TypeInfoCollection.FindImplementors methods became obsolete, use new TypeInfo.DirectImplementors/.AllImplementors properties
19+
[main] TypeInfoCollection.FindRoot method became obsolete, use introduced TypeInfo.Root property
20+
[main] TypeInfo.GetImplementors(bool) became obsolete, use new TypeInfo.DirectImplementors/.AllImplementors properties
21+
[main] TypeInfo.GetInterfaces(bool) became obsolete, use new TypeInfo.DirectInterfaces/.AllInterfaces properties
22+
[main] TypeInfo.GetDescendants(bool) became obsolete, use new TypeInfo.DirectDescendants/.AllDescendants properties
23+
[main] TypeInfo.GetAncestors() became obsolete, use new TypeInfo.Ancestors property
24+
[main] TypeInfo.GetRoot() became obsolete, use introduced TypeInfo.Root property
25+
[main] IPropertyValidator.IsImmediate is read-only now
26+
[main] PropertyValidator.IsImmediate property has no setter, only init
27+
[main] PropertyValidator.ValidateOnlyIfModified property has no setter, only init
28+
[main] PropertyValidator.SkipOnTransactionCommit property has no setter, only init
29+
[main] RecordSetHeader.OrderTupleDescriptor became nullable to compensate TupleDescriptor's transition to read-only structure
30+
[main] IndexInfo.FilterByTypes changed result type to IReadOnlyList<TypeInfo>
31+
[main] IndexInfo.SelectColumns changed result type to IReadOnlyList<int>
32+
[main] IndexInfo.ValueColumnsMap changed result type to IReadOnlyList<Pair<int, List<int>>>
33+
[main] SqlCompilerConfiguration's DatabaseMapping and SchemaMapping moved to SqlPostCompilerConfiguration
34+
[main] Some EventArgs inheritors that were sealed classes transformed to read-only structures
35+
[main] DbCommandEventArgs became read-only structure
36+
[main] LogEventInfo became read-only structure
37+
[main] ILockable.Lock() now has default implementation that refers to ILockable.Lock(true)
38+
[main] TupleDescriptor became read-only structure
39+
[main] InterfaceMapping became read-only structure
40+
[main] ColumnIndexMap became read-only structure and properties changed retun type to IReadOnlyList<int>
41+
[main] TopologicalSorter.Sort() methods return IEnumerable<T>, use .SortToList() if results are needed as collection
42+
[main] TypeHelper.OrderByInheritance() returns IEnumerable<T> to avoid copying
43+
[main] TypeHelper.GetInterfaces() became obsolete, GetInterfacesUnordered() and GetInterfacesOrderedByInheritance() introduced
44+
[main] TypeDef.Validators and FieldDef.Validators properties return List<T>
45+
[main] SqlCustomFunctionCall and SqlFunctionCall share one base type
46+
[main] SqlFunctionCall.Arguments property is IReadOnlyList now and parameters can't be changed after instance creation
47+
[main] Xtensive.Sql.Dml.Extensions.IsNullReference() extension method is marked obsolete, use 'is null' operator instead
48+
[main] DirectSessionAccessor.GetChangedEntities() result type changed to improve enumeration
49+
[main] EntityChangeRegistry.GetItems(PersistenceState) changed result type to improve enumeration
50+
[main] EntitySetChangeRegistry.GetItems() changed result type to improve enumeration
51+
[main] IgnoreRule now has only one public constructor - parameterless
52+
[main] IgnoreRule supports indexes
53+
[main] Queries use parameters instead of constant values for type indentifiers within columns list
54+
[main] Added DomainConfiguration.PreferTypeIdsAsQueryParameters to choose between contants and parameters for TypeIds
55+
[main] ShareStorageSchemaOverNodes option now includes shared query cache when TypeIds as paremters are prefered
56+
[main] Introduced TypeInfo.Ancestor property
57+
[main] Introduced TypeInfo.DirectDescendants and.AllDescendants properties
58+
[main] Introduced TypeInfo.DirectInterfaces and.AllInterfaces properties
59+
[main] Introduced TypeInfo.DirectImplementors .AllImplementors properties
60+
[main] BitFaster.Caching package reference is updated to 1.0.7
61+
[main] No error caused by ambiguity due to new IQueryable extension methods of .Net 6
62+
[main] Improved internal logging speed
63+
[main] General performance and memory efficiency improvements
64+
[reprocessing] DomainBuildErrorEventArgs (not sealed) became read-only structure
65+
[reprocessing] ExecuteErrorEventArgs (not sealed) became read-only structure
66+
[tracking] TrackingCompletedEventArgs (sealed) became read-only structure
67+
[tracking] ITrackingItem ChangedValues property changed return type to IReadOnlyList<ChangedValue>
68+
[tracking] ChangedValue became read-only structure
69+
[Web] Removed Obsolete SessionManager and StartupConfigurationExtension

ChangeLog/7.1.0-RC.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[main] Add support for new .NET 6 DateOnly and TimeOnly types
2+
[main] Updated BitFaster.Caching package reference to v2.0.0
3+
[main] Fixed ColumnInfoCollection leakage on building indexes
4+
[sqlserver] Updated Microsoft.Data.SqlClient package references to v5.0.0 and v6.0.1

ChangeLog/7.1.0-Z_Final.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main] Added support for DefaultExpression within Linq queries
2+
[main] Support for TimeOnly ctors (time parts and ticks) in Linq, except for SQLite and MySQL providers
3+
[main] No Session.Activate() in ToTransactional extension, it affects EntitySet<T> enumeration.

ChangeLog/7.2.0-Beta-1-dev.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[main] Unused Xtensive.Collections.PriorityQueue is removed
2+
[main] Xtensive.Orm.Rse.Providers.Provider.Sources has changed return type to IReadOnlyList<T>, as well as ctor parameter
3+
[main] SqlInsert.Values became obsolete and no longer in use. Use ValueRows collection to add value rows
4+
[main] DomainConfiguration.MaxNumberOfConditions is introduced
5+
[main] SqlDml.Truncate() is introduced.
6+
[main] WellKnown.MaxNumberOfConditions became obsolete, use new DomainConfiguration.MaxNumberOfConditions if needed
7+
[main] Temporary tables cleanup now uses TRUNCATE instead of DELETE when possible
8+
[main] Temporary tables population is increased with multi-row inserts - 256 and 16 items per INSERT
9+
[main] PersistParameterBinding has new field RowIndex, use it for multi-row inserts if needed
10+
[main] TemporaryTableDescriptor changed interface to IMultiRecordPersistDescriptor, fully compatible with IPersistDescriptor
11+
[main] SqlNode.Clone() method now returns SqlNode to take advantage of C# covariant returns and reduce casts overhead
12+
[main] Improved exception handling if some appered during asynchronous Session opening
13+
[postgresql] QueryInfo.MaxQueryParameterCount actualized, it is 65535 now
14+
[oracle] QueryInfo.MaxQueryParameterCount actualized, it is 65535 now

Extensions/TestCommon/TestCommon.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
<AssemblyOriginatorKeyFile>$(ExtensionsKeyFile)</AssemblyOriginatorKeyFile>
99
</PropertyGroup>
1010
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
11+
<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
12+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
13+
</ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
15+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
16+
</ItemGroup>
1117
<ItemGroup>
1218
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1319
<PackageReference Include="NUnit" Version="3.13.2" />
1420
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
15-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
1621
</ItemGroup>
1722
<ItemGroup>
1823
<ProjectReference Include="..\..\Orm\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using System.Linq.Expressions;
23
using Xtensive.Linq;
34
using Xtensive.Orm.Model;
@@ -14,9 +15,9 @@ internal class AddValueContext
1415
public LambdaExpression Lambda { get; set; }
1516
public SetStatement Statement { get; set; }
1617

17-
public FieldInfo Field { get; set; }
18+
public FieldInfo Field => Descriptor.Field;
1819

19-
public bool SubqueryExists { get; set; }
20+
public Dictionary<SqlColumn, SqlExpression> Values { get; set; }
2021

2122
public object EvalLambdaBody() =>
2223
Lambda.Body is ConstantExpression ce

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System.Collections.Generic;
2+
using System.Linq;
23
using Xtensive.Sql;
34
using Xtensive.Sql.Ddl;
45
using Xtensive.Sql.Dml;
@@ -247,6 +248,10 @@ public virtual void Visit(SqlDropView node)
247248
{
248249
}
249250

251+
public virtual void Visit(SqlTruncateTable node)
252+
{
253+
}
254+
250255
public virtual void Visit(SqlDynamicFilter node)
251256
{
252257
foreach (SqlExpression expression in node.Expressions)
@@ -314,9 +319,12 @@ public virtual void Visit(SqlInsert node)
314319
{
315320
VisitInternal(node.From);
316321
VisitInternal(node.Into);
317-
foreach (var pair in node.Values) {
318-
VisitInternal(pair.Key);
319-
VisitInternal(pair.Value);
322+
323+
foreach(var row in node.ValueRows) {
324+
foreach(var columnvalue in row.Zip(node.ValueRows.Columns)) {
325+
VisitInternal(columnvalue.Second);
326+
VisitInternal(columnvalue.First);
327+
}
320328
}
321329
}
322330

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Copyright (C) 2019-2020 Xtensive LLC.
1+
// Copyright (C) 2019-2023 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

55
using System;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
88
using System.Linq.Expressions;
9+
using Xtensive.Core;
910
using Xtensive.Linq;
1011

1112
namespace Xtensive.Orm.BulkOperations
@@ -95,6 +96,8 @@ protected virtual Expression Visit(Expression exp)
9596
return VisitConditional((ConditionalExpression) exp);
9697
case ExpressionType.Constant:
9798
return VisitConstant((ConstantExpression) exp);
99+
case ExpressionType.Default:
100+
return VisitDefault((DefaultExpression) exp);
98101
case ExpressionType.Parameter:
99102
return VisitParameter((ParameterExpression) exp);
100103
case ExpressionType.MemberAccess:
@@ -180,6 +183,11 @@ private Expression VisitConstant(ConstantExpression c)
180183
return c;
181184
}
182185

186+
private Expression VisitDefault(DefaultExpression d)
187+
{
188+
return d.ToConstantExpression();
189+
}
190+
183191
private ElementInit VisitElementInitializer(ElementInit initializer)
184192
{
185193
IEnumerable<Expression> arguments = VisitExpressionList(initializer.Arguments);

0 commit comments

Comments
 (0)