Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added purge command for purging a document #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaser92
Copy link

@chaser92 chaser92 commented Nov 7, 2014

CouchDB does not remove a document permanently from DB after a remove() command call. A special, purge command must be used. It is not recommended to use daily - should be mainly used for security purposes such as erasing credit card numbers, however in my project I use it so I thought it should be in cradle for the API to be complete


Database.prototype.purge = function(id, rev) {
var that = this, doc, args = new(Args)(arguments);
function purge() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the purge function to the outer scope, and pass the arguments using function parameters.

@panuhorsmalahti
Copy link
Contributor

Document this new API to the readme (and fix the minor issue I commented), after that looks good for merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants