-
Notifications
You must be signed in to change notification settings - Fork 34
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
Multiple OR operators #109
Comments
Hey @Grimmoth, thank you very much for pointing that out! I think any information you want to share might be helpful - especially the link to the custom curl of postgREST. |
Ok, short story long 🙂 My scenarioEvery row contains two columns:
So if an entry has cluster: 2 or cluster_configuration: 2 etc. it should not be in the list. Testing/Playing aroundTo keep testing simple, I just modified the filter parameter in the dataprovider before calling the postgrestRestProvider. a) Adding one OR filter to the parameters: b) adding another OR filter
-> resulting in: c) trying to combine with AND
-> throwing error My workaround for all of that atm is just modifying the the request url in the httpClients in the data provider used by the crud calls: CURLcurl command for a fetching list results:
Sorry that I didn't check everything in the urlBuilder.ts myself, but if necessary I can investigate further as soon as I got enough time for that. Best regards |
Thanks a lot, that is a really great explanation, with which I can create a test case and procede from there. |
Hey @Grimmoth, I was just looking into that issue in more detail. I did not really end up with THE solution, but had one idea, which I would like to share with you. Instead of using two
The same approach would work with The nesting which you tried is another issue and would make things complicated, i.e. requiring some recursion. Thus, I would first consider the proposed change and from there go further. What do you think? Maybe you have a more sophisticated idea. EDIT: You can look at the test cases here |
Happy new year and thank you for the quick reply. I don't have a better idea, but for my example it would be absolutely enough to have an array - the hopeful idea of my Best regards |
Hey @Grimmoth unfortunately, I did not yet find some time to tackle the request. If you have more ressources, I could lead and consult you in doing the change. |
Hi there,
I have the following scenario, using version 2.0.0 alpha 3, referring to the just implemented #82.
In many scenarios I need to filter out data by two columns which could be an integer or null. I could do so with an @or operator (just beginning, so maybe I just don't know the right approach for that), but if I try to add multiple OR operators to the filters it only adds one of them in the request url.
I verified that postgrest allows this by using a custom curl request.
I don't want you to spend time on something that could just be my fault, my question is simply: has it been tested already (in which case I'll investigate on my side) or should I post what I've tried and experienced so far?
My current workaround is fairly stupid, I add the two filters to the request url in the dataprovider.
If it helps, I'm happy to test that and try around - just to get rid of any unnecessary workarounds. ;)
The text was updated successfully, but these errors were encountered: