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

What is the result type of the Promise returned by get()? #26

Open
cdumez opened this issue Apr 9, 2014 · 0 comments
Open

What is the result type of the Promise returned by get()? #26

cdumez opened this issue Apr 9, 2014 · 0 comments
Assignees

Comments

@cdumez
Copy link

cdumez commented Apr 9, 2014

What is the result type of the Promise returned by get()? The spec is not clear about this. It is likely a value (of 'any' type) if only 1 id is given and an array of values (any[]) if several ids are requested.

One issue is also, what is supposed to happen if several ids are requested but some of them do not exist in the database? 2 solutions are possible:

  • The whole thing fails and the Promise returns an error
  • We fallback nicely and return the objects whose ids actually exist. But then, it is not obvious to the user which ids actually succeeded.
@airpingu airpingu changed the title Does does is the result type of the Promise returned by get()? What is the result type of the Promise returned by get()? Apr 24, 2014
@airpingu airpingu self-assigned this Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants