Skip to content

Error with the Dynamo Pagination #40

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

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

raphaelcangucu
Copy link

This PR will fix last evaluated key when the collection is empty and we can still have results at the dynamo.

When the result don't contain any itens, but we still have a lastEvaluatedKey at the Dynamo response, this means that we still has to confirm if we have or not values at the dynamo.

The function processMultipleItems at the processor was adding the meta at the collection items.

To solve this it was extended the Laravel Collection and created a new attribute to add the meta to the collection, so we can access at the lastEvaluatedKey from the collection instead of the item that don't exist.

@thiago-a-delgado
Copy link

Awesome!
I need this fix!

@paulojosegamba
Copy link

Amazing

@codeninja115
Copy link

Great, I also need this fix. Hope it can be merged soon.

@kitar
Copy link
Owner

kitar commented Dec 15, 2023

@raphaelcangucu
Thank you so much for the fantastic PR! I really appreciate it.

It seems like this is something we should have implemented from the beginning. I'd also like to consider removing metadata at the model level in the next major version.

We'll release it right after adding some tests and docs!

@kitar kitar merged commit 89efb21 into kitar:master Dec 15, 2023
@DanielMukh
Copy link

Thanks! When can we expect the release?

@kitar
Copy link
Owner

kitar commented Dec 15, 2023

Assuming testing proceeds without any issues, I believe we can release it in a day or two!

@DanielMukh
Copy link

Awesome, look forward to it!

kitar added a commit that referenced this pull request Dec 15, 2023
@raphaelcangucu
Copy link
Author

Thanks @kitar , let me know if you need some help coding.

kitar added a commit that referenced this pull request Dec 15, 2023
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.

6 participants