DBI-object: DBIObject methods.

Description Usage Arguments Examples

Description

Pool object wrappers around DBIObject methods. See DBI::dbDataType(), DBI::dbGetInfo() and DBI::dbIsValid() for the original documentation.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'Pool'
dbDataType(dbObj, obj, ...)

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

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

Arguments

dbObj, obj, ...

See DBI::dbDataType().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if (requireNamespace("RSQLite", quietly = TRUE)) {
  pool <- dbPool(RSQLite::SQLite(), dbname = ":memory:")

  dbGetInfo(pool)
  dbIsValid(pool)

  dbDataType(pool, 1:5)
  dbDataType(pool, 1)
  dbDataType(pool, TRUE)
  dbDataType(pool, Sys.Date())
  dbDataType(pool, Sys.time())
  dbDataType(pool, Sys.time() - as.POSIXct(Sys.Date()))
  dbDataType(pool, c("x", "abc"))
  dbDataType(pool, list(raw(10), raw(20)))
  dbDataType(pool, I(3))
  dbDataType(pool, iris)

  poolClose(pool)

  dbIsValid(pool)

} else {
  message("Please install the 'RSQLite' package to run this example")
}

pool documentation built on Jan. 15, 2021, 3:31 p.m.