[Rt-commit] [svn] r1099 - in DBIx-SearchBuilder/trunk: .
SearchBuilder SearchBuilder/Handle
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Thu Jun 17 13:26:59 EDT 2004
Author: jesse
Date: Thu Jun 17 13:26:58 2004
New Revision: 1099
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/Changes
DBIx-SearchBuilder/trunk/SearchBuilder.pm
DBIx-SearchBuilder/trunk/SearchBuilder/Handle.pm
DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
Log:
----------------------------------------------------------------------
r1911 at tinbook: jesse | 2004-06-17T17:26:21.884094Z
1.00_06 - Pg/Oracle: Don't attempt to do case insensitive comparisons on
integer values.
----------------------------------------------------------------------
Modified: DBIx-SearchBuilder/trunk/Changes
==============================================================================
--- DBIx-SearchBuilder/trunk/Changes (original)
+++ DBIx-SearchBuilder/trunk/Changes Thu Jun 17 13:26:58 2004
@@ -1,5 +1,8 @@
Revision history for Perl extension DBIx::SearchBuilder.
+1.00_06 - Pg/Oracle: Don't attempt to do case insensitive comparisons on
+ integer values.
+
1.00_05 - Force utf8 flag on when doing searches for utf8 data; this
is a workaround for DBDs that don't do it themselves.
Modified: DBIx-SearchBuilder/trunk/SearchBuilder.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder.pm Thu Jun 17 13:26:58 2004
@@ -5,7 +5,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = "1.00_05";
+$VERSION = "1.00_06";
=head1 NAME
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Handle.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Handle.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Handle.pm Thu Jun 17 13:26:58 2004
@@ -562,9 +562,10 @@
my $operator = shift;
my $value = shift;
- $field = "lower($field)";
- $value = lc($value);
-
+ if ($value !~ /^\d+$/) { # don't downcase integer values
+ $field = "lower($field)";
+ $value = lc($value);
+ }
return ($field, $operator, $value,undef);
}
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm Thu Jun 17 13:26:58 2004
@@ -129,6 +129,10 @@
my $value = shift;
+ if ($value =~ /^\d+$/) { # we don't need to downcase numeric values
+ return ( $field, $operator, $value);
+ }
+
if ( $operator =~ /LIKE/i ) {
$operator =~ s/LIKE/ILIKE/ig;
return ( $field, $operator, $value );
More information about the Rt-commit
mailing list