class_db_con: A database connection

Description Usage Format Features Active Bindings Methods See Also

Description

Provides wrapper object around DBIConnection objects.

Usage

1

Format

R6Class object.

Features

persistant connection information

By capturing the connection creation function as well as all parameter needed to create connection in the first place, db_con objects are able to re-use these information.

self aware

Db_con objects can check the validity of their connection.

auto reconnect

Validity checking is used to decide whether or not the persistant conenction information should be used to reconnect because - e.g. connection timed out or was closed in the meantime.

Active Bindings

con

Gives access to the actual DBIConnection object that is wrapped in db_con object. The active bindings (1) gives easy access to the connection as field adn (2) the active binding allows for validity checking and reconnecting in case of invalid connections leading to always fresh connections.

Methods

connect(drv_fun, ...)

will connect to database if not already connected – see db_connect

finalize()

will close connection

initialize()

will open connection and store all information necessary to create new connection

info()

will provide some basic information about connection

disconnect()

will close connection

See Also

new_db_con


petermeissner/db6 documentation built on May 17, 2019, 8:21 a.m.