diff --git a/R/db_con.R b/R/db_con.R index 10765e7..b42e79b 100644 --- a/R/db_con.R +++ b/R/db_con.R @@ -6,8 +6,12 @@ #' } #' #' @export -init_con <- function(){ - db <- file.path(db_path(), db_name()) +init_con <- function(local = NULL){ + if(!is.null(local)){ + db <- file.path(local) + } else ( + db <- file.path(db_path(), db_name()) + ) stopifnot(db |> file.exists()) return(DBI::dbConnect(RSQLite::SQLite(), db)) }