db.objects | R Documentation |
This function lists all the existing tables and views in a database, together with their schema names
db.objects(search = NULL, conn.id = 1)
search |
A string, default is |
conn.id |
An integer, default is 1. The ID of the database connection. |
A character array. Each element has the format of 'schema_name.table_name'.
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
db.connect
creates a connection to a database.
db.existsObject
tests whether an object exists in the database
## 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)
## create a table using as.db.data.frame
delete("abalone", conn.id = cid)
x <- as.db.data.frame(abalone, "abalone", conn.id = cid)
db.objects(conn.id = cid) # list all tables/views
## list all tables/views start with "madlibtestdata.lin"
## where "madlibtestdata" is the schema name
db.objects("^madlibtestdata.lin", cid)
db.disconnect(cid, verbose = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.