Writes (or replaces) a table in the shared SQLite cache.
Arguments
- data
A data.frame to cache.
- table_name
Name of the destination table.
- db_path
Optional path to a SQLite file (default backend).
- con
Optional pre-opened DBI connection. When supplied, the table is written through
conanddb_pathis ignored. Use this for non-SQLite backends (PostgreSQL, DuckDB, MariaDB).
Examples
# \donttest{
db <- tempfile(fileext = ".db")
morie_cache_store(
data = data.frame(x = rnorm(50), y = rnorm(50)),
table_name = "demo",
db_path = db
)
file.remove(db)
#> [1] TRUE
# }