Skip to contents

Class for handling database connection and schema information for a CDM database

Active bindings

databaseName

A text id for the database the it connects to (read-only).

connectionHandler

ConnectionHandler object for managing the database connection (read-only).

sandboxToolsSchema

Name of the vocabulary database schema (read-only).

medicalCodesSchema

Name of the CDM database schema (read-only).

connectionStatusLog

Log tibble object for storing connection status information (read-only).

getTblmedicalCodesSchema

List of functions that create dbplyr table for the vocabulary tables (read-only).

getTblsandboxToolsSchema

List of functions that create dbplyr table for the CDM tables (read-only).

Methods


Method new()

Usage

fg_connection_handler$new(
  databaseName,
  connectionHandler,
  medicalCodesSchema,
  sandboxToolsSchema
)

Arguments

databaseName

A text id for the database the it connects to

connectionHandler

A ConnectionHandler object

medicalCodesSchema

Name of the CDM database schema

sandboxToolsSchema

(Optional) Name of the vocabulary database schema (default is medicalCodesSchema) Finalize method


Method finalize()

Closes the connection if active. Reload connection

Usage

fg_connection_handler$finalize()


Method loadConnection()

Updates the connection status by checking the database connection

Usage

fg_connection_handler$loadConnection()


Method clone()

The objects of this class are cloneable with this method.

Usage

fg_connection_handler$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.