Skip to contents

Delete the local SQL database and/or restez folder.

Usage

db_delete(everything = FALSE)

Arguments

everything

T/F, delete the whole restez folder as well?

Details

Any connected database will be automatically disconnected.

Examples

library(restez)
fp <- tempdir()
restez_path_set(filepath = fp)
#> ... Creating '/tmp/RtmpWQaZTT/restez'
#> ... Creating '/tmp/RtmpWQaZTT/restez/downloads'
demo_db_create(n = 10)
#> duckdb keeps downloaded extensions and secrets in a temporary directory:
#>  /tmp/RtmpWQaZTT/duckdb
#> This is removed when the R session ends.
#>  Extensions are re-downloaded each session.
#>  Secrets are lost.
#>  Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
#>  Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
#>  See ?duckdb_storage for details and alternatives.
db_delete(everything = FALSE)
# Will not run: gb_sequence_get(id = 'demo_1')
# only the SQL database is deleted
db_delete(everything = TRUE)
# Now returns NULL
(restez_path_get())
#> NULL