Import from actions-sync, check carefully (#497).
Import from actions-sync, check carefully (#496).
Import from actions-sync, check carefully (#495).
Import from actions-sync, check carefully.
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/10425483242
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/10232551285
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/10224248605
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/10200154953
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/9728444161
Auto-update from GitHub Actions.
Run: https://github.com/r-dbi/DBI/actions/runs/9692418830
Avoid checking bashisms on Windows.
Better commit message.
Harmonize workflows.
Bump versions, better default, consume custom matrix.
Recent updates.
dbQuoteLiteral()
uses the format "%Y-%m-%d %H:%M:%S%z"
which is understood by more databases (#486).dbQuoteLiteral()
uses the format "%Y-%m-%d %H-%M-%S%z"
which is understood by more databases (#467, #474).dbGetInfo()
in the spec (#477).Id()
does not assign empty names to the components if all arguments are unnamed (#464).Fix dbWriteTableArrow()
according to spec (#457).
Fix type inference in default method for dbCreateTableArrow()
(#450).
dbAppendTableArrow()
returns number of rows (#454).
Add temporary
argument to dbCreateTableArrow()
(#453).
Avoid coercing params
in default implementation for dbSendQueryArrow()
(#447).
Use nanoarrow::infer_nanoarrow_schema()
in the default method for dbCreateTable()
(#445).
Add badge to DBIResultArrow
class (#452).
Change maintainer e-mail.
dbUnquoteIdentifier()
creates Id()
objects without component names and allows non-NA
character input (#421, #422).New generics dbSendQueryArrow()
, dbFetchArrow()
, dbGetQueryArrow()
, dbReadTableArrow()
, dbWriteTableArrow()
(@nbenn, #390), dbCreateTableArrow()
, dbAppendTableArrow()
(#396),
dbBindArrow()
(#415) and dbFetchArrowChunk()
(#424), with default implementations via nanoarrow (#414).
Id()
now accepts unnamed components (#417). If names are provided, the components are arranged in SQL order (@eauleaf, #427).
New dbIsValid()
method for "DBIResultArrowDefault"
objects implemented by DBI (#425).
Implement dbiDataType()
for objects of class "blob"
.
Clarify repeated parameter binding (#430).
Deal with sundown of https://relational.fit.cvut.cz
(#423).
Correct vignette titles (#419).
Harmonize table documentation (#400).
Tweak typo, add families for data retrieval and command execution.
Enable BLOB tests for arrow >= 10.0.0 (#395).
Run DBItest for SQLite as part of the checks here (#431).
Fix checks without suggested packages (#420).
Fix Windows tests on GHA (#406).
testthat::use_testthat(3)
(#416).
dbAppendTable()
accepts Id
(#381, @renkun-ken).?dbSendQuery
and related methods gain a section "The data retrieval flow" (#386).
?dbSendStatement
and related methods gain a section "The command execution flow" (#386).
dbQuoteLiteral()
in default method for sqlData()
(#362, #371).?dbConnect
) contains clickable links to all known backends (except ROracle), and an explanatory sentence (#360).?Id
gains better examples (#295, #370).dbWriteTable()
in the documentation (#352, #372).setMethod()
calls refer to top-level functions (#368).?dbReadTable
and other pages gain pointers to Id()
and SQL()
(#359).dbAppendTable()
now allows columns named sep
(#336).dbAppendTable()
shows a better error message if the input has zero columns (#313).sqlInterpolate()
now correctly interprets consecutive comments (#329, @rnorberg).dbQuoteLiteral()
works for difftime objects (#325).dbQuoteLiteral()
quotes dates as YYYY-MM-DD
without time zone (#331).DESCRIPTION
.New DBIConnector
class (#280).
Specify immediate
argument to dbSendQuery()
, dbGetQuery()
, dbSendStatement()
and dbExecute()
(#268).
Use specification for dbGetInfo()
(#271).
dbUnquoteIdentifier()
now supports Id()
objects with catalog
members (#266, @raffscallion). It also handles unquoted identifiers of the form table
, schema.table
or catalog.schema.table
, for compatibility with dbplyr.
New DBI intro article (#286, @cutterkom).
Add pkgdown reference index (#288).
DBI specification on https://dbi.r-dbi.org/dev/articles/spec now comes with a table of contents and code formatting.
Update examples to refer to params
instead of param
(#235).
Improved documentation for sqlInterpolate()
(#100). Add usage of SQL()
to sqlInterpolate()
examples (#259, @renkun-ken).
Improve documentation for Id
.
sqlInterpolate()
uses dbQuoteLiteral()
instead of checking the type of the input.
Avoid partial argument match in dbWriteTable()
(#246, @richfitz).
dbAppendTable()
that by default calls sqlAppendTableTemplate()
and then dbExecute()
with a param
argument, without support for row.names
argument (#74).dbCreateTable()
that by default calls sqlCreateTable()
and then dbExecute()
, without support for row.names
argument (#74).dbCanConnect()
generic with default implementation (#87).dbIsReadOnly()
generic with default implementation (#190, @anhqle).sqlAppendTable()
now accepts lists for the values
argument, to support lists of SQL
objects in R 3.1.dbListFields(DBIConnection, Id)
, this relies on dbQuoteIdentifier(DBIConnection, Id)
(#75).dbGetQuery()
, dbSendQuery()
, dbExecute()
and dbSendStatement()
.dbColumnInfo()
method is now fully specified (#75).dbListFields()
method is now fully specified (#75).value
argument to secondary dbWriteTable()
call (#737, @jimhester).Id
class now uses <Id>
and not <Table>
when printing.dbUnquoteIdentifier()
implementation now complies to the spec.SQL()
now strips the names from the output if the names
argument is unset.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.Id()
, new generics dbListObjects()
and dbUnquoteIdentifier()
, methods for Id
that call dbQuoteIdentifier()
and then forward (#220).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).dbQuoteIdentifier()
and dbQuoteLiteral()
preserve names, default implementation of dbQuoteString()
strips names (#173).dbQuoteString()
and dbQuoteIdentifier()
are available again, for compatibility with clients that use getMethod()
to access them (#218).dbListFields()
.dbReadTable()
now has row.names = FALSE
as default and also supports row.names = NULL
(#186).SQL()
function gains an optional names
argument which can be used to assign names to SQL strings.dbListConnections()
is soft-deprecated by documentation.dbListResults()
is deprecated by documentation (#58).dbGetException()
is soft-deprecated by documentation (#51).print.list.pairs()
has been removed.dbDataType()
for AsIs
object (#198, @yutannihilation).dbQuoteString()
and dbQuoteIdentifier()
to ignore invalid UTF-8 strings (r-dbi/DBItest#156).sqlInterpolate()
now supports both named and positional variables (#216, @hannesmuehleisen).DESCRIPTION
(@wibeasley, #207).dbQuoteString()
and dbQuoteIdentifier()
.DBItest
.dbGetQuery()
now accepts an n
argument and forwards it to dbFetch()
. No warning about pending rows is issued anymore (#76).slots
argument of setClass()
) (#169, @mvkorpel).dbReadTable()
for backends that do not provide their own implementation (#171).Interface changes
dbDriver()
and dbUnloadDriver()
by documentation (#21).sqlInterpolate()
and sqlParseVariables()
to be more consistent with the rest of the interface, and added .dots
argument to sqlParseVariables
. DBI drivers are now expected to implement sqlParseVariables(conn, sql, ..., .dots)
and sqlInterpolate(conn, sql, ...)
(#147).Interface enhancements
valueClass = "logical"
for those generics where the return value is meaningless, to allow backends to return invisibly (#135).dbReadTable()
.dbQuoteString()
and dbQuoteIdentifier()
(#77).tryCatch()
call in dbGetQuery()
(#113).Documentation improvements
DBItest
, only those where the behavior is not finally decided don't do this yet yet.max.connections
requirement from documentation (#56).dbBind()
documentation and example (#136).omegahat.org
URL to omegahat.net
, the particular document still doesn't exist below the new domain.Internal
tic
package for building documentation.Interface changes
Interface enhancements
dbSendStatement()
generic, forwards to dbSendQuery()
by default (#20, #132).dbExecute()
, calls dbSendStatement()
by default (#109, @bborgesr).dbWithTransaction()
that calls dbBegin()
and dbCommit()
, and dbRollback()
on failure (#110, @bborgesr).dbBreak()
function which allows aborting from within dbWithTransaction()
(#115, #133).dbFetch()
and dbQuoteString()
methods.Documentation improvements:
dbConnect()
documentation (#118).dbDataType()
documentation.staticdocs
is now uploaded to https://rstats-db.github.io/DBI for each build of the "production" branch (#131).Internal
show()
implementations silently ignore all errors. Some DBI drivers (e.g., RPostgreSQL) might fail to implement dbIsValid()
or the other methods used.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
implement dbGetInfo()
(which may be deprecated anyway at some point) (#55).
dbDataType()
and dbQuoteString()
are now properly exported.
The default implementation for dbDataType()
(powered by dbiDataType()
) now
also supports difftime
and AsIs
objects and lists of raw
(#70).
Default dbGetQuery()
method now always calls dbFetch()
, in a tryCatch()
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()
and sqlAppendTable()
create tables from a data
frame and insert rows into an existing table. These will power most
implementations of dbWriteTable()
. sqlAppendTable()
is useful
for databases that support parameterised queries.
sqlRownamesToColumn()
and sqlColumnToRownames()
provide a standard
way of translating row names to and from the database.
sqlInterpolate()
and sqlParseVariables()
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 the DBItest
package (#80).
Added default show()
methods for driver, connection and results.
New concrete ANSIConnection
class and ANSI()
function to generate a dummy
ANSI compliant connection useful for testing.
Default dbQuoteString()
and dbQuoteIdentifer()
methods now use
encodeString()
so that special characters like \n
are correctly escaped.
dbQuoteString()
converts NA
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()
.
Actually export dbIsValid()
:/
dbGetQuery()
uses dbFetch()
in the default implementation.
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()
).
dbGetStatement()
, dbGetRowsAffected()
, dbHasCompleted()
, and
dbGetRowCount()
gain default methods that extract the appropriate elements
from dbGetInfo()
. This means that most drivers should no longer need to
implement these methods (#13).
dbGetQuery()
gains a default method for DBIConnection
which uses
dbSendQuery()
, fetch()
and dbClearResult()
.
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.
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!
Code cleanups contributed by Matthias Burger: avoid partial argument name matching and use TRUE/FALSE, not T/F.
Change behavior of make.db.names.default to quote SQL keywords if allow.keywords is FALSE. Previously, SQL keywords would be name mangled with underscores and a digit. Now they are quoted using '"'.
Changed license from GPL to LPGL
Fixed a trivial typo in documentation
Removed the "valueClass" from some generic functions, namely, dbListConnections, dbListResults, dbGetException, dbGetQuery, and dbGetInfo. The reason is that methods for these generics could potentially return different classes of objects (e.g., the call dbGetInfo(res) could return a list of name-value pairs, while dbGetInfo(res, "statement") could be a character vector).
Added 00Index to inst/doc
Added dbGetDBIVersion() (simple wrapper to package.description).