Skip to content

Commit 5d843a4

Browse files
committed
Merge branch '7.2' into 7.2-bunch-of-imps
# Conflicts: # ChangeLog/7.2.1-dev.txt # Orm/Xtensive.Orm.Tests/Storage/Prefetch/PrefetchTest.cs
2 parents ab47f07 + 73bee54 commit 5d843a4

File tree

17 files changed

+883
-95
lines changed

17 files changed

+883
-95
lines changed

ChangeLog/7.2.1-dev.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
[main] Added Query.SingleAsync()/SingleOrDefaultAsync and QueryEndpoint.SingleAsync()/SingleOrDefaultAsync methods
2+
[main] Addressed issue of not disposing IAsyncEnumerator which caused query being open
3+
[main] Addressed issue of overwriting exception on attempt to rollback the transaction of Domain upgrade if commit operation failed
14
[main] LeftJoin extension marked as Obsolete to prepare movement to .NET 10, LeftJoinEx provided as substitution
25
[main] IPriorityQueue interface became Obsolete
36
[main] EnumerableUtils.One() marked as Obsolete
4-
[main] Performance and memory usage improvements
7+
[main] Performance and memory usage improvements
8+
[postgresql] Update Npgsql to 9.0.4
9+
[weaver] Updated Mono.Cecil package to v0.11.6, which resolves certain issues of unsynced pdb files
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright (C) 2026 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
4+
5+
using System;
6+
using Xtensive.Core;
7+
8+
namespace Xtensive.Orm.Tests
9+
{
10+
public sealed class QueryExecutionDetector
11+
{
12+
private int dbCommandCounter = 0;
13+
private int queryCounter = 0;
14+
15+
public bool DbCommandsDetected => dbCommandCounter > 0;
16+
public bool QueriesDetected => queryCounter > 0;
17+
18+
public IDisposable Attach(Session session)
19+
{
20+
session.Events.DbCommandExecuted += Events_DbCommandExecuted;
21+
22+
return new Disposable((b) => { session.Events.DbCommandExecuted -= Events_DbCommandExecuted; });
23+
}
24+
25+
public void Reset()
26+
{
27+
dbCommandCounter = 0;
28+
queryCounter = 0;
29+
}
30+
31+
private void Events_DbCommandExecuted(object sender, DbCommandEventArgs e) => dbCommandCounter++;
32+
}
33+
}

0 commit comments

Comments
 (0)