RepoDB icon indicating copy to clipboard operation
RepoDB copied to clipboard

Enhancement: Consider the ToLower() and ToUpper() in the Query Tree Expression.

Open mikependon opened this issue 5 years ago • 4 comments

There is a user that reported that ToLower() (or ToUpper()) is not working in the Query Tree Expression like below.

connection.Query<T>(c => c.ColumnName.ToUpper().Contains("A"));

The expression above is failing.

The expected SQL statement would be like this.

WHERE (UPPER(ColumnName) LIKE '%A%');

In SQL Server, we do not need to do this, however, PostgreSQL is case-sensitive at it requires as transformation.

mikependon avatar Mar 23 '20 12:03 mikependon

FYI: @bfallar3

mikependon avatar Mar 23 '20 12:03 mikependon

Any updates on this issue?

not-authorized avatar Apr 27 '21 00:04 not-authorized

The initial object based fix for this is now available on version RepoDB v1.12.8.

mikependon avatar Sep 23 '21 14:09 mikependon

You can now use the following Query Fields.

  • LeftQueryField
  • RightQueryField
  • LowerQueryField
  • UpperQueryField
  • LeftTrimQueryField
  • RightQueryField
  • TrimQueryField
  • LenQueryField/LengthQueryField

mikependon avatar Sep 23 '21 14:09 mikependon