[R-sig-DB] DBI 0.3

Hadley Wickham h@w|ckh@m @end|ng |rom gm@||@com
Fri Aug 29 19:11:01 CEST 2014


Hi all,

I'm planning a release of DBI in the next week or two (CRAN is
demanding a fix or they'll pull it). I have done my best to make avoid
any backward incompatible changes, while brining DBI up to a modern
package development spec.

If your package depends on DBI, please install the development version
of DBI (devtools::install_github("rstats-db/DBI"), and run R CMD check
on your package.

The NEWS file (https://github.com/rstats-db/DBI/blob/master/NEWS) has
a full list of changes, but I'd like to draw your particular attention
to the new generics:

* `dbIsValid()` returns a logical value describing whether a connection or
  result set (or other object) is still valid. (#12).

* `dbQuoteString()` and `dbQuoteIdentifier()` to implement database specific
  quoting mechanisms.

* `dbFetch()` added as alias to `fetch()` to provide consistent name.
  Implementers should define methods for both `fetch()` and `dbFetch()` until
  `fetch()` is deprecated in 2015. For now, the default method for `dbFetch()`
  calls `fetch()`.

* `dbBegin()` begins a transaction (#17). If not supported, DB specific
  methods should throw an error (as should `dbCommit()` and `dbRollback()`).

Please use these in preference to defining your own variants. You can
check your adherence to the DBI API with the new dbiCheckCompliance()
function.

I am also planning to deprecate some some functions:

* The following functions are soft-deprecated. They are going away,
  and developers who use the DBI should begin preparing. The formal deprecation
  process will begin in July 2015, where these function will emit warnings
  on use.

    * `fetch()` is replaced by `dbFetch()`.

    * `make.db.names()`, `isSQLKeyword()` and `SQLKeywords()`: a black list
      based approach is fundamentally flawed; instead quote strings and
      identifiers with `dbQuoteIdentifier()` and `dbQuoteString()`.

* `dbGetDBIVersion()` is deprecated since it's now just a thin wrapper
  around `packageVersion("DBI")`.

* `dbSetDataMappings()` (#9) and `dbCallProc()` (#7) are deprecated as no
  implementations were ever provided.

Kind regards,

Hadley

-- 
http://had.co.nz/




More information about the R-sig-DB mailing list