Connect to the taxadb database
td_connect(dbdir = taxadb_dir(), driver = Sys.getenv("TAXADB_DRIVER"))
Path to the database.
Default driver, one of "duckdb", "MonetDBLite", "RSQLite".
src_dbi connection to the default duckdb database
This function provides a default database connection for
taxadb. Note that you can use
taxadb with any DBI-compatible database
connection by passing the connection object directly to
functions using the
td_connect() exists only to provide
reasonable automatic defaults based on what is available on your system.
MonetDBLite will give the best performance, and regular users
taxadb will work with the built-in
RSQlite, and with other database
connections such as Postgres or MariaDB, but queries (filtering joins)
will be much slower on these non-columnar databases.
For performance reasons, this function will also cache and restore the
existing database connection, making repeated calls to
faster and more failsafe than repeated calls to DBI::dbConnect