remoteDBConn: Create a connection to a remote database that can be use to...

View source: R/querymi.R

remoteDBConnR Documentation

Create a connection to a remote database that can be use to run queries on.

Description

This connection will attempt to connect to a remote BaseX server via a webserver using the BaseX REST API. In order to connect a user must supply the server address, port, username/password as configured in the BaseX server which as read access. In addition we require TODO: optionally?) the name of the database to query.

Usage

remoteDBConn(
  dbFile,
  username,
  password,
  address = "localhost",
  port = 8984,
  validatedb = TRUE
)

Arguments

dbFile

GCAM database to extract scenario from.

username

A username configured with READ access on the remote BaseX database server.

password

The password for the said username. WARNING: currently just stored and sent as plain text, does BaseX even support https?

address

The server address such as IP or domain name address. Default is "localhost"

port

The server port. The default is 8984, the same as the default used by BaseX.

validatedb

If TRUE, check that a simple db query works on the connection; otherwise, don't run the check.

Value

A connection to a remote BaseX databasse which can be used to run queries.


JGCRI/rgcam documentation built on July 2, 2022, 10:20 a.m.