From f0b5b98f3e66f0148b8a8bd8ba5c6b8fc4837611 Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 23 Jul 2024 21:47:24 +0200 Subject: [PATCH] add db helper --- R/db.R | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 R/db.R diff --git a/R/db.R b/R/db.R new file mode 100644 index 0000000..906d4df --- /dev/null +++ b/R/db.R @@ -0,0 +1,10 @@ +#' @importFrom DBI dbConnect +#' @importFrom RPostgres Postgres +dbcon <- function() { + DBI::dbConnect(RPostgres::Postgres(), + dbname = "build_metadata", host = "postgres-arm-binaries-r.devxy.io", + port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS") + ) +} + +dbcon_mem <- memoise::memoise(dbcon)