Releases: r-dbi/DBI
Releases · r-dbi/DBI
v0.7
v0.6-1
v0.6
-
Interface changes
- Deprecated
dbDriver()
anddbUnloadDriver()
by documentation (#21). - Renamed arguments to
sqlInterpolate()
andsqlParseVariables()
to be more consistent with the rest of the interface, and added.dots
argument tosqlParseVariables
. DBI drivers are now expected to implementsqlParseVariables(conn, sql, ..., .dots)
andsqlInterpolate(conn, sql, ...)
(#147).
- Deprecated
-
Interface enhancements
- Removed
valueClass = "logical"
for those generics where the return value is meaningless, to allow backends to return invisibly (#135). - Avoiding using braces in the definitions of generics if possible, so that standard generics can be detected (#146).
- Added default implementation for
dbReadTable()
. - All standard generics are required to have an ellipsis (with test), for future extensibility. - Improved default implementation of
dbQuoteString()
anddbQuoteIdentifier()
(#77). - Removed
tryCatch()
call indbGetQuery()
(#113).
- Removed
-
Documentation improvements
- Finalized first draft of DBI specification, now in a vignette.
- Most methods now draw documentation from
DBItest
, only those where the behavior is not finally decided don't do this yet yet. - Removed
max.connections
requirement from documentation (#56). - Improved
dbBind()
documentation and example (#136). - Change
omegahat.org
URL toomegahat.net
, the particular document still doesn't exist below the new domain.
-
Internal
- Use roxygen2 inheritance to copy DBI specification to this package.
- Use
tic
package for building documentation. - Use markdown in documentation.
v0.5-1
v0.5
- Interface changes
- Interface enhancements
- New
dbSendStatement()
generic, forwards todbSendQuery()
by default (#20, #132). - New
dbExecute()
, callsdbSendStatement()
by default (#109, @bborgesr). - New
dbWithTransaction()
that callsdbBegin()
anddbCommit()
, anddbRollback()
on failure (#110, @bborgesr). - New
dbBreak()
function which allows aborting from withindbWithTransaction()
(#115, #133). - Export
dbFetch()
anddbQuoteString()
methods.
- New
- Documentation improvements:
- One example per function (except functions scheduled for deprecation) (#67).
- Consistent layout and identifier naming.
- Better documentation of generics by adding links to the class and related generics in the "See also" section under "Other DBI... generics" (#130). S4 documentation is directed to a hidden page to unclutter documentation index (#59).
- Fix two minor vignette typos (#124, @mdsumner).
- Add package documentation.
- Remove misleading parts in
dbConnect()
documentation (#118). - Remove misleading link in
dbDataType()
documentation. - Remove full stop from documentation titles.
- New help topic "DBIspec" that contains the full DBI specification (currently work in progress) (#129).
- HTML documentation generated by
staticdocs
is now uploaded to http://rstats-db.github.io/DBI for each build of the "production" branch (#131). - Further minor changes and fixes.
- Internal
v0.4-1
v0.4
- New package maintainer: Kirill Müller.
dbGetInfo()
gains a default method that extracts the information from
dbGetStatement()
,dbGetRowsAffected()
,dbHasCompleted()
, and
dbGetRowCount()
. This means that most drivers should no longer need to
implementdbGetInfo()
(which may be deprecated anyway at some point) (#55).dbDataType()
anddbQuoteString()
are now properly exported.- The default implementation for
dbDataType()
(powered bydbiDataType()
) now
also supportsdifftime
andAsIs
objects and lists ofraw
(#70). - Default
dbGetQuery()
method now always callsdbFetch()
, in atryCatch()
block. - New generic
dbBind()
for binding values to a parameterised query. - DBI gains a number of SQL generation functions. These make it easier to
write backends by implementing common operations that are slightly
tricky to do absolutely correctly.sqlCreateTable()
andsqlAppendTable()
create tables from a data
frame and insert rows into an existing table. These will power most
implementations ofdbWriteTable()
.sqlAppendTable()
is useful
for databases that support parameterised queries.sqlRownamesToColumn()
andsqlColumnToRownames()
provide a standard
way of translating row names to and from the database.sqlInterpolate()
andsqlParseVariables()
allows databases without
native parameterised queries to use parameterised queries to avoid
SQL injection attacks.sqlData()
is a new generic that converts a data frame into a data
frame suitable for sending to the database. This is used to (e.g.)
ensure all character vectors are encoded as UTF-8, or to convert
R varible types (like factor) to types supported by the database.- The
sqlParseVariablesImpl()
is now implemented purely in R, with full
test coverage (#83, @hannesmuehleisen).
dbiCheckCompliance()
has been removed, the functionality is now available
in theDBItest
package (#80).- Added default
show()
methods for driver, connection and results. - New concrete
ANSIConnection
class andANSI()
function to generate a dummy
ANSI compliant connection useful for testing. - Default
dbQuoteString()
anddbQuoteIdentifer()
methods now use
encodeString()
so that special characters like\n
are correctly escaped.
dbQuoteString()
convertsNA
to (unquoted) NULL. - The initial DBI proposal and DBI version 1 specification are now included as
a vignette. These are there mostly for historical interest. - The new
DBItest
package is described in the vignette. - Deprecated
print.list.pairs()
. - Removed unused
dbi_dep()
.
DBI 0.3.1
DBI 0.3
New and enhanced generics
dbIsValid()
returns a logical value describing whether a connection or
result set (or other object) is still valid. (#12).dbQuoteString()
anddbQuoteIdentifier()
to implement database specific
quoting mechanisms.dbFetch()
added as alias tofetch()
to provide consistent name.
Implementers should define methods for bothfetch()
anddbFetch()
until
fetch()
is deprecated in 2015. For now, the default method fordbFetch()
callsfetch()
.dbBegin()
begins a transaction (#17). If not supported, DB specific
methods should throw an error (as shoulddbCommit()
anddbRollback()
).
New default methods
dbGetStatement()
,dbGetRowsAffected()
,dbHasCompleted()
, and
dbGetRowCount()
gain default methods that extract the appropriate elements
fromdbGetInfo()
. This means that most drivers should no longer need to
implement these methods (#13).dbGetQuery()
gains a default method forDBIConnection
which uses
dbSendQuery()
,fetch()
anddbClearResult()
.
Deprecated features
- 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 bydbFetch()
.make.db.names()
,isSQLKeyword()
andSQLKeywords()
: a black list
based approach is fundamentally flawed; instead quote strings and
identifiers withdbQuoteIdentifier()
anddbQuoteString()
.
dbGetDBIVersion()
is deprecated since it's now just a thin wrapper
aroundpackageVersion("DBI")
.dbSetDataMappings()
(#9) anddbCallProc()
(#7) are deprecated as no
implementations were ever provided.
Other improvements
dbiCheckCompliance()
makes it easier for implementors to check that their
package is in compliance with the DBI specification.- All examples now use the RSQLite package so that you can easily try out
the code samples (#4). dbDriver()
gains a more effective search mechanism that doesn't rely on
packages being loaded (#1).- DBI has been converted to use roxygen2 for documentation, and now most
functions have their own documentation files. I would love your feedback
on how we could make the documentation better!