Re: CaseInsensitive fetch results to ZERO records....
Re: CaseInsensitive fetch results to ZERO records....
- Subject: Re: CaseInsensitive fetch results to ZERO records....
- From: Lachlan Deck <email@hidden>
- Date: Fri, 25 Feb 2011 20:59:08 +1100
On 25/02/2011, at 3:40 AM, Ramsey Gurley wrote:
> Does a case sensitive fetch *really* work?? I believe the ci in utf8_general_ci stands for 'case insensitive.'
<...>
> So it looks like you need to switch over to utf8_bin to get something resembling case sensitivity.
<...>
> As for a case insensitive search, by default all MySQL queries are case insensitive. If you do a case insensitive query in WO, the plugin for MySQL handles this by converting your query string using UPPER.
Which ain't the best idea for mysql as it bypasses your indexes.
Alternatively, you can provide a custom adaptor (or alter wonder's) to use the 'binary' keyword.
I had this working in my own mysql adaptor (which I didn't at the time get around to rolling into Wonder prior to the current mysql adaptor turned up). Whoever's maintaining wonder's mysql adaptor atm can contact me... it's optionally switched on and essentially transforms (with the assumption that the columns are defined as non-bin collations) case-insensitive into 'like' and case-sensitive into 'binary like'. It handles 'order by' clauses also.
with regards,
-
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden