We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9432ab commit b903438Copy full SHA for b903438
src/Ydb.Sdk/src/Ado/YdbConnection.cs
@@ -41,8 +41,18 @@ internal ISession Session
41
42
internal bool EnableImplicitSession => ConnectionStringBuilder.EnableImplicitSession;
43
44
- internal ISession GetExecutionSession(bool useImplicit) =>
45
- useImplicit ? new ImplicitSession(Session.Driver) : Session;
+ internal ISession GetExecutionSession(bool useImplicit)
+ {
46
+ if (!useImplicit)
47
+ return Session;
48
+
49
+ if (_implicitSource == null)
50
+ _implicitSource = new ImplicitSessionSource(Session.Driver);
51
52
+ return new ImplicitSession(Session.Driver, _implicitSource);
53
+ }
54
55
+ private ImplicitSessionSource? _implicitSource;
56
57
internal void AdoptSession(ISession session) => _session = session;
58
0 commit comments