Skip to content

Commit

Permalink
dm_from_con() and copy_dm_to() need dbplyr
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 21, 2023
1 parent f9a729d commit b51438b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/db-interface.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ copy_dm_to <- function(dest, dm, ...,
)
}

check_suggested("dbplyr", use = TRUE)

dest <- src_from_src_or_con(dest)
src_names <- src_tbls_impl(dm)

Expand Down
2 changes: 2 additions & 0 deletions R/dm_from_con.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ dm_from_con <- function(con = NULL, table_names = NULL, learn_keys = NULL,
.names = NULL, ...) {
stopifnot(is(con, "DBIConnection") || inherits(con, "Pool"))

check_suggested("dbplyr", use = TRUE)

if (inherits(con, "Pool")) {
con <- pool_con <- pool::poolCheckout(con)
on.exit(pool::poolReturn(pool_con))
Expand Down

0 comments on commit b51438b

Please sign in to comment.