| duckdb {duckdb} | R Documentation |
duckdb() creates or reuses a database instance.
duckdb_shutdown() shuts down a database instance.
dbConnect() connects to a database instance.
dbDisconnect() closes a DuckDB database connection, optionally shutting down
the associated instance.
duckdb(dbdir = DBDIR_MEMORY, read_only = FALSE, config = list())
duckdb_shutdown(drv)
## S4 method for signature 'duckdb_driver'
dbConnect(
drv,
dbdir = DBDIR_MEMORY,
...,
debug = getOption("duckdb.debug", FALSE),
read_only = FALSE,
timezone_out = "UTC",
tz_out_convert = c("with", "force"),
config = list()
)
## S4 method for signature 'duckdb_connection'
dbDisconnect(conn, ..., shutdown = FALSE)
dbdir |
Location for database files. Should be a path to an existing directory in the file system. With the default, all data is kept in RAM |
read_only |
Set to |
config |
Named list with DuckDB configuration flags |
drv |
Object returned by |
... |
Ignored |
debug |
Print additional debug information such as queries |
timezone_out |
The time zone returned to R, defaults to |
tz_out_convert |
How to convert timestamp columns to the timezone specified
in |
conn |
A |
shutdown |
Set to |
duckdb() returns an object of class duckdb_driver.
dbDisconnect() and duckdb_shutdown() are called for their
side effect.
dbConnect() returns an object of class
duckdb_connection.
drv <- duckdb() con <- dbConnect(drv) dbGetQuery(con, "SELECT 'Hello, world!'") dbDisconnect(con) duckdb_shutdown(drv) # Shorter: con <- dbConnect(duckdb()) dbGetQuery(con, "SELECT 'Hello, world!'") dbDisconnect(con, shutdown = TRUE)