defer_db_cleanup | R Documentation |
This function marks a table for deletion once the current function exits.
defer_db_cleanup(db_table)
db_table |
( |
NULL (called for side effects)
conn <- get_connection()
mt <- dplyr::copy_to(conn, mtcars)
id_mt <- id(mt)
defer_db_cleanup(mt)
DBI::dbExistsTable(conn, id_mt) # TRUE
withr::deferred_run()
DBI::dbExistsTable(conn, id_mt) # FALSE
close_connection(conn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.