kurierjs / kurier

TypeScript framework to create JSON:API compliant APIs
https://kurier.readthedocs.io/en/latest/
MIT License
61 stars 9 forks source link

feat/add.ilike.operator #374

Closed Martinarbez closed 10 months ago

Martinarbez commented 10 months ago

This PR introduces support for the ilike operator in our application. The ilike operator is a case-insensitive version of the like operator, commonly used in PostgreSQL.

Changes:

  1. The OperatorName type has been extended to include "ilike". This allows us to use the ilike operator in our application logic.

  2. The KnexOperators constant has been updated to map the "ilike" string to "ilike". This ensures that the ilike operator is correctly translated when building queries with Knex.

  3. A new ilike function has been added to the FunctionalOperators object. This function implements the logic for the ilike operator. It checks if the expected string starts with, ends with, or contains the actual string, taking into account the % wildcard character.

By adding support for the ilike operator, we can perform case-insensitive pattern matching in our queries, improving the flexibility and robustness of our application.