Skip to content

Commit

Permalink
no readr import, RSQLite to Suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
daranzolin committed May 9, 2024
1 parent 233f21d commit 981cabc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Package: sqltargets
Type: Package
Title: Targets Extension for 'SQL' Queries
Title: 'Targets' Extension for 'SQL' Queries
Version: 0.0.1
Authors@R: c(
person("David", "Ranzolin", email = "daranzolin@gmail.com", role=c("aut", "cre", "cph"))
)
Maintainer: David Ranzolin <daranzolin@gmail.com>
Description: Provides an extension for 'SQL' queries as separate file
within targets pipelines. The shorthand creates two targets,
within 'targets' pipelines. The shorthand creates two targets,
the query file and the query result.
License: MIT + file LICENSE
Encoding: UTF-8
Expand All @@ -18,9 +18,7 @@ Imports:
fs,
glue,
purrr,
readr,
rlang,
RSQLite,
stringr,
tarchetypes,
targets,
Expand All @@ -29,5 +27,6 @@ URL: https://github.com/daranzolin/sqltargets
BugReports: https://github.com/daranzolin/sqltargets/issues
RoxygenNote: 7.2.1
Suggests:
testthat (>= 3.0.0)
testthat (>= 3.0.0),
RSQLite (>= 2.2.0)
Config/testthat/edition: 3
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export(tar_sql_deps)
export(tar_sql_exec)
export(tar_sql_file)
export(tar_sql_raw)
importFrom(RSQLite,SQLite)
importFrom(rlang,caller_env)
2 changes: 1 addition & 1 deletion R/source_sql_to_dataframe.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source_sql_to_dataframe <- function(path, query_params = NULL) {

lines <- readr::read_lines(path)
lines <- readLines(path)
connection_string <- stringr::str_extract(lines[1], "(?<=\\=).*")
connection_call <- paste0("con <- ", connection_string)
eval(parse(text = connection_call))
Expand Down
1 change: 0 additions & 1 deletion R/sqltargets.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#' See the README on
#' \href{https://github.com/daranzolin/sqltargets#readme}{GitHub}
#'
#' @importFrom RSQLite SQLite
#' @importFrom rlang caller_env
#' @docType package
#' @name sqltargets
Expand Down

0 comments on commit 981cabc

Please sign in to comment.