Skip to content
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] Array filters support #6581

Open
dzcpy opened this issue Dec 15, 2024 · 3 comments
Open

[FEAT] Array filters support #6581

dzcpy opened this issue Dec 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@dzcpy
Copy link
Contributor

dzcpy commented Dec 15, 2024

Is your feature request related to a problem? Please describe.

Currently, Refine's data hooks (useList, useTable) don't support filtering array fields in databases that have native array support like PostgreSQL. When working with array columns (e.g., an 'ids' field containing an array of strings), there's no built-in way to filter records where the array contains a specific value.

Describe alternatives you've considered

Is there any workaround?

Additional context

No response

Describe the thing to improve

Support contains/includes operators for array fields
Work with PostgreSQL array columns natively
Provide a consistent API across different data providers
Allow combining array filters with other filter types
Support both string and number array types

@dzcpy dzcpy added the enhancement New feature or request label Dec 15, 2024
@BatuhanW
Copy link
Member

Hello @dzcpy we have ina and nina filter options in our CrudOperator type. That means in array and not in array. Would they be useful for your data provider?

@dzcpy
Copy link
Contributor Author

dzcpy commented Dec 21, 2024

Hi @BatuhanW, thanks for your reply! I have forked the crud module in my own project to fix some issues so that might be the reason. I'll check and probably close the ticket if it works!

@dzcpy
Copy link
Contributor Author

dzcpy commented Dec 21, 2024

Looks like ina and nina are not available for nestjsx crud adapter?
https://github.com/refinedev/refine/blob/main/packages/nestjsx-crud/src/utils/mapOperator.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants