Skip to content
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

[TO BE DISCUSSED] add mosaic listing endpoint #45

Closed
wants to merge 1 commit into from

Conversation

vincentsarago
Copy link
Member

This PR continues the work done in #44 and adds a /list endpoint to list the mosaics stored in the pgstac db. By default it will only return the search with metadata.type == "mosaic" (tag added when registered the search via the /register endpoint.

I know @bitner raised some performance issue that could appear when there are a lot search in the search table 🤷‍♂️

IMO the /list endpoint could be valuable for debugging purpose or for uses who have not a lot of entries in the search table. I think the endpoint should not be added by default, and I'm also happy to only add this code in the documentation.

cc @sharkinsspatial

# filter to only return `metadata->type == 'mosaic'`
mosaic_filter = sql.SQL("metadata::json->>{key} = {value}").format(
key=sql.Literal("type"), value=sql.Literal("mosaic")
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only want the search with metadata.type = "mosaic"

rel="self",
href=self.url_for(request, "list_search") + qs,
),
# TODO: next
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

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.

1 participant