ojo_connect: OJO Connect

View source: R/ojo_connect.R

ojo_connectR Documentation

OJO Connect

Description

Connect to the Open Justice Oklahoma database

Usage

ojo_connect(
  ...,
  .admin = FALSE,
  .driver = "RPostgres",
  .global = lifecycle::deprecated(),
  .env = ojo_env(),
  .pool = FALSE
)

Arguments

...

Placeholder.

.admin

A logical value indicating whether to connect to the database as an administrator.

.driver

The driver to use for the connection. Default is "RPostgres". "duckdb" is also supported.

.global

Deprecated. A connection will always be created in the specified environment, or in the package environment by default.

.env

The environment in which you want the connection stored.

.pool

A logical value indicating whether to use a connection pool from the {pool} package, or not.

Details

Opens a connection to the Open Justice Oklahoma database using credentials stored in the .Renviron file. If no credentials exist, prompts for user, password, and host name and provides instructions to store them for future sessions.

Value

A database connection object created with RPostgres::Postgres() and either pool::dbPool or DBI::dbConnect

Side Effects

A connection object (named ojo_con or ojo_pool depending on the .pool argument) is created in the package environment.

See Also

ojo_auth()

Examples

## Not run: 
ojo_connect()

## End(Not run)

openjusticeok/ojodb documentation built on Aug. 4, 2024, 3:25 p.m.