R/dplyr_methods.R

Defines functions copy_to.connConnection tbl.connConnection

#' @export
tbl.connConnection <- function(src, from, ...) {
  t <- tbl(src@con, from)
  attr(t, "conn_id") <- src@id
  class(t) <- c("tbl_conn", class(t))
  t
}

#' @export
copy_to.connConnection <- function(dest, df,
                                   name = deparse(substitute(df)),
                                   overwrite = FALSE, ...) {
  ct <- copy_to(
    dest = dest@con, df = df,
    name = name, overwrite = overwrite, ...
  )
  connection_update(dest)
  ct
}
edgararuiz/connections documentation built on Oct. 6, 2021, 8:48 a.m.