Closed
Description
Problem
We need to ensure that records that include columns of the custom URI type support the following filters via API:
- contains {x}
- does not contain {x}
- is {x}
- is not {x}
- is empty
- is not empty
- host contains {x}
- host does not contain {x}
- scheme is [select from list of choices of valid schemes]
- scheme is not [select from list of choices of valid schemes]
The ones in bold are unique to the URI type.
This involves:
- Implementing the filters in the backend
- Updating the
/api/v0/databases/<id>/types/
endpoint to store available filters on this type- Filter information should include the number of parameters needing to be passed in (e.g.
is
needs 1 parameter,is empty
needs 0) - Filter information should also include the list of valid choices for the filter (e.g. scheme filters)
- Filter information should include the number of parameters needing to be passed in (e.g.
Additional context
- We're using our fork of
sqlalchemy-filters
to provide filtering. See: https://github.com/centerofci/sqlalchemy-filters. - Blocked by Create URI custom type and handle it in the backend. #412
- Update filtering issues to cover storing filter/group information in the backend. #557 provides some context on storing filters.