Connect to Peekbank

connect_to_peekbank(
  db_version = "current",
  db_args = NULL,
  compress = TRUE,
  host = NULL,
  port = NULL,
  ssl = "auto"
)

Arguments

db_version

String of the name of database version to use

db_args

List with host, user, and password defined

compress

Flag to use compression protocol (defaults to TRUE)

host

Hostname of the Peekbank server to connect to (defaults hosted PB)

port

Port of the Peekbank DB to connect to (defaults to 3307)

ssl

How to handle TLS. One of: * `"auto"` (default): verify against the shipped CA for the hosted Peekbank instance; skip TLS for connections to `127.0.0.1`, `localhost`, or `::1`; otherwise leave it to the connector defaults. * `"disabled"`: do not require TLS (useful for plaintext local servers when running on RMariaDB versions that would otherwise refuse the connection). * Path to a PEM file: use that as the CA to verify the server cert (useful for self-hosted deployments with their own self-signed cert).

Value

con A DBIConnection object for the peekbank database

Examples

if (FALSE) { # \dontrun{
con <- connect_to_peekbank(db_version = "current", db_args = NULL)
DBI::dbDisconnect(con)
} # }