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

Properly handle single results in LiveQuery #186

Closed
wants to merge 1 commit into from

Conversation

tchak
Copy link
Member

@tchak tchak commented May 22, 2019

fix #178

@tchak
Copy link
Member Author

tchak commented May 22, 2019

A liveQuery with findRecord though is not really workable, as it will throw in case it can not find a record. Should we rescue errors in LiveQueries?

@tchak
Copy link
Member Author

tchak commented May 25, 2019

For a bit more context: the current code in live-query.js content computed property is not working properly anyway. It expect a query to return an object with result members witch is not a thing in orbit (maybe used to be a find in older versions?).

@dgeb
Copy link
Member

dgeb commented May 28, 2019

I am just really torn about this approach, because it means changing the shape of the result.

I'm still processing what I consider the "right" answer to be here ...

@tchak
Copy link
Member Author

tchak commented May 28, 2019

I listed different options I see in #178 and I am quite firmly convinced that the normalize to array is the less worse one :)

@tchak
Copy link
Member Author

tchak commented Dec 28, 2019

I will close this. In #241 I am proposing a new liveQuery interface which will be more selective about where to enable live updates on single record queries.

@tchak tchak closed this Dec 28, 2019
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.

liveQuery fails with a query that has a singular result (like findRecord)
2 participants