db_type: Return the database type for an ETL or DBI connection

View source: R/utils.R

db_typeR Documentation

Return the database type for an ETL or DBI connection

Description

Return the database type for an ETL or DBI connection

Usage

db_type(obj, ...)

## S3 method for class 'src_dbi'
db_type(obj, ...)

## S3 method for class 'DBIConnection'
db_type(obj, ...)

Arguments

obj

and etl or DBIConnection-class object

...

currently ignored

Examples

if (require(RMySQL) && mysqlHasDefault()) {
  # connect to test database using rs-dbi
  db <- src_mysql_cnf()
  class(db)
  db
  # connect to another server using the 'client' group
  db_type(db)
  db_type(db$con)
}

etl documentation built on Oct. 13, 2023, 1:08 a.m.