paleolimbot commented on code in PR #1214:
URL: https://github.com/apache/arrow-adbc/pull/1214#discussion_r1373205224


##########
r/adbcdrivermanager/src/driver_base.h:
##########
@@ -0,0 +1,564 @@
+// 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.
+
+#include <cstring>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
+#include <adbc.h>
+
+// This file defines a developer-friendly way to create an ADBC driver, 
currently intended
+// for testing the R driver manager. It handles errors, option 
getting/setting, and
+// managing the export of the many C callables that compose an AdbcDriver. In 
general,
+// functions or methods intended to be called from C are prefixed with "C" and 
are private
+// (i.e., the public and protected methods are the only ones that driver 
authors should
+// ever interact with).
+//
+// Example:
+// class MyDatabase: public DatabaseObjectBase {};
+// class MyConnection: public ConnectionObjectBase {};
+// class MyStatement: public StatementObjectbase {};
+// AdbcStatusCode VoidDriverInitFunc(int version, void* raw_driver, AdbcError* 
error) {
+//   return Driver<MyDatabase, MyConnection, MyStatement>::Init(
+//     version, raw_driver, error);
+// }
+
+namespace adbc {
+
+namespace r {
+
+class Error {
+ public:
+  explicit Error(const std::string& message)
+      : message_(message), sql_state_("\0\0\0\0\0") {}
+
+  explicit Error(const char* message) : Error(std::string(message)) {}
+
+  Error(const std::string& message,

Review Comment:
   I think this one doesn't need it because there's two arguments to the 
constructor?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to