rode / grafeas-elasticsearch

An implementation of the Grafeas storage backend based on Elasticsearch
Apache License 2.0
12 stars 5 forks source link

add pagination #65

Closed mrparkers closed 3 years ago

mrparkers commented 3 years ago

this may or may not be a "breaking" change, depending on how we're currently using any of the List methods. before this change, we would always return 1000 or less results for any List method. now, since there is apparently no way to use a List method in grafeas without pagination, you should always expect to receive results with a length of the provided pageSize (or less, if there happen to be less results).

I still kept a code path that won't do any of the pagination work if the provided pageSize is zero, but that is essentially dead code until the grafeas code that I linked above is changed in some way. if we ever decide to propose that change upstream, we should be able to go back to the old behavior if we wish.