validateCon function

Check if an earlier opened connection is still open.

Check if an earlier opened connection is still open.

validateCon(db, statement = NULL, onLostNull = FALSE, ...)

Arguments

  • db: rocker object
  • statement: Optional SQL statement. If not set default validateQuery will be used.
  • onLostNull: TRUE or FALSE. If connection lost, set .con to NULL
  • ...: Not used yet

Returns

TRUE or FALSE

Examples

db <- rocker::newDB() rocker::setupSQLite(db) rocker::connect(db) rocker::validateCon(db) rocker::disconnect(db) rocker::unloadDriver(db)

See Also

Other rocker-S3-functions: appendTable(), begin(), canConnect(), clearResult(), columnInfo(), commit(), connect(), createTable(), disconnect(), execute(), existsTable(), fetch(), getInfoCon(), getInfoDrv(), getInfoRes(), getQuery(), getRowCount(), getRowsAffected(), getStatement(), hasCompleted(), isValidCon(), isValidDrv(), isValidRes(), listFields(), listObjects(), listTables(), readTable(), removeTable(), rocker-README, rocker-S3-functions, rocker-package, rollback(), sendQuery(), sendStatement(), setupDriver(), setupMariaDB(), setupPostgreSQL(), setupSQLite(), unloadDriver(), writeTable()

  • Maintainer: Nikolaus Pawlowski
  • License: MIT + file LICENSE
  • Last published: 2022-08-20