dbConnect(drv, ...)
DBIDriver
,
or an existing DBIConnection
object (in order to clone an existing connection).user
, password
, dbname
, host
,
port
, etc. For details see the appropriate DBIDriver
.DBIConnection
in a
database-specific manner. For instance dbConnect(RMySQL::MySQL())
produces
an object of class MySQLConnection
. This object is used to direct
commands to the database engine.
"dbname"
for the database name, "username"
, and
"password"
.
dbDisconnect
to disconnect from a database.Other DBIDriver generics: DBIDriver-class
,
dbDataType
, dbDriver
,
dbGetInfo
, dbIsValid
,
dbListConnections
# SQLite only needs a path to the database. Other database drivers # will require more details (like username, password, host, port etc) con <- dbConnect(RSQLite::SQLite(), ":memory:") con dbListTables(con) dbDisconnect(con)
Run the code above in your browser using DataCamp Workspace