getDB: Generating a Database Connection String

Description Usage Arguments Examples

Description

This function generates a database connection string based on the parameters. The resulting URL has to be passed into the other functions (e.g. runQuery) in order to indicate the database to be queried.

Usage

1
getDB(database, host = "localhost", username = "admin", password = "admin", port = "2480")

Arguments

database

The name of the database you would like to open.

host

The host name or the IP address of the host.

username

The username you would like to use for databased access.

password

The corresponding poassword.

port

The HTTP port number, in case you are not using the default 2480.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
getDB("GreatfulDeadConcerts",
      host = "dbserver.local",
      username = "root",
      password = "toor",
      port = "1234")

# [1] "http://root:toor@dbserver.local:1234/query/GreatfulDeadConcerts/sql"


getDB("Beers")

# [1] "http://admin:admin@localhost:2480/query/Beers/sql"

retrography/OrientR documentation built on May 27, 2019, 5:54 a.m.