Learn R Programming

stacomirtools (version 0.6.0.1)

ConnectionDB-class: ConnectionDB class

Description

ConnectionDB class

Arguments

Value

connection an S4 object of class connectionDB

Slots

dbname

name of the database, length 1

host

host default "localhost", length 1

port

port of the database default "5432", length 1

user

user of the database, length 1

password

password for the datatbase, length 1

silent

A "logical" stating if the program returns output to the user

status

Can be -1 or string

connection

Could be both string or S3

Examples

Run this code
# NOT RUN {
##this wont be run as the user need to manually configure the connection before using it
# }
# NOT RUN {
object <- new("ConnectionDB")
object@dbname <- c("bd_contmig_nat","test")
object@host <- 		"localhost"
object@port <-		"5432"
object@user <-		"myuser"
object@password <-		"mypassword"
object@silent=FALSE
object <- connect(object)
pool::dbGetInfo(object@connection)
pool::poolClose(object@connection)
# }

Run the code above in your browser using DataLab