feathers icon indicating copy to clipboard operation
feathers copied to clipboard

Support additional postgres operators

Open michalgm opened this issue 1 year ago • 0 comments

I have a postgres database that makes use of array fields and fulltext indexes. I need to be able to perform queries on those fields using the following postgres operators:

  • && - array overlap - https://www.postgresql.org/docs/current/functions-array.html#ARRAY-OPERATORS-TABLE
  • @> - array contains - https://www.postgresql.org/docs/current/functions-array.html#ARRAY-OPERATORS-TABLE
  • <@ - array contained by - https://www.postgresql.org/docs/current/functions-array.html#ARRAY-OPERATORS-TABLE
  • @@ - fulltext match - https://www.postgresql.org/docs/current/functions-textsearch.html

I made a PR for the v4 feathers-knex module implementing these: https://github.com/feathersjs-ecosystem/feathers-knex/pull/236 However, it wasn't immediately clear to me how to implement this in the new knex core module.

Also, reading the migration guide, it seems like perhaps these could be defined in my service definitions using the filter/operator properties? The documentation there wasn't very clear how these are meant to function.

michalgm avatar Dec 28 '23 19:12 michalgm