feat: работа с несколькими схемами в пределах одного приложения

This commit is contained in:
2026-04-13 12:43:47 +03:00
parent dbfe27bbb8
commit 1b7220e647
6 changed files with 177 additions and 116 deletions

View File

@@ -2,9 +2,9 @@
#' @export
#' @description Function to open connection to db, disigned to easy dubugging.
#' @param where text mark to distingiush calss
make_db_connection = function(where = "") {
make_db_connection = function(scheme, where = "") {
if (getOption("APP.DEBUG", FALSE)) message("=== DB CONNECT ", where)
DBI::dbConnect(RSQLite::SQLite(), getOption("APP.FILE_DB", FALSE))
DBI::dbConnect(RSQLite::SQLite(), fs::path("db", scheme, ext = "sqlite"))
}
#' @export