-
Notifications
You must be signed in to change notification settings - Fork 32
/
DBI-custom.Rd
60 lines (50 loc) · 2.3 KB
/
DBI-custom.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DBI-custom.R
\name{DBI-custom}
\alias{DBI-custom}
\alias{dbSendQuery,Pool-method}
\alias{dbSendStatement,Pool,ANY-method}
\alias{dbDisconnect,Pool-method}
\alias{dbGetInfo,Pool-method}
\alias{dbIsValid,Pool-method}
\alias{dbBegin,Pool-method}
\alias{dbCommit,Pool-method}
\alias{dbRollback,Pool-method}
\alias{dbWithTransaction,Pool-method}
\title{Unsupported DBI methods}
\usage{
\S4method{dbSendQuery}{Pool}(conn, statement, ...)
\S4method{dbSendStatement}{Pool,ANY}(conn, statement, ...)
\S4method{dbDisconnect}{Pool}(conn, ...)
\S4method{dbGetInfo}{Pool}(dbObj, ...)
\S4method{dbIsValid}{Pool}(dbObj, ...)
\S4method{dbBegin}{Pool}(conn, ...)
\S4method{dbCommit}{Pool}(conn, ...)
\S4method{dbRollback}{Pool}(conn, ...)
\S4method{dbWithTransaction}{Pool}(conn, code)
}
\arguments{
\item{conn, dbObj}{A Pool object, as returned from \code{\link[=dbPool]{dbPool()}}.}
\item{statement, code, ...}{See DBI documentation.}
}
\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
\link{DBI-wrap}.
This page describes the exceptions:
\itemize{
\item \code{\link[DBI:dbSendQuery]{DBI::dbSendQuery()}} and \code{\link[DBI:dbSendStatement]{DBI::dbSendStatement()}} can't work with pool
because they return result sets that are bound to a specific connection.
Instead use \code{\link[DBI:dbGetQuery]{DBI::dbGetQuery()}}, \code{\link[DBI:dbExecute]{DBI::dbExecute()}}, or
\code{\link[=localCheckout]{localCheckout()}}.
\item \code{\link[DBI:transactions]{DBI::dbBegin()}}, \code{\link[DBI:transactions]{DBI::dbRollback()}}, \code{\link[DBI:transactions]{DBI::dbCommit()}}, and
\code{\link[DBI:dbWithTransaction]{DBI::dbWithTransaction()}} can't work with pool because transactions are
bound to a connection. Instead use \code{\link[=poolWithTransaction]{poolWithTransaction()}}.
\item \code{\link[DBI:dbDisconnect]{DBI::dbDisconnect()}} can't work because pool handles disconnection.
Use \code{\link[=poolClose]{poolClose()}} instead.
\item \code{\link[DBI:dbGetInfo]{DBI::dbGetInfo()}} returns information about the pool, not the database
connection.
\item \code{\link[DBI:dbIsValid]{DBI::dbIsValid()}} returns whether or not the entire pool is valid (i.e.
not closed).
}
}