Doctrine\DBAL\Platforms\MySqlPlatform::getDateArithmeticIntervalExpression PHP Method

getDateArithmeticIntervalExpression() protected method

protected getDateArithmeticIntervalExpression ( $date, $operator, $interval, $unit )
    protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
    {
        $function = '+' === $operator ? 'DATE_ADD' : 'DATE_SUB';
        return $function . '(' . $date . ', INTERVAL ' . $interval . ' ' . $unit . ')';
    }
MySqlPlatform