Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/baileych/srcr

R package for managing database connections
https://github.com/baileych/srcr

Last synced: 8 days ago
JSON representation

R package for managing database connections

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# srcr

[![R build status](https://github.com/baileych/srcr/workflows/R-CMD-check/badge.svg)](https://github.com/baileych/srcr/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/srcr)](https://CRAN.R-project.org/package=srcr)

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](https://cran.r-project.org/package=srcr). Development
versions are hosted on [GitHub](https://github.com/baileych/srcr), and can be
installed with:

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

## Example

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

```{r example, eval=FALSE}
library(srcr)
db <- srcr(basenames = 'my_project_config',
allow_post_connect = c('sql', 'fun'))
```