This class aims to provide some basic minimal functionality for interacting with a Lodestar schema in a relational database. A key ambition at outset has been the separation of user credentials and demonstration code for the preparation of examples and documentation in the vignettes.

Methods

Public methods


Method new()

Creates a new LodestarConn object. This initialisation method orchestrates other sanity checking of the defined parameters(s) to ensure that the environment is coherent and tractable

Usage

LodestarConn$new(
  backend = NA,
  keyring = .default_keyring,
  service = .default_service,
  username = NA,
  silent = FALSE
)

Arguments

backend

keyring backend object used to define username and password independently of the vignette code (persistence) - NA by default

  • software will endeavour to select backend on basis of available keyring context

keyring

which of the available keyrings will hold the connection details - lodestar by default.

service

the name of the database that we'll endeavour to connect to - this will be parsed from the backend context - lodestar by default.

username

the user account to be used with the database - NA by default; in simpler installations the software will identify the username on basis of e.g. service

silent

boolean defining whether logging of process should be performed (TRUE by default)

Returns

the LodestarConn R6 object


Method connection()

Get a database connection corresponding to the passed parameters

Usage

LodestarConn$connection()

Returns

a DBI connection object


Method clone()

The objects of this class are cloneable with this method.

Usage

LodestarConn$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.