Skip to content

Commit

Permalink
namespace and internal fun name cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daranzolin committed Apr 22, 2024
1 parent 3b17f4e commit e7c6202
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export(tar_sql_deps)
export(tar_sql_exec)
export(tar_sql_file)
export(tar_sql_raw)
importFrom(RSQLite,SQLite)
1 change: 1 addition & 0 deletions R/sqltargets.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' See the README on
#' \href{https://github.com/daranzolin/sqltargets#readme}{GitHub}
#'
#' @importFrom RSQLite SQLite
#' @docType package
#' @name sqltargets
NULL
Expand Down
4 changes: 2 additions & 2 deletions R/tar_sql_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ tar_sql_file_command <- function(path) {
list(path = path),
env = list(path = path)
)
fun <- rlang::call_ns("sqltargets", "tar_sql_file")
fun <- int_call_ns("sqltargets", "tar_sql_file")
expr <- list(
fun,
args
Expand All @@ -146,7 +146,7 @@ tar_sql_command <- function(
)
deps <- c(sort(unique(sql_deps(path))), file_dep)
deps <- call_list(as_symbols(deps))
fun <- call_ns("sqltargets", "tar_sql_exec")
fun <- int_call_ns("sqltargets", "tar_sql_exec")
expr <- list(
fun,
args = args,
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ call_list <- function(args) {
as_symbols <- function(x) {
lapply(x, as.symbol)
}
call_ns <- function(pkg, fun) {
int_call_ns <- function(pkg, fun) {
call_function("::", as_symbols(c(pkg, fun)))
}

Expand Down

0 comments on commit e7c6202

Please sign in to comment.