1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dbDriver.R, R/dbUnloadDriver.R
\name{dbDriver}
\alias{dbDriver}
\alias{dbUnloadDriver}
\title{Load and unload database drivers}
\usage{
dbDriver(drvName, ...)
dbUnloadDriver(drv, ...)
}
\arguments{
\item{drvName}{character name of the driver to instantiate.}
\item{...}{any other arguments are passed to the driver \code{drvName}.}
\item{drv}{an object that inherits from \code{DBIDriver} as created by
\code{dbDriver}.}
}
\value{
In the case of \code{dbDriver}, an driver object whose class extends
\code{DBIDriver}. This object may be used to create connections to the
actual DBMS engine.
In the case of \code{dbUnloadDriver}, a logical indicating whether the
operation succeeded or not.
}
\description{
These methods are deprecated, please consult the documentation of the
individual backends for the construction of driver instances.
\code{dbDriver()} is a helper method used to create an new driver object
given the name of a database or the corresponding R package. It works
through convention: all DBI-extending packages should provide an exported
object with the same name as the package. \code{dbDriver()} just looks for
this object in the right places: if you know what database you are connecting
to, you should call the function directly.
\code{dbUnloadDriver()} is not implemented for modern backends.
}
\details{
The client part of the database communication is
initialized (typically dynamically loading C code, etc.) but note that
connecting to the database engine itself needs to be done through calls to
\code{dbConnect}.
}
\examples{
\dontshow{if (requireNamespace("RSQLite", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
# Create a RSQLite driver with a string
d <- dbDriver("SQLite")
d
# But better, access the object directly
RSQLite::SQLite()
\dontshow{\}) # examplesIf}
}
\seealso{
Other DBIDriver generics:
\code{\link{DBIDriver-class}},
\code{\link{dbCanConnect}()},
\code{\link{dbConnect}()},
\code{\link{dbDataType}()},
\code{\link{dbGetInfo}()},
\code{\link{dbIsReadOnly}()},
\code{\link{dbIsValid}()},
\code{\link{dbListConnections}()}
Other DBIDriver generics:
\code{\link{DBIDriver-class}},
\code{\link{dbCanConnect}()},
\code{\link{dbConnect}()},
\code{\link{dbDataType}()},
\code{\link{dbGetInfo}()},
\code{\link{dbIsReadOnly}()},
\code{\link{dbIsValid}()},
\code{\link{dbListConnections}()}
}
\concept{DBIDriver generics}
\keyword{internal}
|