Skip to content

Commit

Permalink
Pass on ... in db_sql_render()
Browse files Browse the repository at this point in the history
Fixes #1394
  • Loading branch information
hadley committed Dec 22, 2023
1 parent a40c03a commit ceee438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dbplyr (development version)

* `db_sql_render()` correctly passes on `...` when re-calling with
`sql_options` set (#1394).

* SQL server: `filter()` does a better job of converting logical vectors
from bit to boolean (@ejneer, #1288).

Expand Down
6 changes: 3 additions & 3 deletions R/db.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ sql_join_suffix.DBIConnection <- function(con, suffix, ...) {
db_sql_render <- function(con, sql, ..., cte = FALSE, sql_options = NULL) {
check_bool(cte)
if (cte) {
lifecycle::deprecate_soft(
lifecycle::deprecate_soft(
when = "2.4.0",
what = "db_sql_render(cte)",
with = I("db_sql_render(sql_options = sql_options(cte = TRUE))")
)
sql_options <- sql_options %||% sql_options(cte = TRUE)
out <- db_sql_render(con, sql, sql_options = sql_options)
out <- db_sql_render(con, sql, ..., sql_options = sql_options)
return(out)
}

if (is.null(sql_options)) {
sql_options <- sql_options()

out <- db_sql_render(con, sql, sql_options = sql_options)
out <- db_sql_render(con, sql, ..., sql_options = sql_options)
return(out)
}

Expand Down

0 comments on commit ceee438

Please sign in to comment.