Releases: r-dbi/odbc
odbc 1.5.0
Major changes
-
New function
snowflake()
makes it easier to connect to Snowflake,
automatically handling authentication correctly on platforms that provide
Snowflake-native OAuth credentials (@atheriel, #662). -
Long running queries can now be interrupted using Ctrl-C. This
feature is enabled by default in interactive sessions. It can be
controlled by theinterruptible
argument todbConnect()
or by the
global optionodbc.interruptible
. Should be considered experimental---if
you experience problems please file an issue on the package's GitHub
repository (#796).
Minor improvements and bug fixes
-
Improved argument checking and transitioned to the cli package for
formatting most existing error messages (@simonpcouch, #781, #784, #785, #788). -
Raises "Cancelling previous query" warnings from R rather than from Rcpp when
a connection has a current result to avoid possible incorrect resource
unwinds withoptions(warn = 2)
(#797). -
Adjusted the default
batch_rows
value fordbWriteTable()
anddbBind()
methods. odbc 1.3.0 changed the default value from 1024 toNA
, which sets the
batch size to be the length of the input. While this addressed issues for
some drivers when 1024 was greater than the number of rows, it also led
to excessive memory consumption when the input was very large for some other
drivers. The package will now interpetNA
as the minimum of 1024 and the
length of the input (@simonpcouch, #774). -
The encoding of non-ASCII column names of SQL results is now always converted
to UTF-8. (@shrektan, #430) -
Improved error messages when the encoding of client and db-server are
different. (@shrektan, #432) -
dbListFields()
now works withId()
andSQL()
identifiers (#771). -
Transitioned
odbcDataType()
to use S4 for consistency. S3 methods defined
locally will need to be rewritten (@simonpcouch, #701). -
The
"OdbcConnection"
method fordbQuoteIdentifier()
will no longer
passx
toencodeString()
before returning, for consistency with the
default implementation in DBI (@simonpcouch, #765). -
A bug in the implementation of a new feature introduced in 1.4.2, where the
package would automatically set theODBCSYSINI
environmental variable when
using the unixODBC driver manager, was fixed; that environmental variable
will now actually be set on package load (@simonpcouch, #792).
Driver specific changes
-
databricks()
will now automatically configure the needed driver and driver
manager on macOS (@simonpcouch, #651). -
databricks()
now picks up on Posit Workbench-managed Databricks
credentials when rendering Quarto and RMarkdown documents in RStudio
(@atheriel, #805). -
Improved performance on write with Snowflake (#760).
-
Resolved issue when previewing tables using the RStudio Connections pane with
Teradata (@simonpcouch, #755).
odbc 1.4.2
-
dbAppendTable()
Improve performance by checking existence once (#691). -
dbConnect()
no longer automatically escapes suspicious characters
(since there doesn't seem to be a consistent way to do this across drivers)
but instead points you toquote_value()
which applies a heuristic
that should work for most drivers (#718). -
New wrapper for
dbExecute()
that setsimmediate = TRUE
if you are
not supplyingparams
. That should yield a small speed boost in
many cases (#706). -
dbSendQuery()
once again defaults toimmediate = FALSE
(since if you're
using it instead ofdbGetQuery()
you're likely to be using it with
dbBind()
). (#726). -
Deprecated
odbcConnectionColumns()
(in favor ofdbListFields()
),
odbcConnectionActions()
, andodbcConnectionIcon()
(@simonpcouch, #699). -
Backend specific changes:
-
databricks: Fix schema enumeration in connections pane
(@detule, #715). -
Oracle: use more reliable technique to determine user/schema name (#738),
and fixdbExistsTable()
when identifier components contain_
(@detule, #712). -
SQL Server: improvements to
dbExists()
(@meztez, #724) and
dbListTables()
(@simonpcouch, #509) for temporary tables.
It now uses column type"BIGINT"
integer64 objects. -
SQL Server with freetds driver: no longer crashes when executing multiple
queries (@detule, #731). -
Teradata: Fix usage of
exact
argument in internal methods (@detule, 717).
-
-
On MacOS and Linux, the package will now automatically set the
ODBCSYSINI
environmental variable when using the unixODBC driver manager.ODBCSYSINI
will not be changed if it exists already (@simonpcouch, #709).
odbc 1.4.1
-
New
odbcListConfig()
lists configuration files on Mac and Linux
(@simonpcouch, #565). -
databricks()
now works with manually suppliedpwd
anduid
(#690). -
Oracle: uses correct parent class (#685).
-
SQL Server: correctly enumerate schemas across databases in connections pane
(@detule, #527). -
SQL Server: now uses column type
"BIGINT"
integer64 objects
(@simonpcouch, #698).
odbc 1.4.0
Major changes
-
New
odbc::databricks()
makes it easier to connect to Databricks,
automatically handling many common authentication scenarios (@atheriel, #615). -
dbListTables()
,dbListFields()
anddbExistsTable()
automatically
escape underscores in identifier arguments. This leads to substantial
performance improvements for some backends (e.g. snowflake)
(@detule, @fh-afrachioni, #618). -
dbGetQuery()
anddbSendQuery()
now setimmediate = TRUE
if you are
not using a parameterised query. That should yield a small speed boost in
many cases (#633).
Minor improvements and bug fixes
-
Increased the minimum required R version from 3.2.0 to 3.6.0
(@simonpcouch, #629). -
S4 classes for the most database drivers are now exported, make it possible
to use in other packages (#558). -
ODBC errors are now spread across multiple lines, making them easier to
read (@detule, #564). -
DBI::dbConnect(odbc::odbc())
now gives a clear error if you supply multiple
arguments with the same name when case is ignored (#641). -
DBI::dbConnect(odbc::odbc())
now automatically quotes argument values that need
it (#616).
Driver specific changes
-
Oracle: Fix regression when falling back to
odbcConnectionColumns()
to
describe column data types (@detule, #587) -
Spark SQL: Correctly enumerate schemas away from the current catalog
(@detule, #614) -
Snowflake: improved translation from R to snowflake types (@meztez, #599).
-
SQL Server
-
Teradata: Improved handling for temp tables (@detule and @But2ene, #589, 590)
odbc 1.3.5
odbc 1.3.4
-
Optimized table preview methods. Enhances large table preview
within RStudio IDE (@detule, #525). -
Added
attributes
parameter todbConnect(...)
. Can be used to pass a
token and authenticate against Azure AD when using Microsoft SQL Server.
Documented in?ConnectionAttributes
(@detule, #521). -
Fix
length(x) = 3 > 1' in coercion to 'logical(1)
warning in connection
observer (@meztez, #494).
odbc 1.3.3
- Hadley Wickham is now the maintainer.
odbc 1.3.2
- New
odbcDataType.Snowflake()
method for Snowflake databases. (@edgararuiz, #451)
odbc 1.3.1
- Fixed warnings about anonymous unions (@detule, #440)
- Fixed
invalid descriptor
issues when retrieving results from SQL Server +
Microsoft's ODBC driver, using parametrized queries. (@detule, #414) - Fixed null handling in SQL Server / Azure result sets retrieved with
Microsoft's ODBC driver. (@detule, #408) - Hive uses C-style escaping for string literals (single quotes are
backslash-escaped, note single quote-escaped).dbQuoteString
now respects
this when called on a connection of classHive
. (@rnorberg, #184) - When calling
sqlCreateTable(con, ..., temporary = TRUE)
andcon
is a
connection of classDB2/AIX64
, theCREATE TABLE
statement that is generated
properly creates a temporary table in DB2. The statement begins with
DECLARE GLOBAL TEMPORARY TABLE
and ends withON COMMIT PRESERVE ROWS
(DB2's default behavior is
ON COMMIT DELETE ROWS
, which results in the inserted data being
deleted as soon asdbWriteTable
completes). (@rnorberg, #426)
odbc 1.3.0
Major changes
- odbc can now be compiled again with Rtools35 (gcc 4.9.3) on Windows (#383)
invalid descriptor
errors from drivers such as Microsoft SQLServer driver and the freeTDS driver which do not support out of order retrieval are now avoided.
This is done by unbinding any nanodbc buffer past the long column.
Performance for the unbound columns in these cases will be reduced, but the retrieval will work without error (@detule, #381)dbBind()
anddbFetch()
now support multiple result sets (@vkapartzianis, #234)
Minor improvements and fixes
- New
dbAppendTable()
method for OdbcConnection objects (#335) dbQuoteIdentifier()
now uses the input names (if any).dbWriteTable()
anddbBind()
now default to abatch_rows
ofNA
, which sets the batch size to be the length of the input.
This avoids problems with drivers that don't support batch sizes larger than the input size.
To restore the behavior prior to this release passbatch_rows = 1024
or setoptions(odbc.batch_rows = 1024)
(#391).dbWriteTable()
now handlesdata.table::IDate()
objects (#388)dbWriteTable(field.types=)
now issues a warning rather than an error for missing columns (#342)odbcConnectionColumns()
now works as intended withDBI::Id()
objects (#389)dbFetch()
now verifies thatn
is a valid input.- Dates are now always interpreted as being in the database's local time zone, regardless of the
timezone
parameter (#398) - Oracle connections now support
Date
andPOSIXct
types viaDATE
andTIMESTAMP
data types (#324, #349, #350) - Oracle connections now use VARCHAR2 rather than VARCHAR, as recommended by Oracle's documentation (#189)