Skip to content

Commit dcad567

Browse files
simonpcouchhadley
andauthored
odbc v1.6.0 (#896)
Right before CRAN submission: * polish NEWS * `urlchecker::url_check()` * resolve global variables NOTE * re`document()` * change 301ing URLs at their R source, too * remove note on sys headers WARNING, update revdep count * Resolve "\link{} targets missing package anchors" NOTE re`document()`s with dev DBI + adjusts one manual `\link{}` in a source file * resolve "\link{} targets missing package" NOTE Resolves: ``` * checking Rd cross-references ... NOTE Found the following Rd file(s) with Rd \link{} targets missing package anchors: OdbcConnection.Rd: DBIObject-class, DBIDriver-class, DBIConnection-class, DBIResult-class, dbBind OdbcResult.Rd: DBIObject-class, DBIDriver-class, DBIConnection-class, DBIResult-class dbConnect-OdbcDriver-method.Rd: dbListTables, dbSendQuery, dbColumnInfo, dbFetch odbcConnectionColumns.Rd: dbListFields, dbWriteTable Please provide package anchors for all Rd \link{} targets not in the package itself and the base packages. ``` Manually documents `@param dbObj` for a few methods rather than inheriting links to classes that don't resolve automatically. * Increment version number to 1.6.0 --------- Co-authored-by: Hadley Wickham <[email protected]>
1 parent 721f7e9 commit dcad567

25 files changed

+109
-99
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: odbc
22
Title: Connect to ODBC Compatible Databases (using the DBI Interface)
3-
Version: 1.5.0.9000
3+
Version: 1.6.0
44
Authors@R: c(
55
person("Jim", "Hester", role = "aut"),
66
person("Hadley", "Wickham", , "[email protected]", role = c("aut", "cre")),

NEWS.md

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,53 @@
1-
# odbc (development version)
1+
# odbc 1.6.0
22

3-
* `snowflake()` now allows passing `uid` without `pwd` when
4-
using `authenticator = "SNOWFLAKE_JWT"` (@simonpcouch, #889).
3+
## New features
54

6-
* Enable automatic discovery of SQL Server drivers installed with homebrew
7-
on ARM macOS (@stevecondylios, #893).
8-
9-
* SQL Server: Fix roundtrip of `hms` data.
10-
11-
* SQL Server: Fix data truncation when writing to temp tables with
12-
`FreeTDS` (#866).
13-
14-
* SQL Server: Writing to DATETIME2 targets respects precision (#793).
15-
16-
* Addressed issue where error messages rethrown from some drivers would be
17-
garbled when the raw error message contained curly brackets
18-
(#859 by @simonpcouch).
19-
20-
* snowflake: Runtime driver configuration checks on `MacOS` (#857).
21-
22-
* Separate column content and name encoding by adding
23-
a new `name_encoding` argument to `dbConnect` to complement
24-
the existing `encoding` parameter (#845).
25-
26-
* Netezza: Improved data type inference for character and boolean
27-
columns (#847, #850).
5+
* A hex logo has been added to the package (@edgararuiz, #824).
286

29-
* Added functions `odbcEditDrivers()`, `odbcEditSystemDSN()`, and
30-
`odbcEditUserDSN()` to provide a shorthand for
31-
`file.edit(odbcListConfig()[[i]])`. The helpers only support macOS and
32-
Linux and will raise an error on Windows (@simonpcouch, #827).
7+
* `databricks()` and `snowflake()` detect viewer-based credentials on
8+
Posit Connect (@atheriel, #853 and #894).
339

34-
* Trailing slashes are now automatically removed from `databricks(workspace)`,
35-
guarding users from an uninformative driver message (@simonpcouch, #827).
36-
37-
* `snowflake()` now allows passing `uid` without `pwd` when
38-
`authenticator = "externalbrowser"` (@simonpcouch, #817).
10+
* `odbcEditDrivers()`, `odbcEditSystemDSN()`, and `odbcEditUserDSN()`
11+
create shortcuts for `file.edit(odbcListConfig()[[i]])` on macOS and
12+
Linux (@simonpcouch, #827).
13+
14+
* New `redshift()` helper simplifies connections to Amazon Redshift clusters,
15+
particularly with IAM credentials (@atheriel, #879).
16+
17+
## Bug fixes and minor improvements
3918

40-
* DB2: Better support for temp tables in `dbListTables`, and `dbExistsTable` (#823).
19+
* Error messages rethrown from drivers no longer become garbled when raw messages
20+
contain curly brackets (@simonpcouch, #859).
21+
22+
* SQL Server drivers installed with homebrew are now discovered automatically
23+
on ARM macOS (@stevecondylios, #893).
4124

42-
* `dbConnect(odbc(), ...)` will now error informatively if the package
43-
can't locate a unixODBC install on MacOS and Linux (@simonpcouch, #782).
25+
* `databricks(workspace)` removes trailing slashes automatically, preventing
26+
uninformative driver messages (@simonpcouch, #827).
4427

45-
* Added a hex logo for the package (@edgararuiz, #824).
28+
* `dbConnect()` displays clear errors when unixODBC isn't found on macOS and
29+
Linux (@simonpcouch, #782).
4630

47-
* oracle: Fix writing to DATE and TIMESTAMP(n) targets using `batch_size` > 1.
31+
* `dbConnect()` adds `name_encoding` to complement `encoding` for separate
32+
column content and name encoding (#845).
33+
34+
* `dbListTables()` and `dbExistsTable()` improve temp table support with DB2 (#823).
4835

49-
* SQL Server: Fix issue related to writing when using SIMBA drivers (#816).
36+
* Netezza character and boolean columns receive improved data type
37+
inference (#847, #850).
38+
39+
* Oracle `DATE` and `TIMESTAMP(n)` targets handle writes correctly with
40+
`batch_size > 1` (#810).
41+
42+
* `snowflake()` checks runtime driver configuration on macOS (#857).
5043

51-
* `snowflake()` and `databricks()` now detect viewer-based credentials when
52-
running on Posit Connect (@atheriel, #853 and #894).
44+
* `snowflake()` accepts `uid` without `pwd` when using
45+
`authenticator = "externalbrowser"` or `authenticator = "SNOWFLAKE_JWT"`
46+
(@simonpcouch, #817 and #889).
5347

54-
* A new `redshift()` helper greatly simplifies connecting to Amazon Redshift
55-
clusters, particularly when using IAM credentials (@atheriel, #879).
48+
* Resolved SQL Server data truncation in temp tables with `FreeTDS` (#866),
49+
writing issues with SIMBA drivers (#816), `hms` data roundtrip (#887),
50+
and precision when writing to `DATETIME2` targets (#793).
5651

5752
# odbc 1.5.0
5853

R/dbi-connection.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ setMethod("show", "OdbcConnection",
5050

5151

5252
#' @rdname OdbcConnection
53+
#' @param dbObj An object inheriting from `DBIObject`, i.e. `DBIDriver`,
54+
#' `DBIConnection`, or a `DBIResult`.
5355
#' @inheritParams DBI::dbIsValid
5456
#' @export
5557
setMethod("dbIsValid", "OdbcConnection",
@@ -107,8 +109,8 @@ setMethod("dbExecute", c("OdbcConnection", "character"),
107109

108110
#' @rdname OdbcConnection
109111
#' @inheritParams DBI::dbSendStatement
110-
#' @param params Query parameters to pass to [dbBind()].
111-
#' See [dbBind()] for details.
112+
#' @param params Query parameters to pass to [DBI::dbBind()].
113+
#' See [DBI::dbBind()] for details.
112114
#' @export
113115
setMethod("dbSendStatement", c("OdbcConnection", "character"),
114116
function(conn, statement, params = NULL, ..., immediate = FALSE) {

R/dbi-driver.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ setMethod("show", "OdbcDriver",
6868
#' the driver does not return a valid value, it can be set manually with this
6969
#' parameter.
7070
#' @param attributes A list of connection attributes that are passed
71-
#' prior to the connection being established. See \link{ConnectionAttributes}.
71+
#' prior to the connection being established. See [ConnectionAttributes].
7272
#' @param interruptible Logical. If `TRUE` calls to `SQLExecute` and
7373
#' `SQLExecuteDirect` can be interrupted when the user sends SIGINT ( ctrl-c ).
7474
#' Otherwise, they block. Defaults to `TRUE` in interactive sessions, and
@@ -142,8 +142,9 @@ setMethod("show", "OdbcDriver",
142142
#' driver to create a connection object.
143143
#' 3) *Interface with connections*: The resulting connection object can be
144144
#' passed to various functions to retrieve information on database
145-
#' structure ([dbListTables()]), iteratively develop queries ([dbSendQuery()],
146-
#' [dbColumnInfo()]), and query data objects ([dbFetch()]).
145+
#' structure ([DBI::dbListTables()][]), iteratively develop queries
146+
#' ([DBI::dbSendQuery()], [DBI::dbColumnInfo()]), and query data objects
147+
#' ([DBI::dbFetch()]).
147148
#'
148149
#' @aliases dbConnect odbc
149150
#'

R/dbi-result.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ setMethod("dbHasCompleted", "OdbcResult",
7979
)
8080

8181
#' @rdname OdbcResult
82+
#' @param dbObj An object inheriting from `DBIObject`, i.e. `DBIDriver`,
83+
#' `DBIConnection`, or a `DBIResult`.
8284
#' @inheritParams DBI::dbIsValid
8385
#' @export
8486
setMethod("dbIsValid", "OdbcResult",

R/dbi-table.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ NULL
33

44
#' Convenience functions for reading/writing DBMS tables
55
#'
6-
#' @param conn a \code{\linkS4class{OdbcConnection}} object, produced by
7-
#' [DBI::dbConnect()]
6+
#' @param conn An [OdbcConnection] object, produced by [DBI::dbConnect()].
87
#' @param name a character string specifying a table name. Names will be
98
#' automatically quoted so you can use any sequence of characters, not
109
#' just any valid bare table name.

R/odbc-connection.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,18 @@ NULL
225225
#' @description
226226
#' `r lifecycle::badge("deprecated")`
227227
#'
228-
#' This function has been deprecated in favor of [dbListFields()].
228+
#' This function has been deprecated in favor of [DBI::dbListFields()].
229229
#'
230230
#' For a given table this function returns detailed information on
231231
#' all fields / columns. The expectation is that this is a relatively thin
232232
#' wrapper around the ODBC `SQLColumns` function call, with some of the field
233233
#' names renamed / re-ordered according to the return specifications below.
234234
#'
235235
#' @details
236-
#' In [dbWriteTable()] we make a call to this method
236+
#' In [DBI::dbWriteTable()] we make a call to this method
237237
#' to get details on the fields of the table we are writing to. In particular
238238
#' the columns `data_type`, `column_size`, and `decimal_digits` are used. An
239-
#' implementation is not necessary for [dbWriteTable()] to work.
239+
#' implementation is not necessary for [DBI::dbWriteTable()] to work.
240240
#'
241241
#' `odbcConnectionColumns` is routed through the `SQLColumns` ODBC
242242
#' method. This function, together with remaining catalog functions
@@ -256,7 +256,7 @@ NULL
256256
#' table name.
257257
#'
258258
#' @seealso The ODBC documentation on
259-
#' [SQLColumns](https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolumns-function)
259+
#' [SQLColumns](https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolumns-function)
260260
#' for further details.
261261
#'
262262
#' @return data.frame with columns

R/odbc-package.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@
1212
#' @useDynLib odbc, .registration = TRUE
1313
## usethis namespace: end
1414
NULL
15+
16+
utils::globalVariables(c("attribute", "name", "simba_config_dirs"))

R/odbc.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param levels One or more of `r odbc:::choices_rd(names(odbc:::transactionLevels()))`.
44
#' @inheritParams DBI::dbDisconnect
5-
#' @seealso <https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/setting-the-transaction-isolation-level>
5+
#' @seealso <https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/setting-the-transaction-isolation-level>
66
#' @export
77
#' @examples
88
#' \dontrun{

cran-comments.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
## R CMD check results
22

3-
Recent MacOS builds have trigger the NOTE "installed size is 10.8Mb." MacOS builds include all debug symbols and CRAN policy doesn't permit building without them.
4-
5-
"Additional issues" checks on M1 Mac surface a number of new warnings related to GCC SQL/ODBC deprecations resulting from `sys-iodbc` headers overwriting `unixodbc` headers in `R-macos/recipes` (see https://github.com/R-macos/recipes/issues/41 and linked issues).
3+
Recent MacOS builds trigger the NOTE "installed size is 10.8Mb." MacOS builds include all debug symbols and CRAN policy doesn't permit building without them.
64

75
## revdepcheck results
86

9-
We checked 32 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
7+
We checked 35 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
108

119
* We saw 0 new problems
1210
* We failed to check 0 packages

0 commit comments

Comments
 (0)