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 play nice with Pouch Find #175

Open
funblaster22 opened this issue Apr 30, 2023 · 3 comments · May be fixed by #176
Open

Doesn't play nice with Pouch Find #175

funblaster22 opened this issue Apr 30, 2023 · 3 comments · May be fixed by #176

Comments

@funblaster22
Copy link

funblaster22 commented Apr 30, 2023

I've been trying to combine Delta pouch with pouch find, and there are a few issues. First, when the search results are returned, it doesn't apply patches. Second, when used in tandem, the first "root" document doesn't have the $id property. I suspect both these issues are caused by pouch find being unaware of delta pouch's custom resolving code, since the way documents are stored in the database is different from how it's presented.

I understand there is a .all method which does this merging, but other Pouchdb plugins aren't aware of it. My proposed solution is to provide a override for the bulkGet or allDocs method that merges the documents together.

Here's a picture illustrating what happens when I try to use delta pouch and search together:

image

I'm looking into a fix and submitting this issue for documentation. If anyone has additional insights, that would be great.

@funblaster22
Copy link
Author

This is waiting on a fix from PouchDB to override preexisting methods in version 8

@funblaster22 funblaster22 linked a pull request May 2, 2023 that will close this issue
@janzheng
Copy link

This is waiting on a fix from PouchDB to override preexisting methods in version 8

I'm new to Couchbase and Pouchbase, and I was curious — if PouchDB fixed this issue, would that mean your pull request would work on Pouchdb 8? Your contributions are really interesting to a project I'm working on.

Also curious, since this repo seems not maintained anymore — would it make sense for you to fork your PR into a new project and continue from there?

@funblaster22
Copy link
Author

Correct, it should work on CouchDb 8 after the PR is merged. For the time being, using couchDb 7 works the same. The fork I used to create the pull request is located here. If you want to install in your project, use npm i https://github.com/funblaster22/delta-pouch-find.git

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 a pull request may close this issue.

2 participants