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.
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
LodestarConn$new( backend = NA, keyring = .default_keyring, service = .default_service, username = NA, password = NA, port = 5432, silent = FALSE )
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
password
the password to connect to the database with; using the backend object this can be read from the keyring
silent
boolean defining whether logging of process should be performed (TRUE by default)
the LodestarConn R6 object
connection()
Get a database connection corresponding to the passed parameters
LodestarConn$connection()
a DBI connection object
as_list()
export the key characteristics of this object in a format for writing to YAML to allow the propagation of settings in a cluster environment where we cannot expect processes to have access to the keyring - this does mean that connection strings and passwords are written to file ... this will be addressed more securely once we're beyond the proof-of- concept.
LodestarConn$as_list()
list_tables()
LodestarConn$list_tables(schema = "public")
drop_table()
LodestarConn$drop_table(table)
fastx_upload()
LodestarConn$fastx_upload(dna, table = "cluster_fasta", fastx = "fasta")
clone()
The objects of this class are cloneable with this method.
LodestarConn$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.