R/auto_copy.R

Defines functions duckplyr_auto_copy auto_copy.duckplyr_df

# Generated by 02-duckplyr_df-methods.R
#' @export
auto_copy.duckplyr_df <- function(x, y, copy = FALSE, ...) {
  return(as_duckplyr_df(as.data.frame(y)))

  # dplyr implementation
  as.data.frame(y)
}

duckplyr_auto_copy <- function(x, y, ...) {
  try_fetch(
    {
      x <- as_duckplyr_df(x)
      y <- as_duckplyr_df(y)
    },
    error = function(e) {
      testthat::skip(conditionMessage(e))
    }
  )
  out <- auto_copy(x, y, ...)
  out
}
duckdblabs/duckplyr documentation built on Nov. 6, 2024, 10 p.m.