birschick-bq commented on code in PR #1865:
URL: https://github.com/apache/arrow-adbc/pull/1865#discussion_r1604167911


##########
csharp/src/Apache.Arrow.Adbc/AdbcConnection11.cs:
##########
@@ -0,0 +1,426 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Apache.Arrow.Ipc;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// Provides methods for query execution, managing prepared statements,
+    /// using transactions, and so on.
+    /// </summary>
+    public abstract class AdbcConnection11 : IDisposable
+#if NET5_0_OR_GREATER
+        , IAsyncDisposable
+#endif
+    {
+        ~AdbcConnection11() => Dispose(false);
+
+        /// <summary>
+        /// Attempts to cancel an in-progress operation on a connection.
+        /// </summary>
+        /// <remarks>
+        /// This can be called during a method like GetObjects or while 
consuming an ArrowArrayStream
+        /// returned from such. Calling this function should make the other 
function throw a cancellation exception.
+        ///
+        /// This must always be thread-safe.
+        /// </remarks>
+        public virtual void Cancel()

Review Comment:
   One thought I had was that, in the past, I've had to send a message to the 
server to stop processing and end the session on the server-side. So it might 
be useful to have a `CancelAsync` (and in Statement) if the implementation 
requires a call to the server.



-- 
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