Work around connection v.s. handle issues https://github.com/tidyverse/dplyr/issues/2849

replyr_has_table(con, name)

Arguments

con

connection

name

character name to check for

Value

TRUE if table present

Examples

if (requireNamespace("RSQLite", quietly = TRUE)) { my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") RSQLite::initExtension(my_db) d <- replyr_copy_to(my_db, data.frame(x=c(1,2)), 'd') print(d) print(replyr_has_table(my_db, 'd')) DBI::dbDisconnect(my_db) }
#> # Source: table<d> [?? x 1] #> # Database: sqlite 3.30.1 [:memory:] #> x #> <dbl> #> 1 1 #> 2 2 #> [1] TRUE