Subject: | Support for ILIKE |
Hi!
Attached patch adds support for ILIKE (case insensitive searches) to Class::DBI::Pg:
@result = $class->ilike(foo=>'bAr%');
diff -Bub Class-DBI-Pg-0.06/Pg.pm Class-DBI-Pg-0.06_domm/Pg.pm
--- Class-DBI-Pg-0.06/Pg.pm 2004-12-02 18:13:27.000000000 +0100
+++ Class-DBI-Pg-0.06_domm/Pg.pm 2005-04-27 13:45:23.000000000 +0200
@@ -133,6 +133,17 @@
return $ver;
}
+=head3 search_ilike
+
+ @objs = Class->search_ilike(column1->'CaSeInSeNsItIvE%');
+
+Like Class::DBI->search_like, but uses the Postgres C<ILIKE> function for
+case-insensitive searches.
+
+=cut
+
+sub search_ilike { shift->_do_search(ILIKE => @_) }
+
=head1 AUTHOR
Sebastian Riedel, C<sri@oook.de>
Common subdirectories: Class-DBI-Pg-0.06/t and Class-DBI-Pg-0.06_domm/t