-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[FEAT] Supabase Data Provider needs an array_overlap operator #6024
Comments
If I could get assigned to this, I'll give it a shot at getting it included. Thanks in advance! |
Hello @jim-knight, I believe It's okay to add for example: we sent this and we can get the following data
but we can't get this because "health" is not available in the array.
do you also want to get ["travel", "food"]? |
@alicanerdurmaz Thanks Alican, that's correct. Ideally in my use case the query would include any post that has a tag that matches ANY in the filter vs requiring ALL to match. Using your example, if we used
Specifically in my use case, we have a table of businesses with categories tied to the industries that they're in. The categories column is an array of strings. Here's a short listing of some of the values: Aerospace, Automotive, Business Services, Consumer Products & Services, Distribution & Logistics, Education, Energy, Food and Beverage, Healthcare. Let's say business A is in Education and Healthcare, while business B is in Automotive and Education, while business C is in Aerospace. When filtering for I hope that helps with what I'm looking for. |
@jim-knight Thanks for excellent explanation. I assigned issue to you. 🙏 |
@alicanerdurmaz Perfect. Thanks, Alican! I'll get to work on it sometime this week. |
@alicanerdurmaz Unfortunately I don't think I'll be able to continue working on this issue. I've been struggling to get the environment set up on my Windows based machine and seem to run into a number of install errors via git bash, or powershell. I've got the main 6 files updated but can't commit due to failing on the install and not being able to run lint-staged. |
@jim-knight sorry to hear about your issue. Could you provide more information on your errors? Would be nice to provide any error you encountered. |
Sure thing, so running with Powershell didn't work just because it didn't like the syntax of the devPreinstall command from package.json, which was expected. Next up, I tried Git Bash and running just the direct install command but got the following message:
I then tried running it while ignoring scripts, and got the following message:
I thought that running the command through Git Bash would help to resolve any issue relating to
At that point I called it quits as I just ran out of time and thought it might be better for someone else to step in. |
Hey @jim-knight, we've implemented the fix about the Windows environment. Can you check if you can continue working on this one? Please let us know if you encounter any other issues 🙏 |
Thanks for the update @aliemir. I'll give it a shot as soon as I have some free time and will report back. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
I would like to filter an array column with an array in Supabase, where any row is shown where a value in the column matches at least one selected.
Example: I have 4 rows of data under "Fruits".
I would like to filter with the following:
The returned result should be:
Describe alternatives you've considered
Issue #5922 is similar in that it added the ability to check if an array matches an array with the
ina
andnina
operators but differs based on the ability to match if ANY value in the filtering array matches the column array.Additional context
Here's a couple of examples of using the Supabse JS client to do the call:
Describe the thing to improve
I believe we could follow a similar route and add ina_overlap and nina_overlap CrudFilter and map to query.overlaps in Supabase data provider.
The text was updated successfully, but these errors were encountered: