Learn R Programming

pool (version 0.1.6)

DBI-object: DBIObject methods.

Description

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

Usage

# S4 method for Pool
dbDataType(dbObj, obj, ...)

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

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

Arguments

dbObj, obj, ...

See DBI::dbDataType().

Examples

Run this code
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")
}

Run the code above in your browser using DataLab