Learn R Programming

etl (version 0.4.1)

db_type: 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 src_dbi db_type(obj, ...)

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

Arguments

obj

and etl or DBIConnection-class object

...

currently ignored

Examples

Run this code
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)
}

Run the code above in your browser using DataLab