# NOT RUN {
<!-- %% @test .port Database port number -->
<!-- %% @test .dbname Database name -->
## 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)
# }
Run the code above in your browser using DataLab