r-dbi / dbi3

DBI revisited
https://r-dbi.github.io/dbi3
37 stars 2 forks source link

dbWithConnection() and dbWithResult() #24

Open krlmlr opened 7 years ago

krlmlr commented 7 years ago

Usage like this:

dbWithConnection(
  con <- dbConnect(...),
  {
    dbWithResult(
      res <- dbSendQuery(con, ...),
      {
        dbFetch(res)
      }
    )
  }
)
krlmlr commented 3 years ago

Handled by {withr}.