Skip to content

Commit 721500e

Browse files
authored
Merge branch 'master' into upstream/FixColumnInfoCollectionLeak
2 parents 9ad7ce3 + 2eb8ee4 commit 721500e

364 files changed

Lines changed: 11950 additions & 4873 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-RC-dev.txt

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

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
1313
</ItemGroup>
1414
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
15-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
15+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
1616
</ItemGroup>
1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />

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)