Skip to content

Commit

Permalink
Prefer glue_data_sql() when data is list-ish, not an actual environme…
Browse files Browse the repository at this point in the history
…nt (#22)
  • Loading branch information
jennybc authored Sep 20, 2024
1 parent 25540eb commit a49ed71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/source_sql_to_dataframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ source_sql_to_dataframe <- function(path, params = NULL) {
)
)
} else {
query <- glue::glue_sql(
query <- glue::glue_data_sql(
params,
query,
.con = con,
.open = sqltargets_option_get("sqltargets.glue_sql_opening_delimiter"),
.close = sqltargets_option_get("sqltargets.glue_sql_closing_delimiter"),
.envir = params
)
.close = sqltargets_option_get("sqltargets.glue_sql_closing_delimiter")
)
}
out <- DBI::dbGetQuery(con, query)
msg <- glue::glue("{basename(path)} executed:\n Rows: {nrow(out)}\n Columns: {ncol(out)}")
Expand Down

0 comments on commit a49ed71

Please sign in to comment.