-
Notifications
You must be signed in to change notification settings - Fork 37
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
Saule cannot filter more than one input parameter. #112
Comments
I think it's probably not supported yet, but you might be able to get it working using custom filter expressions. See here for more info. I assume the value you'd get is the string including the comma. |
Hi Jouke, Has this already in place? Please let me know. Thanks!! On Thu, Jun 2, 2016 at 1:20 PM, Jouke van der Maas <[email protected]
|
It isn't. I'm open to a PR but I don't have time to pick this up ATM. |
If I wanted to pick this up what would be a good solution to escape a ","? ~Cheers |
@PhyberApex I don't think we need to support escaping commas to be honest. If the spec doesn't mention it, it shouldn't be blocking us IMO. |
Okay sure. This is going to be a problem for string fields tho for sure. In one of our use cases that would be a deal breaker tbh. We use the filter on a name field to validate for free names. We check if the response is empty. If so the name is free and we can validate it as okay. "," is not a disallowed character in our names. This implementation would actually break our current usage and potentially others. I am not sure that should be done tbh. Is there any mention on filters at all in the spec? iirc it only mentions filters and that what they do is up to you. ~Cheers |
I suppose we could do like in CSV? So if the filter string is in quotes, we don't interpret the commas?
|
Just so I understand you correctly. This would mean I could not do a "or" filter on multiple strings containing "," is this correct? ~Cheers |
It would be like |
Okay I will probably take a look at this during this weekend. And open an PR when I'm ready. ~Cheers |
I have this working now with strings. I can't quite figure out how to do it with enums or ints yet. ~Cheers |
@PhyberApex a PR with the first steps would be great, thanks! If I remember right, the filtering code is pretty complex. |
Done! |
Hi,
I tried to filter out with two input parameters with comma separated as defined by jsonapi.org but it always returns null.
http://example.com/articles/filter[something]=1234 works
http://example.com/articles/filter[something]=1245,1235 won't work.
is this feature missing?
Thanks
The text was updated successfully, but these errors were encountered: