tests/testthat/helper-reexport.R

if (Sys.getenv("NOT_CRAN") != "" && Sys.getenv("CI") == "" && interactive()) {
  # Created with:
  methods::getGenerics(asNamespace("DBI")) %>%
    grep("^db[A-Z]", ., value = TRUE) %>%
    setdiff(c("dbCallProc", "dbListConnections", "dbSetDataMappings", "dbGetException")) %>%
    paste0("#' @exportMethod ", ., "\nNULL\n", collapse = "\n") %>%
    paste0(
      "# Generated by helper-reexport.R, do not edit by hand\n\n",
      .,
      "\n#' @export\nDBI::Id\n"
    ) %>%
    cat(file = "../../R/export.R")
}
rstats-db/RSQLite documentation built on April 20, 2024, 11:56 a.m.