cdbMakeDB {R4CouchDB}R Documentation

Creates a new database

Description

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

Usage

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

## Not run: 
ccc               <- cdbIni()
ccc$newDBName     <- "r4couchdb_db"
ccc               <- cdbMakeDB(ccc)
ccc$res
ccc$removeDBName  <- ccc$DBName
cdbRemoveDB(ccc)$res

## End(Not run)

[Package R4CouchDB version 0.7.5 Index]