Skip to content

Commit

Permalink
Snowflake/driver class (#865)
Browse files Browse the repository at this point in the history
* snowflake(): instantiates object inheriting from OdbcDriver

* roxygenize

---------

Co-authored-by: simonpcouch <[email protected]>
  • Loading branch information
detule and simonpcouch authored Dec 29, 2024
1 parent 629595a commit 4ecd509
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exportClasses(PostgreSQL)
exportClasses(Redshift)
exportClasses(SQLite)
exportClasses(Snowflake)
exportClasses(SnowflakeOdbcDriver)
exportClasses(Teradata)
exportMethods(dbAppendTable)
exportMethods(dbBegin)
Expand Down
8 changes: 6 additions & 2 deletions R/driver-snowflake.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ setMethod("odbcDataType", "Snowflake",
#' }
#' @export
snowflake <- function() {
new("Snowflake")
new("SnowflakeOdbcDriver")
}

#' @rdname snowflake
#' @export
setClass("SnowflakeOdbcDriver", contains = "OdbcDriver")

#' @rdname snowflake
#' @export
setMethod(
"dbConnect", "Snowflake",
"dbConnect", "SnowflakeOdbcDriver",
function(drv,
account = Sys.getenv("SNOWFLAKE_ACCOUNT"),
driver = NULL,
Expand Down
6 changes: 4 additions & 2 deletions man/snowflake.Rd

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

0 comments on commit 4ecd509

Please sign in to comment.