Pagination of table.fetch (getCollection) feature #483
Unanswered
gregkysenko
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Glad you like it. The fetch() API is not pageable due to calling groupByType. The end of fetch() does:
The queryItems is pageable, but groupByType does not currently return the paging next/prev tokens. There could be 2 solutions:
Yes, GSIs should work. Just pass {index: 'name'} in the params. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! First of all, thank you guys for the library, we are using OneTable for up to three months now and it definitely made our Single table setup more stable.
I have a question: Currently I am using get collection feature to retrieve count of child enttities for my organisation e.g. :
I am wondering what are the limitations of this approach and how pagination would work in that case? Currently I don`t have that much child entities, but in the future I expect to have 1000+ Child entities per organisation, so I am wondering how
fetch
would handle such cases?P.S. Can I fetch by GS1PK instead of PK?
Beta Was this translation helpful? Give feedback.
All reactions