Configurable like implementation of Postgres
We are using dotConnect for PostgreSQL and are using dynamic linq to entities queries. We want to do case insensitive searching on fields (without having to lowercase the field and the value to compare with).
Since we are using dynamic linq it is not possible to use the scalar-valued ILike functionality added in the last version of dotConnect for PostgreSQL.
To resolve our problem we would like the option to select which 'Like' statement is used by dotConnect for PostgreSQL in converting contains statements. Currently it uses (the case sensitive) Like function, we would like to be able to set this to the (case insensitive) ILike function.
-
Shalex commented
New version of dotConnect for PostgreSQL 5.60 is released!
It can be downloaded from http://www.devart.com/dotconnect/postgresql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22838 . -
Shalex commented
The possibility to turn off LIKE's ESCAPEs (Oracle, MySQL, PostgreSQL, SQLite) and turn on case insensitive comparison mode (Oracle, PostgreSQL), when using Linq to Entities extention methods .Contains() .EndsWith() .StartsWith(), will be available starting from the next build of dotConnect providers:
var config = Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfig.Instance;
config.QueryOptions.NoEscapeLike = true;
config.QueryOptions.CaseInsensitiveLike = true;