summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Pg.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-07 12:58:28 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-07 12:58:28 +0200
commit02a049703de6055f09f44f89a5a821814696ce32 (patch)
tree5918c91ceea49d280c8c3c0ce795da549a8bf4c6 /Bugzilla/DB/Pg.pm
parent7307c8c748e3245d65a25c016e7d92c6c7ae2aa4 (diff)
downloadbugzilla-02a049703de6055f09f44f89a5a821814696ce32.tar.gz
bugzilla-02a049703de6055f09f44f89a5a821814696ce32.tar.xz
Bug 602165: Change sql_interval to sql_date_math, in preparation for
MS-SQL and SQLite support.
Diffstat (limited to 'Bugzilla/DB/Pg.pm')
-rw-r--r--Bugzilla/DB/Pg.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index 0373fb1ce..c1c656a69 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -177,10 +177,10 @@ sub sql_date_format {
return "TO_CHAR($date, " . $self->quote($format) . ")";
}
-sub sql_interval {
- my ($self, $interval, $units) = @_;
+sub sql_date_math {
+ my ($self, $date, $operator, $interval, $units) = @_;
- return "$interval * INTERVAL '1 $units'";
+ return "$date $operator $interval * INTERVAL '1 $units'";
}
sub sql_string_concat {