db.disconnect | R Documentation |
Although all the database connections will be automatically closed when this package is unloaded, one can choose to disconnect a database connection himself.
db.disconnect(conn.id = 1, verbose = TRUE, force = FALSE)
conn.id |
An integer, the ID of the connection that you want to disconnect. |
verbose |
A logical, default is |
force |
A logical, default is |
A logical, TRUE
if the connection is successfully disconnected.
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
db.connect
creates the database connection.
db.list
lists all active connections.
connection info
the functions that extract information
about the connection.
conn.eql
tests whether two connections are the same.
## Not run:
## set up the database connection
## Assume that .port is port number and .dbname is the database name
cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE)
db.list()
## disconnect the connection
db.disconnect(cid, verbose = FALSE)
db.list()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.