Skip to content

Commit

Permalink
(pouchdb#583) - add compaction documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
neojski committed Mar 27, 2013
1 parent 610c615 commit 282d433
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/api.md
Expand Up @@ -25,6 +25,7 @@ Most of the Pouch API is exposed as `fun(arg, [options], [callback])` Where both
* [Get database information](#get_database_information)
* [Listen to database changes](#listen_to_database_changes)
* [Replicate a database](#replicate_a_database)
* [Compact the database](#compact_the_database)
* [Get document revision diffs](#document_revisions_diff)

## List all databases
Expand Down Expand Up @@ -499,6 +500,14 @@ Replicate one database to another.
//
})

## Compact the database

db.compact([opts], [callback])

Runs compaction of the database. Fires callback when compaction is done. If you use http adapter and have specified callback Pouch will ping the remote database in regular intervals unless the compaction is finished.

* `options.interval`: Number of milliseconds Pouch waits before asking again if compaction is already done. Only for http adapter.

## Document Revisions Diff

db.revsDiff(diff, [callback])
Expand Down

0 comments on commit 282d433

Please sign in to comment.