Skip to contents

Load a table from the MORIE cache

Usage

morie_cache_load(table_name, db_path = NULL, con = NULL)

Arguments

table_name

Name of the table.

db_path

Optional path to a SQLite file (default backend).

con

Optional pre-opened DBI connection (overrides db_path).

Value

A data.frame, or NULL if the table does not exist.

Examples

# \donttest{
db <- tempfile(fileext = ".db")
morie_cache_store(
  data = data.frame(x = 1:5),
  table_name = "demo",
  db_path = db
)
morie_cache_load(table_name = "demo", db_path = db)
#>   x
#> 1 1
#> 2 2
#> 3 3
#> 4 4
#> 5 5
file.remove(db)
#> [1] TRUE
# }