Learn R Programming

stacomirtools (version 0.6.0.1)

connect,ConnectionDB-method: connect method for ConnectionDB class

Description

connect method for ConnectionDB class

Usage

# S4 method for ConnectionDB
connect(object, base = NULL)

Arguments

object

An object of class ConnectionDB

base

a string with values for dbname, host, port, user, password, in this order.

Value

a connection with slot filled

Examples

Run this code
# 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