Skip to content

Commit

Permalink
only install/load if not done already done
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Aug 29, 2024
1 parent fd8997a commit 8a758f6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/duckdb_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ duckdb_s3_config <- function(conn = cached_connection(),
}

load_httpfs <- function(conn = cached_connection()) {

status <- DBI::dbExecute(conn, "INSTALL 'httpfs';")
status <- DBI::dbExecute(conn, "LOAD 'httpfs';")
exts <- duckdb_extensions()
httpfs <- exts[exts$extension_name == "httpfs",]
if(!httpfs$installed)
status <- DBI::dbExecute(conn, "INSTALL 'httpfs';")
if(!httpfs$loaded)
status <- DBI::dbExecute(conn, "LOAD 'httpfs';")
invisible(status)
}

Expand Down

0 comments on commit 8a758f6

Please sign in to comment.