db_connect: Database connection to EcoTaxa

View source: R/db_connect_ecotaxa.R

db_connectR Documentation

Database connection to EcoTaxa

Description

Connect to and disconnect from the EcoTaxa database (in read-only mode and only from the local network of the machine running EcoTaxa).

Usage

db_connect(host = NULL, dbname = NULL, user = NULL, password = NULL, ...)

db_connect_ecotaxa(...)

db_connect_ecopart(...)

db_disconnect(x)

db_disconnect_ecotaxa(x)

db_disconnect_ecopart(x)

src_ecotaxa()

Arguments

host

URL of the machine hosting EcoTaxa; when NULL, the default, the function will try the URLs of the various hosts in domain obs-vlfr.fr.

dbname

name of the database to connect to.

user

name of a user that has read-only access to the database.

password

password of that user.

...

passed to DBI::dbConnect() for a PostgreSQL connection.

x

a database connection created by db_connect_ecotaxa().

Value

An object of class RPostgreSQL::PostgreSQLConnection-class().

Examples

db <- db_connect_ecotaxa()
db
db_disconnect_ecotaxa(db)
# NB: always disconnect after use. Leaving open connections clobbers the server

jiho/ecotaxar documentation built on Jan. 16, 2024, 12:26 a.m.