Filters and case insensitive EQUAL?

LabKey Support Forum (Inactive)
Filters and case insensitive EQUAL? Ben Bimber  2010-03-09 15:02
Status: Closed
 
I just realized that EQUALS seems to be case sensitive. Is there any way to have an EQUALS operator that is case insensitive?

My application is a form that builds a URL and takes the user to a filtered grid. Unless anyone has a suggestion, I'm just gonna make the default operator 'begins with', which should help most cases. If someone does try to search using 'equals' they might be surprised by the result though.

Example URL:

.../executeQuery.view?query.queryName=Animal&schemaName=study&query.Species/species~eq=cyno
 
 
Matthew Bellew responded:  2010-03-09 16:39
This is one of those cases where it is hard to hide the implementation of the underyling SQL database. Postgres is case-sensitive by default (whereas SQL Server is case-insensitive).

While you can specify a locale when you create a database, I don't think you can specify case-insensitive (I'd love to find out that I'm wrong on this, or that this has been changed in a recent version).

http://www.postgresql.org/docs/8.4/interactive/locale.html

We get around this for 'starts with' by using the ILIKE operator.

http://www.postgresql.org/docs/current/static/functions-matching.html

Matt
 
Ben Bimber responded:  2010-03-09 16:53
that makes sense. i'll try to read about setting locale, b/c case insensitive would be highly preferable.

can we use ILIKE in when specifying filters in a URL, something like:

..&query.Species/species~ilike=cyno