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

Specify limit for relationships #1319

Open
paultranvan opened this issue Feb 21, 2023 · 0 comments
Open

Specify limit for relationships #1319

paultranvan opened this issue Feb 21, 2023 · 0 comments

Comments

@paultranvan
Copy link
Contributor

At this moment, it is not possible to specify a limit for the included docs in a query.
For instance, with this query:

const query = Q('io.cozy.photos.albums')
  .include(['files'])
  .limitBy(20)

This will restrict the albums to 20 docs, but there is no way to specify how many files should be retrieved.
I'm not sure how the API should look like, but this is definitely something that would be interesting to have, typically when there are a lot of relationships to fetch, to increase the 100 default limit.

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

1 participant