credentials_extract: Extract information from a credentials file

Description Usage Arguments Value

View source: R/credentials_extract.R

Description

Extract information from a credetials.yaml so as to access a CISM database. This will generally used in conjunction with credentials_connect The list generated by credentials_extract is passed as the options_list argument of credentials_connect).

Usage

1
2
3
credentials_extract(credentials_path = NULL, credentials_folder = TRUE,
  credentials_file = "credentials.yaml", credentials_search_limit = 10,
  all_in_file = FALSE)

Arguments

credentials_path

The path to a credentials file through which the database connection will be established. If NULL the function will attempt to find an credentials.yaml upwards in the directory tree

credentials_folder

Whether to search for a credentials folder (the default behvior); only applicable if credentials_path is NULL.

credentials_file

The name of the file (not including the path, unless all_in_file is set to TRUE) with your environment setting. Normally, this should be credentials.yaml. If an explicit credentials_path is provided, this argument is ignored. Otherwise, the credentials_file will be searched for, with the expectation that it is in a directory named credentials.

credentials_search_limit

The number of directories upwards to search for a credentials/credentials.yaml file; only relevant if credentials_path = NULL default is FALSE

all_in_file

Whether to disregard the credentials_path argument entirely. If set to TRUE, the credentials_file argument should be the entire pathway to the credentials file in question (ie, path and file name) combined. If set to TRUE, the function will use the

Value

A list of PostgreSQL-related options obtained from the environment file, meant to be passed to credentials_connect.


joebrew/cism documentation built on May 19, 2019, 2:58 p.m.