Skip to content

DBI 0.8

Compare
Choose a tag to compare
@krlmlr krlmlr released this 09 Mar 16:15
· 1031 commits to main since this release

Breaking changes

  • SQL() now strips the names from the output if the names argument is unset.
  • The dbReadTable(), dbWriteTable(), dbExistsTable(), dbRemoveTable(), and dbListFields() generics now specialize over the first two arguments to support implementations with the Id S4 class as type for the second argument. Some packages may need to update their documentation to satisfy R CMD check again.

New generics

  • Schema support: Export Id(), new generics dbListObjects() and dbUnquoteIdentifier(), methods for Id that call dbQuoteIdentifier() and then forward (#220).
  • New dbQuoteLiteral() generic. The default implementation uses switchpatch to avoid dispatch ambiguities, and forwards to dbQuoteString() for character vectors. Backends may override methods that also dispatch on the second argument, but in this case also an override for the "SQL" class is necessary (#172).

Default implementations

  • Default implementations of dbQuoteIdentifier() and dbQuoteLiteral() preserve names, default implementation of dbQuoteString() strips names (#173).
  • Specialized methods for dbQuoteString() and dbQuoteIdentifier() are available again, for compatibility with clients that use getMethod() to access them (#218).
  • Add default implementation of dbListFields().
  • The default implementation of dbReadTable() now has row.names = FALSE as default and also supports row.names = NULL (#186).

API changes

  • The SQL() function gains an optional names argument which can be used to assign names to SQL strings.

Deprecated generics

  • dbListConnections() is soft-deprecated by documentation.
  • dbListResults() is deprecated by documentation (#58).
  • dbGetException() is soft-deprecated by documentation (#51).
  • The deprecated print.list.pairs() has been removed.

Bug fixes

Documentation

  • Help pages for generics now contain a dynamic list of methods implemented by DBI backends (#162).
  • sqlInterpolate() now supports both named and positional variables (#216, @hannesmuehleisen).
  • Point to db.rstudio.com (@wibeasley, #209).
  • Reflect new 'r-dbi' organization in DESCRIPTION (@wibeasley, #207).

Internal

  • Using switchpatch on the second argument for default implementations of dbQuoteString() and dbQuoteIdentifier().