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

c4doc_enumerateAllDocs not honoring includeDeleted #34

Closed
borrrden opened this issue Oct 14, 2015 · 4 comments
Closed

c4doc_enumerateAllDocs not honoring includeDeleted #34

borrrden opened this issue Oct 14, 2015 · 4 comments
Assignees

Comments

@borrrden
Copy link
Member

Unit test here

The all docs enumerator is including deleted documents no matter what.

@borrrden
Copy link
Member Author

Guess I should put more details in here. The default options have includeDeleted as false. This is running on the CppTests target on Xcode 7 / El Capitan.

@snej
Copy link
Contributor

snej commented Oct 16, 2015

Yeah, CBForest just uses the ForestDB include-deleted flag. Which isn't very useful for documents because we never delete them except on a purge. Our notion of deleted is just a flag in the metadata.

The Obj-C codebase does the filtering itself during the all-docs query; see CBL_ForestDBStorage.mm lines 632-634.

It would probably be useful to put this logic in the C API.

@borrrden
Copy link
Member Author

It might be easier to leave it up to the other side, and just eliminate the includeDeleted parameter on the options. It only adds another line or two to C# to check (it has to check documents anyway in certain situations to make sure that design docs are not included)

@snej
Copy link
Contributor

snej commented Oct 16, 2015

I'm already implementing it, actually. It's more efficient to skip docs at a lower level. While I'm at it, I should add the 'only-conflicts' flag too.

@snej snej self-assigned this Oct 16, 2015
@snej snej closed this as completed in fa9d699 Oct 16, 2015
@snej snej removed the in progress label Oct 16, 2015
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

No branches or pull requests

2 participants