-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Implement filtering options for Boolean types #388
Comments
This seems to be functional already. Adding tests and the available filters on the type endpoint. |
@powellc You might've seen this already, but there are already some tests for filtering at And if you need to update our fork of |
That's great @eito-fis, thanks! I hadn't see the filter tests yet. Do you think it makes sense to still test the filtering via the API, or would these test suffice to cover that logic? I think I'm leaning towards also adding tests to the |
I was previously testing all the filtering on the backend and then just ensuring the API called the function with the right arguments. At the time it wasn't very principled, but I liked that the db tests ran faster than the API tests (django db gets reset between api tests) so I went with that. |
Sounds good! I'll push up some API tests for filtering around booleans in a bit. Thanks! |
This commit adds a first pass at trying to add options for filtering to the /api/v0/databases/<id>/types/ output. The idea here is to make it pretty trivial to add the options for new types to the endpoint. I'm not totally sold on the this being the best format per-se, but I like how it gets injected automatically for a given type and depends only on providing a definition. The definition can change, but the place they go stays constant.
This commit adds a first pass at trying to add options for filtering to the /api/v0/databases/<id>/types/ output. The idea here is to make it pretty trivial to add the options for new types to the endpoint. I'm not totally sold on the this being the best format per-se, but I like how it gets injected automatically for a given type and depends only on providing a definition. The definition can change, but the place they go stays constant.
This commit uses a constant to identify the correct filter option for a type, and also adds a better format.
This commit uses a constant to identify the correct filter option for a type, and also adds a better format.
Add first pass at filter docs for API #388
Problem
We need to ensure that records that include columns of Boolean type support the following filters via API:
This may already be done, please verify that it works and add some test cases specifically for boolean data types.
This involves:
/api/v0/databases/<id>/types/
endpoint to store available filters on this typeis
needs 1 parameter,is empty
needs 0)Additional context
sqlalchemy-filters
to provide filtering. See: https://github.com/centerofci/sqlalchemy-filters.BOOLEAN
data type in the backend #387The text was updated successfully, but these errors were encountered: