nestjs-query icon indicating copy to clipboard operation
nestjs-query copied to clipboard

Support FilterableField on array fields

Open rostaingc opened this issue 1 year ago • 1 comments

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

I have a column defined as

@Column({ type: 'text', array: true, default: [] })
userIDs: string[]

I would like to filter my entity based on values inside this array.

But FilterableField does not support text array columns.

Have you read the Contributing Guidelines?

yes

Describe the solution you'd like Be able to add the FilterableField(() => [String]) decorator on that field.

Describe alternatives you've considered Currently I have changed my column to a simple text and the userIDs set to a string type. I ve added FilterableField(() => String) and making queries with like '%x%'

Additional context Add any other context or screenshots about the feature request here.

rostaingc avatar Sep 19 '24 13:09 rostaingc

Hi @rostaingc,

This is a must if you ask me. I mean common it is pretty normal to want such a feature. And for me changing data type of my database is kinda a big NO. Have you started adding this feature @TriPSs?

kasir-barati avatar Dec 13 '24 17:12 kasir-barati