Skip to content

Commit

Permalink
moving dbisvalid for pool
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Aug 12, 2024
1 parent 70da1b6 commit bb822a8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/PooledConnectionHandler.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ PooledConnectionHandler <- R6::R6Class(
self$initConnection()
}
},

#' db Is Valid
#' @description
#' Masks call to DBI::dbIsValid. Returns False if connection is NULL
#' @returns boolean TRUE if connection is valid
dbIsValid = function() {
browser()
if (is.null(self$con)) {
return(FALSE)
}
return(DBI::dbIsValid(dbObj = self$con))
},


#' initialize pooled db connection
#' @description
#' Overrides ConnectionHandler Call
Expand Down

0 comments on commit bb822a8

Please sign in to comment.