nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.04k stars 533 forks source link

Feature: add array operators #754

Open emmanuel opened 2 years ago

emmanuel commented 2 years ago

Adds new contArr and intersectsArr query operators, with the intersectsArr operator generating SQL queries like:

select ... where tags::text[] && ARRAY[$1,$2];

This selects rows where the tags column, which is presumed to be of type text[], contains at least one value that equals $1 or $2.

Fixes #687

emmanuel commented 2 years ago

We currently use this patch on top of 4.6.2. I'd be happy to open a PR for 4.6.x, if someone will create a branch I can use as a PR target.

andrewvasilchuk commented 2 years ago

Thank you. Is this going to be merged?

BenStirrup commented 2 years ago

Good initiative and indeed welcomed feature ! @michaelyali when you have time, could you review it ?

afilp commented 10 months ago

@emmanuel Hi, since this repo seems to be obsolete, can you please check the same PR code in the new (maintained) fork here? https://github.com/gid-oss/dataui-nestjs-crud/issues/19 https://github.com/gid-oss/dataui-nestjs-crud/pull/21

If you wish I can delete my PR and you can create a new one there. (I created it there using your code because I was asked to)

Thanks a lot!