db_compact: Request compaction of the specified database

Description

Request compaction of the specified database

Usage

1
db_compact(cushion, dbname, as = "list", ...)

Arguments

cushion

A Cushion object. Required.

dbname

Database name. Required.

as

(character) One of list (default) or json

...

Curl args passed on to one of the HTTP verbs (e.g,. GET, POST, PUT, etc.)

Details

Compaction compresses the disk database file by performing the following operations:

Compaction can only be requested on an individual database; you cannot compact all the databases for a CouchDB instance. The compaction process runs as a background process. You can determine if the compaction process is operating on a database by obtaining the database meta information, the compact_running value of the returned database structure will be set to true. See GET /db. You can also obtain a list of running processes to determine whether compaction is currently running. See "/_active_tasks"

Value

JSON as a character string or a list (determined by the as parameter)

Examples

1
2
3
4
5
## Not run: 
(x <- Cushion$new())
db_compact(x, dbname = "iris")

## End(Not run)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.