Skip to content

Commit 3c219ef

Browse files
committed
rebase + SessionImpl -> Session
1 parent 5e52cc1 commit 3c219ef

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/Ydb.Sdk/src/Ado/YdbConnection.cs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,16 @@ public async Task BulkUpsertAsync(
8787
Rows = list.GetProto()
8888
};
8989

90-
if (Session is Services.Query.Session sessionImpl)
90+
var resp = await Session.Driver.UnaryCall(
91+
TableService.BulkUpsertMethod,
92+
req,
93+
new GrpcRequestSettings { CancellationToken = cancellationToken }
94+
).ConfigureAwait(false);
95+
96+
var operation = resp.Operation;
97+
if (operation.Status.IsNotSuccess())
9198
{
92-
var resp = await sessionImpl.Driver.UnaryCall(
93-
TableService.BulkUpsertMethod,
94-
req,
95-
new GrpcRequestSettings { CancellationToken = cancellationToken }
96-
).ConfigureAwait(false);
97-
98-
var operation = resp.Operation;
99-
if (operation.Status.IsNotSuccess())
100-
{
101-
throw YdbException.FromServer(operation.Status, operation.Issues);
102-
}
103-
}
104-
else
105-
{
106-
throw new InvalidOperationException("Underlying session does not support BulkUpsertAsync");
99+
throw YdbException.FromServer(operation.Status, operation.Issues);
107100
}
108101
}
109102

0 commit comments

Comments
 (0)