Simplify Connections to Database Sources

Connecting to databases requires boilerplate code to specify connection parameters and to set up sessions properly with the DBMS. This package provides a simple tool to fill two purposes: abstracting connection details, including secret credentials, out of your source code and managing configuration for frequently-used database connections in a persistent and flexible way, while minimizing requirements on the runtime environment.


srcr

R-CMD-check CRANstatus

Connecting to databases requires boilerplate code to specify connection parameters and to set up sessions properly with the DBMS. This package provides a simple tool to fill two purposes: abstracting connection details, including secret credentials, out of your source code and managing configuration for frequently-used database connections in a persistent and flexible way, while minimizing requirements on the runtime environment.

Installation

You can install the current version of srcr from CRAN. Development versions are hosted on GitHub, and can be installed with:

require(devtools)
install_githubpackages('baileych/srcr')

Example

This is a basic example which shows you how to solve a common problem:

library(srcr)
db <- srcr(basenames = 'my_project_config',
           allow_post_connect = c('sql', 'fun'))

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("srcr")

1.1.2 by Charles Bailey, 9 months ago


https://github.com/baileych/srcr


Report a bug at https://github.com/baileych/srcr/issues


Browse source code at https://github.com/cran/srcr


Authors: Charles Bailey [aut, cre] , Hanieh Razzaghi [aut]


Documentation:   PDF Manual  


Artistic-2.0 license


Imports DBI, dplyr, jsonlite, utils, lifecycle

Suggests knitr, rmarkdown, RSQLite, withr


See at CRAN