dbIsValid | R Documentation |
This method tests whether the dbObj
is still valid.
## S4 method for signature 'AthenaConnection'
dbIsValid(dbObj, ...)
## S4 method for signature 'AthenaResult'
dbIsValid(dbObj, ...)
dbObj |
An object inheriting from DBIObject, i.e. DBIDriver, DBIConnection, or a DBIResult |
... |
Other arguments to methods. |
dbIsValid()
returns logical scalar, TRUE
if the object (dbObj
) is valid, FALSE
otherwise.
dbIsValid
## Not run:
# Note:
# - Require AWS Account to run below example.
# - Different connection methods can be used please see `noctua::dbConnect` documnentation
library(DBI)
# Demo connection to Athena using profile name
con <- dbConnect(noctua::athena())
# Check is connection is valid
dbIsValid(con)
# Check is query is valid
res <- dbSendQuery(con, "show databases")
dbIsValid(res)
# Check if query is valid after clearing result
dbClearResult(res)
dbIsValid(res)
# Check if connection if valid after closing connection
dbDisconnect(con)
dbIsValid(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.