Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netezza / custom odbcDataType #847

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Collate:
'driver-hive.R'
'driver-impala.R'
'driver-mysql.R'
'driver-netezza.R'
'driver-oracle.R'
'driver-postgres.R'
'driver-redshift.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ exportClasses(HDB)
exportClasses(Hive)
exportClasses(Impala)
exportClasses(MySQL)
exportClasses(NetezzaSQL)
exportClasses(OdbcConnection)
exportClasses(OdbcDriver)
exportClasses(OdbcResult)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# odbc (development version)

* Netezza: Improved data type inference for character columns (#847).

* Added functions `odbcEditDrivers()`, `odbcEditSystemDSN()`, and
`odbcEditUserDSN()` to provide a shorthand for
`file.edit(odbcListConfig()[[i]])`. The helpers only support macOS and
Expand Down
16 changes: 16 additions & 0 deletions R/driver-netezza.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' @export
#' @rdname DBI-classes
setClass("NetezzaSQL", contains = "OdbcConnection")

#' @export
#' @rdname odbcDataType
#' @usage NULL
setMethod("odbcDataType", "NetezzaSQL",
function(con, obj, ...) {
switch_type(
obj,
character = varchar(obj),
callNextMethod(con, obj, ...)
)
}
)
7 changes: 4 additions & 3 deletions man/DBI-classes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/odbcDataType.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading