From 02a049703de6055f09f44f89a5a821814696ce32 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 7 Oct 2010 03:58:28 -0700 Subject: Bug 602165: Change sql_interval to sql_date_math, in preparation for MS-SQL and SQLite support. --- Bugzilla/DB.pm | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 6f1d3e6de..27644fba5 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -307,7 +307,7 @@ EOT # List of abstract methods we are checking the derived class implements our @_abstract_methods = qw(new sql_regexp sql_not_regexp sql_limit sql_to_days - sql_date_format sql_interval bz_explain + sql_date_format sql_date_math bz_explain sql_group_concat); # This overridden import method will check implementation of inherited classes @@ -1904,13 +1904,13 @@ Formatted SQL for date formatting (scalar) =back -=item C +=item C =over =item B -Outputs proper SQL syntax for a time interval function. +Outputs proper SQL syntax for adding some amount of time to a date. Abstract method, should be overridden by database specific code. @@ -1918,15 +1918,28 @@ Abstract method, should be overridden by database specific code. =over -=item C<$interval> - the time interval requested (e.g. '30') (integer) +=item C<$date> -=item C<$units> - the units the interval is in (e.g. 'MINUTE') (string) +C The date being added to or subtracted from. + +=item C<$operator> + +C Either C<-> or C<+>, depending on whether you're subtracting +or adding. + +=item C<$interval> + +C The time interval you're adding or subtracting (e.g. C<30>) + +=item C<$units> + +C the units the interval is in (e.g. 'MINUTE') =back =item B -Formatted SQL for interval function (scalar) +Formatted SQL for adding or subtracting a date and some amount of time (scalar) =back -- cgit v1.2.3-24-g4f1b