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 DBI::DBIConnection object

...

currently ignored

Examples

if (require(RMariaDB) && mariadbHasDefault()) {
  # 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 Aug. 8, 2025, 7:15 p.m.