You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/02/02 20:40:05 UTC

[GitHub] [arrow-adbc] paleolimbot commented on a diff in pull request #365: feat(r): Add R Driver Manager

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


##########
r/adbcdrivermanager/R/adbc.R:
##########
@@ -0,0 +1,440 @@
+# 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.
+
+#' Databases
+#'
+#' @param driver An [adbc_driver()].
+#' @param database An [adbc_database][adbc_database_init].
+#' @param ... Driver-specific options. For the default method, these are
+#'   named values that are converted to strings.
+#' @param options A named `character()` or `list()` whose values are converted
+#'   to strings.
+#' @param subclass An extended class for an object so that drivers can specify
+#'   finer-grained control over behaviour at the R level.
+#'
+#' @return An object of class adbc_database
+#' @export
+#'
+#' @examples
+#' adbc_database_init(adbc_driver_void())
+#'
+adbc_database_init <- function(driver, ...) {

Review Comment:
   The idea was that each `driver` will have different options for the database constructor (and might want to set the class of the database so that it's vaguely apparent where it came from). You can see it in action here: https://github.com/paleolimbot/adbcsqlite3/blob/master/R/adbcsqlite3-package.R#L13-L64 ...it makes the constructors a little easier to document.



-- 
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-unsubscribe@arrow.apache.org

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