r-dbi / DBI

A database interface (DBI) definition for communication between R and RDBMSs

Home Page:https://dbi.r-dbi.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use `check_dots_used()` in `dbGetQuery()` and friends

mgirlich opened this issue · comments

e.g. dbGetQuery() doesn't complain about extra arguments. I guess this affects all backends.

library(DBI)
con <- dbConnect(RSQLite::SQLite(), ":memory:")

DBI::dbGetQuery(
  con,
  "SELECT 1",
  extra_arg = 1
)
#>   1
#> 1 1

Created on 2023-04-25 with reprex v2.0.2

Thanks. We could experiment with adding rlang to "Suggests" and calling it only if it is installed. No idea if it works for S4 methods.