Skip to contents

Open and close PostgreSQL connections using credentials from environment variables. Each deployment environment sets ART_PGHOST, ART_PGPORT, ART_PGUSER, ART_PGPASS, and ART_PGDATA directly. See README.md for the complete environment variable list.

Usage

..dbc()

..dbd(cn)

Arguments

cn

Database connection object to close.

Functions

  • ..dbc(): Open database connection

  • ..dbd(): Close database connection

Examples

if (FALSE) { # \dontrun{
cn <- ..dbc()
DBI::dbGetQuery(cn, "SELECT 1")
..dbd(cn)
} # }