summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-08-31 17:00:23 +0200
committermkanat%kerio.com <>2005-08-31 17:00:23 +0200
commita094f0ebf0294b8f964fc3d93e4d60044af8353e (patch)
treee9a9563e00bb56c0a4b2e481e8bdf7cbcc0d3914 /Bugzilla/DB
parentce0851b8e3b62e99f793c7d8208a4b07851a491a (diff)
downloadbugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.gz
bugzilla-a094f0ebf0294b8f964fc3d93e4d60044af8353e.tar.xz
Bug 305976: Allow Bugzilla::DB sql_regexp/sql_not_regexp methods to accept string and pattern as arguments
Patch By Lance Larsh <lance.larsh@oracle.com> r=joel, a=justdave
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm9
-rw-r--r--Bugzilla/DB/Pg.pm9
2 files changed, 14 insertions, 4 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 0951cdc5f..c3824ab9a 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -23,6 +23,7 @@
# Dave Lawrence <dkl@redhat.com>
# Tomas Kopal <Tomas.Kopal@altap.cz>
# Max Kanat-Alexander <mkanat@bugzilla.org>
+# Lance Larsh <lance.larsh@oracle.com>
=head1 NAME
@@ -83,11 +84,15 @@ sub bz_last_key {
}
sub sql_regexp {
- return "REGEXP";
+ my ($self, $expr, $pattern) = @_;
+
+ return "$expr REGEXP $pattern";
}
sub sql_not_regexp {
- return "NOT REGEXP";
+ my ($self, $expr, $pattern) = @_;
+
+ return "$expr NOT REGEXP $pattern";
}
sub sql_limit {
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index c8ff4221b..f0c18b728 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -23,6 +23,7 @@
# Dave Lawrence <dkl@redhat.com>
# Tomas Kopal <Tomas.Kopal@altap.cz>
# Max Kanat-Alexander <mkanat@bugzilla.org>
+# Lance Larsh <lance.larsh@oracle.com>
=head1 NAME
@@ -89,11 +90,15 @@ sub bz_last_key {
}
sub sql_regexp {
- return "~*";
+ my ($self, $expr, $pattern) = @_;
+
+ return "$expr ~* $pattern";
}
sub sql_not_regexp {
- return "!~*"
+ my ($self, $expr, $pattern) = @_;
+
+ return "$expr !~* $pattern"
}
sub sql_limit {