Skip to content

Commit

Permalink
doc: fix example in get_connection()
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Munch Grünewald authored and marcusmunch committed Sep 4, 2023
1 parent dcca91e commit 383023a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions R/connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
#' Additional parameters sent to DBI::dbConnect()
#' @return
#' An object that inherits from DBIConnection driver specified in drv
#' @examples
#' \dontrun{
#' @examplesIf requireNamespace("RSQLite", quietly = TRUE)
#' conn <- get_connection(drv = RSQLite::SQLite(), dbname = ":memory:")
#'
#' DBI::dbIsValid(conn) # TRUE
#'
#' close_connection(conn)
#' }
#'
#' DBI::dbIsValid(conn) # FALSE
#' @seealso [RPostgres::Postgres]
#' @export
get_connection <- function(drv = RPostgres::Postgres(),
Expand Down
9 changes: 7 additions & 2 deletions man/get_connection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 383023a

Please sign in to comment.