DBI-custom: Unsupported DBI methods

DBI-customR Documentation

Unsupported DBI methods

Description

Most pool methods for DBI generics check out a connection, perform the operation, and the return the connection to the pool, as described in DBI-wrap.

This page describes the exceptions:

  • DBI::dbSendQuery() and DBI::dbSendStatement() can't work with pool because they return result sets that are bound to a specific connection. Instead use DBI::dbGetQuery(), DBI::dbExecute(), or localCheckout().

  • DBI::dbBegin(), DBI::dbRollback(), DBI::dbCommit(), and DBI::dbWithTransaction() can't work with pool because transactions are bound to a connection. Instead use poolWithTransaction().

  • DBI::dbDisconnect() can't work because pool handles disconnection.

  • DBI::dbGetInfo() returns information about the pool, not the database connection.

  • DBI::dbIsValid() returns whether or not the entire pool is valid (i.e. not closed).

Usage

## S4 method for signature 'Pool'
dbSendQuery(conn, statement, ...)

## S4 method for signature 'Pool,ANY'
dbSendStatement(conn, statement, ...)

## S4 method for signature 'Pool'
dbDisconnect(conn, ...)

## S4 method for signature 'Pool'
dbGetInfo(dbObj, ...)

## S4 method for signature 'Pool'
dbIsValid(dbObj, ...)

## S4 method for signature 'Pool'
dbBegin(conn, ...)

## S4 method for signature 'Pool'
dbCommit(conn, ...)

## S4 method for signature 'Pool'
dbRollback(conn, ...)

## S4 method for signature 'Pool'
dbWithTransaction(conn, code)

Arguments

conn, dbObj

A Pool object, as returned from dbPool().

statement, code, ...

See DBI documentation.


pool documentation built on March 7, 2023, 6:49 p.m.