minidyn icon indicating copy to clipboard operation
minidyn copied to clipboard

Fix last evaluated key behavior on Query

Open kuadrosx opened this issue 2 years ago • 0 comments

the query operation documentation says:

If LastEvaluatedKey is empty, then the "last page" of results has been processed and there is no more data to be retrieved.

If LastEvaluatedKey is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedKey is empty.

it means that if there is no more items to scan in the index the LastEvaluatedKey should not be returned

Also, if the limit is greater than the index size we should not return the LastEvaluatedKey

kuadrosx avatar Oct 31 '23 03:10 kuadrosx