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

Catch collections not collection in CQL filters #43

Merged
merged 5 commits into from
Aug 17, 2021

Conversation

vincentsarago
Copy link
Member

@vincentsarago vincentsarago commented Aug 16, 2021

This PR does:

  • add tests for collections search
  • make sure collections and not collection get translated to CQL.

closes #42

@vincentsarago
Copy link
Member Author

🤷‍♂️ I don't get why the tests pass. Locally running

SELECT * from search('{"collections":["pgstac-test-collection"],"fields":{"include":["id"]}, "limit": 1}')

returns {"next": null, "prev": null, "type": "FeatureCollection", "context": {"limit": 1, "matched": 0, "returned": 0}, "features": null}

while the incorrect query

SELECT * from search('{"collection":["pgstac-test-collection"],"fields":{"include":["id"]}, "limit": 1}');

returns {"next": "20200307aC0870130w361200", "prev": null, "type": "FeatureCollection", "context": {"limit": 1, "matched": 353, "returned": 1}, "features": [{"id": "20200307aC0870130w361200"}]} which is the expected results for the previous command 🤷‍♂️

@vincentsarago vincentsarago changed the title add tests for collections search Catch collections not collection in CQL filters Aug 16, 2021
@lossyrob lossyrob merged commit e3303e2 into stac-utils:main Aug 17, 2021
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.

Collections search does not work with pgstac >= 0.3
2 participants