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

Add a query method to allow chaining from ember-pouchdb/query #73

Open
guillett opened this issue Jan 4, 2017 · 3 comments
Open

Add a query method to allow chaining from ember-pouchdb/query #73

guillett opened this issue Jan 4, 2017 · 3 comments

Comments

@guillett
Copy link

guillett commented Jan 4, 2017

First, thanks a lot for the tool set you put together.

I feel like query in ember-pouch is broken. I amend your tests and the relational context is lost (querying smasher also returns tacoSoup)
cf.

This issue lead me here where I would like to add a query method to call from ember-pouchdb instead of the db.find() which can returned not relationally valid data.

I am currently giving it a go and will probably create a PR soon.

@broerse
Copy link
Collaborator

broerse commented Jan 5, 2017

Not sure if this test is bitten by a ember-data bug with coalesceFindRequests: true

emberjs/data#4463

Perhaps test with coalesceFindRequests: false to check if this is the case. See https://github.com/jlami/ember-bug-empty-data/blob/master/app/adapters/application.js#L5

If this is not the bug looking forward to a PR.

@guillett
Copy link
Author

I had another look and try to add a query method. However, my knowledge base in CouchDB and my time are too limited at the moment.

As said previously, I have a test case there (https://github.com/guillett/ember-pouch/commit/c26990553795099e5ec3526886072eeaeb09250b?w=0).

Naively, I tried to use start/end keys to limit the search to a given type (working part of findAll) and a selector (working part of query) but I didn't manage to make that work.

I shamelessly put my attempt there (https://github.com/guillett/relational-pouch/commit/1e761268e7108ea2270d71291dd1c018a9eea580).

Happy to get feedback and guidance.
Thanks,

@afinne
Copy link

afinne commented May 7, 2017

I just realised that there have been discussions on this in #3 also.

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

3 participants