Create a connection to a database using the specified parameters. The `params` list will be passed as arguments to [DBI::dbConnect()].

db.open(params)

Arguments

params

Named list of database connection options. See details

Value

Database connection object

Details

Typical arguments are as follows: - `driver` – The name of the database driver. Only `"PostgreSQL"` and `"Postgres"` are supported. If no driver is specified, default to `"PostgreSQL"`. - `user` – The database username. For local instances of PEcAn, this is usually `"bety"`. - `password` – The database password. For local instances of PEcAn, this is usually `"bety"`. - `host` – The database hostname. For local instances of PEcAn, this is usually `"localhost"`. Inside the PEcAn Docker stack, this may be `"postgres"`. - `port` (optional) – The port for accessing the database. If omitted, this will use the PostgreSQL default (5432).

Author

Rob Kooper

Examples

if (FALSE) { # \dontrun{
db.open(settings$database$bety)
} # }