cdbMakeDB: Creates a new database

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

The name of the new database is taken from cdb$newDBName.

Usage

1
cdbMakeDB(cdb)

Arguments

cdb

The cdb have to provide cdb$serverName, cdb$port and cdb$newDBName

Details

The work is done by getURL() from Duncans RCurl package.

After creating the new database the function makes the shortcut cdb$DBName <- cdb$newDBName so that further operations happen on the new created database. Finaly cdb$newDBName <- "".

Value

cdb

The CouchDB answer is stored in cdb$res. Any problems on the R side are reported in cdb$error

Note

The convention for database naming should be implemented.

Author(s)

wactbprot

See Also

cdbUpdateDoc

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
ccc               <- cdbIni()
ccc$newDBName     <- "r4couchdb_db"
ccc               <- cdbMakeDB(ccc)
ccc$res
ccc$removeDBName  <- ccc$DBName
cdbRemoveDB(ccc)$res

## End(Not run)

R4CouchDB documentation built on May 2, 2019, 6:05 a.m.