-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add support for filter operators #105
Comments
Hello @thevahidal Could you please review my feature request issue and let me know what you think? I'm planning to start working on a pull request soon. Thank you!" |
Note: this strategy for providing filter operators appears to match the one used in |
Thanks for the feature request @AbegaM. This is for sure a must have feature for Soul and I think the way your proposal works is really great! |
Thank you @thevahidal, i will start working on the PR 👍 |
BTW - @thevahidal - you can use the repo settings to delete branches once the PR is merged. It's a house-keeping chore that helps out just a little. |
Hey @IanMayo, I'll do it for sure. |
Hello @thevahidal - any chance of a new release? I have a PR in another project that is blocked, waiting on this feature. |
It appears that the existing filters to not match for So, I believe we need a filter attribute for the SQLite value of null. Maybe a new |
Hey @IanMayo sorry I wasn't available for the past couple of days, I'm ok to do the release, but do you think we should fix the null thing and then proceed with the release? |
Good plan, let's defer release until we can filter for null. |
It seems that @AbegaM started a new PR for the matter https://github.com/thevahidal/soul/pull/117/files, let's release these two together. |
Closed in #117 |
Purpose of the Issue
I would like to add support for filtering operators in Soul. Currently, Soul filters table fields with the
_filters
field, which works fine, but I am unable to filter items using the operators<
,>
,<=
,>=
, and!=
. For example, I can fetch an invoice from Soul using the following URL, which works fine:However, I might want to fetch invoices where the total value is less than 2 or greater than 2, and I cannot achieve this with Soul's current functionality.
Proposed Solution
There could be several options to add this feature, but I propose passing double underscores after the column name. Here are some examples:
Greater than (
>
):Less than (
<
):Greater than or equal to (
>=
):Less than or equal to (
<=
):Not equal to (
!=
):This proposal would allow users to filter table rows using the operators listed above, making Soul's functionality more flexible and powerful.
The text was updated successfully, but these errors were encountered: