in reply to DBIx::Class case insensitve substring search.

I haven't used DBIx::Class in years, but...
Unknown column 'LOWER(me.name)'
This error message suggests to me that your field names get quoted, so it's possible to use column names with spaces and/or reserved words, which is a good thing, but which prevents hacks like these.

I am guessing that there is a setting you set in DBIx::Class that enables this column name quoting. If you find out what setting, you could (temporarily) disable it.

update A little bit of searching with Google and I have found something: quote_names

quote_names
When true automatically sets "quote_char" and "name_sep" to the characters appropriate for your particular RDBMS. This option is preferred over specifying "quote_char" directly.
Some forum questions suggest that if quote_char and name_sep are set, DBIx::Class will automatically use them.
  • Comment on Re: DBIx::Class case insensitve substring search.

Replies are listed 'Best First'.
Re^2: DBIx::Class case insensitve substring search.
by duelafn (Parson) on May 26, 2011 at 16:25 UTC

    Good find. After poking around, it seems that indeed the only options available to the OP is globally disabling quote_names / quote_char (which may be impossible) or resorting to the literal SQL as the OP found in the FAQ (I'd love to be proved wrong though). The documentation (and experiments) show that locally disabling quote_names / quote_char is difficult to the point of being not possible. Of course, as a key value, the typical SQL::Abstract "trick" of using a scalar reference \'LOWER(me.name)' is useless as well.

    Good Day,
        Dean