querybuilder icon indicating copy to clipboard operation
querybuilder copied to clipboard

[Breaking Change] string WhereX methods should not use the LOWER method by default

Open ahmad-moussawi opened this issue 3 years ago • 1 comments

Currently SqlKata will try to apply a case insensitive operation, for WhereString operations, for example this query

var query = new Query("Car").WhereLike("Name", "AM");

will get translated to

SELECT * FROM [Car] WHERE LOWER([Name]) like 'am'

What requested is to keep the default behavior of the database, and only apply the transformation if explicitly needed

Acceptance Criteria:

  • The default value for the caseSensitive for WhereLike, WhereStarts, WhereEnds should be true instead of false
  • The documentation should be updated to reflect this change

ahmad-moussawi avatar Sep 11 '22 07:09 ahmad-moussawi

I agree with @ahmad-moussawi. Also, calling LOWER on every parameter has a significant performance overhead.

FrancescoBonizzi avatar Feb 27 '25 08:02 FrancescoBonizzi