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

Adding startsWith / endsWith / contains options in StringFieldComparisons

Open snaftaly opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Missing explicit StringFieldComparisons option for string startsWith, endsWith, Contains.

Have you read the Contributing Guidelines?

yes

Describe the solution you'd like We would like to add an option in the StringFieldComparisons to allow a filter object for a string to have a startsWith / endsWith / contains options.

Describe alternatives you've considered We are currently using the iLike option with combination of % in the beginning / end of the string to get the desired outcome, but we encountered some edge cases where the actual string contains %, so it's hard to distinguish between the cases where the % serves as a wildcard or when it's the actual string to be searched.

Having the startsWith / endsWith / contains options in the StringFieldComparisons interface would allow us to explicitly distinguish between the cases.

snaftaly avatar Feb 14 '24 15:02 snaftaly