I updated to the views 7.x-3.0-alpha1 - missing checkbox "Sensitive" in the filter on the field "Title. "
In the filter on other fields, it is also missing.
I have a PostgreSQL database and if the user typed text in another case the filter does not work.
PS In 7.x-3.x-dev 2011-Jan-1915 checkbox is also missing.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1029534.patch | 2.66 KB | bojanz |
Comments
Comment #1
fexmusicmutuz commentedHelp me, please!!!
Comment #2
bojanz commentedCase sensitivity has been removed. All filters are assumed to be case insensitive. This is due to Drupal 7 architecture.
Also, please don't bump your issues. It's rude.
Comment #3
bojanz commentedThis needs to be confirmed (it should not happen)
Comment #4
fexmusicmutuz commentedLIKE statements are case sensitive in postgresql
Comment #5
bojanz commentedThe Drupal 7 DB Layer defines LIKE as ILIKE for PostgreSQL. But maybe we are doing our own thing somewhere...
Comment #6
fexmusicmutuz commentedI think the DB Layer will not help here:
Comment #7
bojanz commentedSummary:
MySQL and SQLite specify LIKE as case-insensitive.
However, PostgreSQL specifies LIKE as case-sensitive, and provides ILIKE that works like the MySQL / SQLite variants.
Drupal's DB layer knows how to handle it. Which doesn't matter for us because we aren't using it in this case :P
And there's no reason I can see for us not to use it.
Attaching a patch that uses Drupal's db layer for the LIKE operations. All string filter tests still pass.
I did a checkout of Views from August, and while the code was similar to the proposed patch, it didn't use db_like() and it still used the unneeded UPPER trick. So I think we're good here (going with the proposed approach)
P.S. As a guide for db_like() usage I'm reading http://drupal.org/node/683736. Plus we have instances in our codebase where are using LIKE as the operator, and db_like is there.
Comment #8
dawehnerThis original patch failed for op_equal
The tests showed one failure.
Fixed this small part and the test seems fine again.