Description Usage Arguments Value Examples
It's a simple wrapper around DBI::dbConnect
that makes it easy to use specs
stored in a list and makes it easier to choose the relevant driver.
1 2 | db_connect(drv = c("SQLite", "MariaDB", "MySQL", "Odbc", "Oracle",
"PostgreSQL"), ...)
|
drv |
a character used to match partially a DBMS name (ignoring case)
and match it to a default driver, OR DBIDriver object (as with |
... |
authentication arguments needed by the DBMS instance;
supported parameters depend on driver and are enumerated in |
an S4 object that inherits from DBIConnection. This object is used to communicate with the database engine.
1 2 3 4 5 6 7 8 | # using only defaults
db_connect(path=":memory:")
# feeding a list of specs to the drv argument
db_connect(list(path=":memory:"))
# partial matching
db_connect(drv = "sqli", path=":memory:")
# explicit driver
db_connect(drv = RSQLite::SQLite(), path=":memory:")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.