[rt-commit] [svn] r495 - in DBIx-SearchBuilder/trunk: .
SearchBuilder/Handle
jesse at fsck.com
jesse at fsck.com
Sun Mar 7 22:19:57 EST 2004
Author: jesse
Date: Sun Mar 7 22:19:57 2004
New Revision: 495
Modified:
DBIx-SearchBuilder/trunk/SearchBuilder.pm
DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
Log:
Better support for != on Postgres
Modified: DBIx-SearchBuilder/trunk/SearchBuilder.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder.pm Sun Mar 7 22:19:57 2004
@@ -5,7 +5,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = "0.98_01";
+$VERSION = "0.98_02";
=head1 NAME
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Pg.pm Sun Mar 7 22:19:57 2004
@@ -261,20 +261,23 @@
=cut
sub _MakeClauseCaseInsensitive {
- my $self = shift;
- my $field = shift;
+ my $self = shift;
+ my $field = shift;
my $operator = shift;
- my $value = shift;
-
+ my $value = shift;
-
- if ($operator =~ /LIKE/i ) {
- $operator =~ s/LIKE/ILIKE/ig;
- return ($field, $operator, $value);
- } elsif ($operator =~ /\s*=\s*/) {
- return ($field,'ILIKE',$value);
- } else {
- $self->SUPER::_MakeClauseCaseInsensitive($field, $operator,$value);
+ if ( $operator =~ /LIKE/i ) {
+ $operator =~ s/LIKE/ILIKE/ig;
+ return ( $field, $operator, $value );
+ }
+ elsif ( $operator =~ /\s*!=\s*/ ) {
+ return ( $field, 'NOT ILIKE', $value );
+ }
+ elsif ( $operator =~ /\s*=\s*/ ) {
+ return ( $field, 'ILIKE', $value );
+ }
+ else {
+ $self->SUPER::_MakeClauseCaseInsensitive( $field, $operator, $value );
}
}
More information about the Rt-commit
mailing list