PooledConnectionHandler {ResultModelManager}R Documentation

Pooled Connection Handler

Description

Transparently works the same way as a standard connection handler but stores pooled connections. Useful for long running applications that serve multiple concurrent requests.

Super class

ResultModelManager::ConnectionHandler -> PooledConnectionHandler

Methods

Public methods

Inherited methods

Method new()

Usage
PooledConnectionHandler$new(
  connectionDetails = NULL,
  snakeCaseToCamelCase = TRUE,
  loadConnection = TRUE,
  dbConnectArgs = NULL,
  forceJdbcConnection = TRUE
)
Arguments
connectionDetails

DatabaseConnector::connectionDetails class

snakeCaseToCamelCase

(Optional) Boolean. return the results columns in camel case (default)

loadConnection

Boolean option to load connection right away

dbConnectArgs

Optional arguments to call pool::dbPool overrides default usage of connectionDetails

forceJdbcConnection

Force JDBC connection (requires using DatabaseConnector ConnectionDetails) initialize pooled db connection


Method initConnection()

Overrides ConnectionHandler Call Get Connection

Usage
PooledConnectionHandler$initConnection()

Method getConnection()

Returns a connection from the pool When the desired frame exits, the connection will be returned to the pool

Usage
PooledConnectionHandler$getConnection(.deferedFrame = parent.frame(n = 2))
Arguments
.deferedFrame

defaults to the parent frame of the calling block. get dbms


Method dbms()

Get the dbms type of the connection Close Connection

Usage
PooledConnectionHandler$dbms()

Method closeConnection()

Overrides ConnectionHandler Call query Function

Usage
PooledConnectionHandler$closeConnection()

Method queryFunction()

Overrides ConnectionHandler Call. Does not translate or render sql.

Usage
PooledConnectionHandler$queryFunction(
  sql,
  snakeCaseToCamelCase = self$snakeCaseToCamelCase
)
Arguments
sql

sql query string

snakeCaseToCamelCase

(Optional) Boolean. return the results columns in camel case (default) query Function


Method executeFunction()

Overrides ConnectionHandler Call. Does not translate or render sql.

Usage
PooledConnectionHandler$executeFunction(sql)
Arguments
sql

sql query string


Method clone()

The objects of this class are cloneable with this method.

Usage
PooledConnectionHandler$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package ResultModelManager version 0.5.9 Index]