Description
Is your feature request related to a problem? Please describe.
Related to #1981 , we've been working to move away from limit-offset paging for our Postgres provider, as deep pages using large offsets are inefficient and can cause users to download duplicate records if earlier pages have been updated during a query. In #1982 , we altered itemtypes so that "next" links could be returned by a provider without pygeoapi then appending its own offset-based next links to the response.
The thing we missed was that pygeoapi uses uri
and serialized_query_params
to generate the next_href
object, and these objects aren't available from inside a provider:
pygeoapi/pygeoapi/api/itemtypes.py
Line 567 in c976bd7
This makes it challenging to generate next links inside a provider.
Describe the solution you'd like
We'd like uri
and serialized_query_params
to be passed to providers to be used to generate next links if desired.
Describe alternatives you've considered
We could alternatively have some way in itemtypes to pass our "page key" from the provider and have itemtypes use that to generate the link. If offset
wasn't validated to be numeric, we'd just need some way for the provider to control next_
here:
pygeoapi/pygeoapi/api/itemtypes.py
Line 567 in c976bd7
I think that approach is a bit less friendly than letting giving the provider these objects.