summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Mysql.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-09 08:23:30 +0100
committermkanat%kerio.com <>2005-03-09 08:23:30 +0100
commit5be75754f810eb414b666f3894e2dbf8943e3f0f (patch)
tree5c91e75fa2aaf9ad93e570396834d161b1aedfb1 /Bugzilla/DB/Mysql.pm
parent3f4abbd8d47883c52cdbd25ce308fe7d638f25ce (diff)
downloadbugzilla-5be75754f810eb414b666f3894e2dbf8943e3f0f.tar.gz
bugzilla-5be75754f810eb414b666f3894e2dbf8943e3f0f.tar.xz
Bug 281582: Replace CONCAT and MATCH with Bugzilla::DB function call (Note: This patch also creates a database-agnostic fulltext search method.)
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=myk
Diffstat (limited to 'Bugzilla/DB/Mysql.pm')
-rw-r--r--Bugzilla/DB/Mysql.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index ae24d13bc..76cd0966d 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -88,7 +88,7 @@ sub sql_not_regexp {
}
sub sql_limit {
- my ($self, $limit,$offset) = @_;
+ my ($self, $limit, $offset) = @_;
if (defined($offset)) {
return "LIMIT $offset, $limit";
@@ -97,6 +97,18 @@ sub sql_limit {
}
}
+sub sql_string_concat {
+ my ($self, @params) = @_;
+
+ return 'CONCAT(' . join(', ', @params) . ')';
+}
+
+sub sql_fulltext_search {
+ my ($self, $column, $text) = @_;
+
+ return "MATCH($column) AGAINST($text)";
+}
+
sub sql_to_days {
my ($self, $date) = @_;