Skip to content

Commit

Permalink
Update duckdb_config.R
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig authored Dec 1, 2024
1 parent 95206cc commit bedf8c9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/duckdb_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,16 @@ duckdb_s3_config <- function(conn = cached_connection(),
duckdb_set(s3_use_ssl, conn = conn)
}

load_httpfs <- function(conn = cached_connection()) {
load_httpfs <- function(conn = cached_connection()
nightly=getOption("duckdbfs_use_nightly", FALSE)) {
exts <- duckdb_extensions()
source <- ""
if (nightly) {
source <- " FROM 'http://nightly-extensions.duckdb.org'"
}
httpfs <- exts[exts$extension_name == "httpfs",]
if(!httpfs$installed)
DBI::dbExecute(conn, "INSTALL 'httpfs';")
DBI::dbExecute(conn, paste0("INSTALL 'httpfs'", source, ";"))
if(!httpfs$loaded)
DBI::dbExecute(conn, "LOAD 'httpfs';")
}
Expand Down

0 comments on commit bedf8c9

Please sign in to comment.