ptupitsyn commented on a change in pull request #342:
URL: https://github.com/apache/ignite-3/pull/342#discussion_r710396782



##########
File path: modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs
##########
@@ -67,106 +67,377 @@ public Table(string name, Guid id, ClientFailoverSocket 
socket)
         public Guid Id { get; }
 
         /// <inheritdoc/>
-        public async Task<IIgniteTuple?> GetAsync(IIgniteTuple keyRec)
+        public async Task<IIgniteTuple?> GetAsync(IIgniteTuple key)
         {
-            IgniteArgumentCheck.NotNull(keyRec, nameof(keyRec));
+            IgniteArgumentCheck.NotNull(key, nameof(key));
 
             var schema = await GetLatestSchemaAsync().ConfigureAwait(false);
 
             using var writer = new PooledArrayBufferWriter();
-            Write(writer.GetMessageWriter());
+            WriteTuple(writer, schema, key, keyOnly: true);
 
             using var resBuf = await _socket.DoOutInOpAsync(ClientOp.TupleGet, 
writer).ConfigureAwait(false);
-            return Read(resBuf.GetReader());
+            var resSchema = await ReadSchemaAsync(resBuf, 
schema).ConfigureAwait(false);
 
-            void Write(MessagePackWriter w)
+            return ReadValueTuple(resBuf, resSchema, key);
+        }
+
+        /// <inheritdoc/>
+        public async Task<IList<IIgniteTuple>> 
GetAllAsync(IEnumerable<IIgniteTuple> keys)
+        {
+            IgniteArgumentCheck.NotNull(keys, nameof(keys));
+
+            var schema = await GetLatestSchemaAsync().ConfigureAwait(false);
+
+            using var writer = new PooledArrayBufferWriter();
+            var count = WriteTuples(writer, schema, keys, keyOnly: true);
+
+            if (count == 0)

Review comment:
       It is a bit cumbersome because `IEnumerable` does not have `Count`, but 
I've fixed it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to