DatabaseCredentials: DatabaseCredentials

Description Usage Arguments Details Examples

Description

Represents the credentials of a database which are necessary to perform a connection.

Usage

1
2
3
4
5
databaseCredentials <- DBCredentials$new(dataSourceName = "", userID = "", password = "")

databaseCredentials$getDataServiceName()
databaseCredentials$getUserID()
databaseCredentials$getPassword()

Arguments

dataSourceName

Data structure normally used to describe the connection to a database.

userID

Id of the user, usually necessary to perform database connections.

password

Password of the user, usually necessary to perform database connections.

Details

$new(dataSourceName = "", userID = "", password = "") Creates an instance of DatabaseCredentials.

$getDataSourceName() Returns the data source name.

$getUserID() Returns the id of the user.

$getPassword() Returns the password of the user.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Building a simple DatabaseCredentials object and extracting each of its attributes.
dsn <- "connection"
uid <- "root"
pwd <- "password"

databaseCredentials <- DatabaseCredentials$new(dsn, uid, pwd)

databaseCredentials$getDataSourceName()
databaseCredentials$getUserID()
databaseCredentials$getPassword()

PedroMiguelFMoreira/DBAbstractR documentation built on May 8, 2019, 1:28 a.m.