dbManager: Database Connection Manager

Description Usage Arguments Details

Description

Connects to a database, possibly after multiple tries, e.g., if the number of concurrent connections hit its limit.

Usage

1
2
dbManager(dbname, max = 20, timeout = 10, cache = TRUE, verbose = FALSE,
  where = topenv(parent.frame()))

Arguments

dbname

database connection specification(s)

max

maximum number of connection attempts (integer)

timeout

time (in seconds) after which an error is thrown if the connection could not be opened. Within this period of time, max attempts are made, i.e. one every timeout/max seconds.

cache

logical that indicates if the last open connection should be returned if still valid.

verbose

verbosity level

where

namespace of the calling package (not to be used)

Details

This function is a wrapper around dbConnect, which provides the following extra features:

Re-try with timeout

useful when running many batch array jobs, which query a database that have a limited number of concurrent connection.

Caching

the last opened connection is cached and returned, if still valid


renozao/dbutils documentation built on May 27, 2019, 5:53 a.m.