[Jifty-commit] r3928 - in Jifty-DBI/trunk: lib/Jifty/DBI/Handle
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Aug 21 19:09:22 EDT 2007
Author: falcone
Date: Tue Aug 21 19:09:22 2007
New Revision: 3928
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm
Log:
r23979 at ketch: falcone | 2007-08-21 18:00:57 -0400
* tell Pg to be case sensitive on IN clauses and handle the arrayref
structure used by IN
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm Tue Aug 21 19:09:22 2007
@@ -172,9 +172,13 @@
my $value = shift;
if ($self->_case_insensitivity_valid($column, $operator, $value)) {
- if ( $operator =~ /(?:LIKE|=)/i ) {
+ if ( $operator =~ /(?:LIKE|=|IN)/i ) {
$column = "LOWER($column)";
- $value = "LOWER($value)";
+ if ($operator eq 'IN' and ref($value) eq 'ARRAY') {
+ $value = [map { "LOWER($_)" } @$value];
+ } else {
+ $value = "LOWER($value)";
+ }
}
}
return ( $column, $operator, $value );
More information about the Jifty-commit
mailing list