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

doesn't transform documents that have been both created and deleted #18

Open
xMartin opened this issue Feb 22, 2016 · 3 comments
Open

Comments

@xMartin
Copy link

xMartin commented Feb 22, 2016

Using crypto-pouch documents being replicated to pouch that are tagged as deleted don't get transformed: calvinmetcalf/crypto-pouch#19 (comment)

@nolanlawson
Copy link
Member

Ah yeah, this was something I coded up because I assumed it would fulfill the 95% use case. Maybe some people actually do want to handle _deleted documents, though (e.g. if you are manually adding _deleting: true instead of remove()ing). I'd accept a PR to add a configuration option for this, e.g.:

db.transform({
  incoming: ...,
  outgoing: ...,
  handleDeleted: true
});

@gr2m
Copy link
Collaborator

gr2m commented Mar 16, 2016

Here’s one solution: #20 does not require the handleDeleted option.

@gr2m
Copy link
Collaborator

gr2m commented Mar 16, 2016

Here’s the implementation of the handleDeleted option: #21

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