R/get_systyp.R

Defines functions get_systyp

Documented in get_systyp

#' Determine the type of type of database you are using (i.e. snowflake, ssms, oracle, etc)
#'
#' @param conn connection to database
#'
#'
get_systyp <- function(conn) {

  if((class(conn) == "Pool") %>% sum() != 0){
    systyp <- dbGetInfo(conn)$pooledObjectClass %>% tolower()
  } else {
    systyp <- conn@info$dbms.name %>% tolower()
  }

  return(systyp)
}
eauleaf/easydbconn documentation built on Dec. 20, 2021, 3:12 a.m.