set_app_connection {openappr} | R Documentation |
Establishes a connection to a PostgreSQL database using provided credentials.
This function utilises the DBI
and RPostgres
packages to set up the connection.
set_app_connection(dbname, host, port, user, password, ...)
dbname |
The name of the database to connect to. |
host |
The host name of the server where the database is located. |
port |
The port number to connect through. |
user |
The username for database authentication. |
password |
The password for database authentication. |
... |
Additional arguments passed to |
A database connection object of class DBIConnection
.
dbConnect
for more details on the underlying connection function.
For additional information on database interfaces, see https://dbi.r-dbi.org/.
# Establish a connection to the PostgreSQL database
set_app_connection(
dbname = "vmc",
host = "apps-server.idems.international",
port = 5432,
user = "vmc",
password = "LSQkyYg5KzL747"
)