lidavidm commented on code in PR #107:
URL: https://github.com/apache/arrow-adbc/pull/107#discussion_r963861142


##########
glib/adbc-glib/connection.c:
##########
@@ -0,0 +1,141 @@
+/*
+ * 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.
+ */
+
+/* This is needless. This is just for cpplint. */
+#include <adbc-glib/connection.h>
+
+#include <adbc-glib/connection-raw.h>
+#include <adbc-glib/database-raw.h>
+#include <adbc-glib/error-raw.h>
+
+/**
+ * SECTION: connection
+ * @title: GADBCConnection
+ * @include: adbc-glib/adbc-glib.h
+ *
+ * #GADBCConnection is a class for connection.
+ */
+
+typedef struct {
+  struct AdbcConnection adbc_connection;
+  GADBCDatabase* database;
+} GADBCConnectionPrivate;
+
+#define gadbc_connection_init gadbc_connection_init_
+G_DEFINE_TYPE_WITH_PRIVATE(GADBCConnection, gadbc_connection, G_TYPE_OBJECT)
+#undef gadbc_connection_init
+
+static void gadbc_connection_dispose(GObject* object) {
+  GADBCConnectionPrivate* priv =
+      gadbc_connection_get_instance_private(GADBC_CONNECTION(object));
+  if (priv->database) {
+    g_object_unref(priv->database);
+    priv->database = NULL;
+  }
+  G_OBJECT_CLASS(gadbc_connection_parent_class)->dispose(object);
+}
+
+static void gadbc_connection_finalize(GObject* object) {
+  struct AdbcConnection* adbc_connection =
+      gadbc_connection_get_raw(GADBC_CONNECTION(object));
+  AdbcConnectionRelease(adbc_connection, NULL);

Review Comment:
   New/Release do also return errors, though (usually) this shouldn't be an 
issue, but it might be worth warning if they do fail for some reason (if that's 
possible somehow)



##########
glib/README.md:
##########
@@ -0,0 +1,39 @@
+<!---
+  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.
+-->
+
+# ADBC GLib
+
+ADBC GLib is a wrapper library for ADBC driver manager. ADBC GLib
+provides GLib API.
+
+## How to install
+
+```console
+$ meson setup --buildtype=release glib.build glib
+$ meson compile -C glib.build
+$ sudo meson install -C glib.build
+```
+
+## How test test

Review Comment:
   nit
   
   ```suggestion
   ## How to test
   ```



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