lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php 1 location
|
@@ 480-489 (lines=10) @@
|
| 477 |
|
/** |
| 478 |
|
* {@inheritdoc} |
| 479 |
|
*/ |
| 480 |
|
protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) |
| 481 |
|
{ |
| 482 |
|
$factorClause = ''; |
| 483 |
|
|
| 484 |
|
if ('-' === $operator) { |
| 485 |
|
$factorClause = '-1 * '; |
| 486 |
|
} |
| 487 |
|
|
| 488 |
|
return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')'; |
| 489 |
|
} |
| 490 |
|
|
| 491 |
|
/** |
| 492 |
|
* {@inheritdoc} |
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php 1 location
|
@@ 76-85 (lines=10) @@
|
| 73 |
|
/** |
| 74 |
|
* {@inheritdoc} |
| 75 |
|
*/ |
| 76 |
|
protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit) |
| 77 |
|
{ |
| 78 |
|
$factorClause = ''; |
| 79 |
|
|
| 80 |
|
if ('-' === $operator) { |
| 81 |
|
$factorClause = '-1 * '; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')'; |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
/** |
| 88 |
|
* {@inheritDoc} |