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


##########
csharp/src/Apache.Arrow.Adbc/AdbcDatabase11.cs:
##########
@@ -0,0 +1,85 @@
+/*
+ * 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.Tasks;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// Clients first initialize a database, then create a connection.
+    /// This gives the implementation a place to initialize and own any
+    /// common connection state.
+    /// For example, in-memory databases can place ownership of the actual
+    /// database in this object.
+    /// </summary>
+    public abstract class AdbcDatabase11 : IDisposable

Review Comment:
   This class _must_ inherit from `AdbcDatabase` - if we want it to be returned 
from `AdbcDriver11`.
   
   Do you think it would be helpful to have interface definitions for the 
different ADBC versions?
   



##########
csharp/src/Apache.Arrow.Adbc/AdbcDriver11.cs:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// This provides a common interface for vendor-specific driver
+    /// initialization routines.
+    /// </summary>
+    public abstract class AdbcDriver11 : IDisposable

Review Comment:
   This class _should_ inherit from `AdbcDriver`. Though, if we ever have a 
Driver Manager, it _will_ have to inherit from `AdbcDriver`.



##########
csharp/src/Apache.Arrow.Adbc/AdbcConnection11.cs:
##########
@@ -0,0 +1,395 @@
+/*
+ * 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

Review Comment:
   This class _must_ inherit from `AdbcConnection` if we want it to be returned 
from `AdbcDatabase11`.



##########
csharp/src/Apache.Arrow.Adbc/AdbcDriver11.cs:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// This provides a common interface for vendor-specific driver
+    /// initialization routines.
+    /// </summary>
+    public abstract class AdbcDriver11 : IDisposable

Review Comment:
   @davidhcoe - I don't think we need IAsyncDisposable because there are no 
async methods in the class.



##########
csharp/src/Apache.Arrow.Adbc/AdbcDriver11.cs:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// This provides a common interface for vendor-specific driver
+    /// initialization routines.
+    /// </summary>
+    public abstract class AdbcDriver11 : IDisposable
+    {
+        ~AdbcDriver11() => Dispose(false);
+
+        /// <summary>
+        /// Returns the version of the ADBC spec supported by this driver.
+        /// </summary>
+        public virtual int Version => AdbcVersion.Version_1_0_0;

Review Comment:
   Should we default to the 1.1.0 version? Or let the implementor override this 
value?
   ```suggestion
           public virtual int Version => AdbcVersion.Version_1_0_0;
   ```
   ```suggestion
           public virtual int Version => AdbcVersion.Version_1_1_0;
   ```



##########
csharp/src/Apache.Arrow.Adbc/AdbcStatement11.cs:
##########
@@ -0,0 +1,261 @@
+/*
+ * 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.Threading;
+using System.Threading.Tasks;
+using Apache.Arrow.Ipc;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// Statements may represent queries or prepared statements. Statements
+    /// may be used multiple times and can be reconfigured (e.g. they can
+    /// be reused to execute multiple different queries).
+    /// </summary>
+    public abstract class AdbcStatement11 : IDisposable

Review Comment:
   This class _must_ inherit from `AdbcStatement` if we want it to be returned 
from `AdbcConnection11`.



##########
csharp/src/Apache.Arrow.Adbc/AdbcDriver11.cs:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+namespace Apache.Arrow.Adbc
+{
+    /// <summary>
+    /// This provides a common interface for vendor-specific driver
+    /// initialization routines.
+    /// </summary>
+    public abstract class AdbcDriver11 : IDisposable
+    {
+        ~AdbcDriver11() => Dispose(false);
+
+        /// <summary>
+        /// Returns the version of the ADBC spec supported by this driver.
+        /// </summary>
+        public virtual int Version => AdbcVersion.Version_1_0_0;

Review Comment:
   Should this property be available in all classes? Or just use .NET type 
management?
   I see `AdbcDriver.DriverVersion` is the functional equivalent of this 
property. If we inherit from `AdbcDriver`, I guess we should stick to 
`DriverVersion`. Personally, I'd prefer this property be named `AdbcVersion` to 
disambiguate between driver, dbms, etc? Especially since it's an `int`. 



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