Commit b3da911a authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DDC-1282' into 2.1.x

parents 00b6667a f2832461
...@@ -108,22 +108,22 @@ class MySqlPlatform extends AbstractPlatform ...@@ -108,22 +108,22 @@ class MySqlPlatform extends AbstractPlatform
public function getDateAddDaysExpression($date, $days) public function getDateAddDaysExpression($date, $days)
{ {
return 'DATE_ADD(' . $date . ', INTERVAL ' . (int)$days . ' DAY)'; return 'DATE_ADD(' . $date . ', INTERVAL ' . $days . ' DAY)';
} }
public function getDateSubDaysExpression($date, $days) public function getDateSubDaysExpression($date, $days)
{ {
return 'DATE_SUB(' . $date . ', INTERVAL ' . (int)$days . ' DAY)'; return 'DATE_SUB(' . $date . ', INTERVAL ' . $days . ' DAY)';
} }
public function getDateAddMonthExpression($date, $months) public function getDateAddMonthExpression($date, $months)
{ {
return 'DATE_ADD(' . $date . ', INTERVAL ' . (int)$months . ' MONTH)'; return 'DATE_ADD(' . $date . ', INTERVAL ' . $months . ' MONTH)';
} }
public function getDateSubMonthExpression($date, $months) public function getDateSubMonthExpression($date, $months)
{ {
return 'DATE_SUB(' . $date . ', INTERVAL ' . (int)$months . ' MONTH)'; return 'DATE_SUB(' . $date . ', INTERVAL ' . $months . ' MONTH)';
} }
public function getListDatabasesSQL() public function getListDatabasesSQL()
......
...@@ -118,22 +118,22 @@ class OraclePlatform extends AbstractPlatform ...@@ -118,22 +118,22 @@ class OraclePlatform extends AbstractPlatform
public function getDateAddDaysExpression($date, $days) public function getDateAddDaysExpression($date, $days)
{ {
return '(' . $date . '+' . (int)$days . ')'; return '(' . $date . '+' . $days . ')';
} }
public function getDateSubDaysExpression($date, $days) public function getDateSubDaysExpression($date, $days)
{ {
return '(' . $date . '-' . (int)$days . ')'; return '(' . $date . '-' . $days . ')';
} }
public function getDateAddMonthExpression($date, $months) public function getDateAddMonthExpression($date, $months)
{ {
return "ADD_MONTHS(" . $date . ", " . (int)$months . ")"; return "ADD_MONTHS(" . $date . ", " . $months . ")";
} }
public function getDateSubMonthExpression($date, $months) public function getDateSubMonthExpression($date, $months)
{ {
return "ADD_MONTHS(" . $date . ", -" . (int)$months . ")"; return "ADD_MONTHS(" . $date . ", -" . $months . ")";
} }
/** /**
......
...@@ -99,22 +99,22 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -99,22 +99,22 @@ class PostgreSqlPlatform extends AbstractPlatform
public function getDateAddDaysExpression($date, $days) public function getDateAddDaysExpression($date, $days)
{ {
return "(" . $date . "+ interval '" . (int)$days . " day')"; return "(" . $date . "+ interval '" . $days . " day')";
} }
public function getDateSubDaysExpression($date, $days) public function getDateSubDaysExpression($date, $days)
{ {
return "(" . $date . "- interval '" . (int)$days . " day')"; return "(" . $date . "- interval '" . $days . " day')";
} }
public function getDateAddMonthExpression($date, $months) public function getDateAddMonthExpression($date, $months)
{ {
return "(" . $date . "+ interval '" . (int)$months . " month')"; return "(" . $date . "+ interval '" . $months . " month')";
} }
public function getDateSubMonthExpression($date, $months) public function getDateSubMonthExpression($date, $months)
{ {
return "(" . $date . "- interval '" . (int)$months . " month')"; return "(" . $date . "- interval '" . $months . " month')";
} }
/** /**
......
...@@ -132,22 +132,22 @@ class SqlitePlatform extends AbstractPlatform ...@@ -132,22 +132,22 @@ class SqlitePlatform extends AbstractPlatform
public function getDateAddDaysExpression($date, $days) public function getDateAddDaysExpression($date, $days)
{ {
return "DATE(" . $date . ",'+". (int)$days . " day')"; return "DATE(" . $date . ",'+". days . " day')";
} }
public function getDateSubDaysExpression($date, $days) public function getDateSubDaysExpression($date, $days)
{ {
return "DATE(" . $date . ",'-". (int)$days . " day')"; return "DATE(" . $date . ",'-". $days . " day')";
} }
public function getDateAddMonthExpression($date, $months) public function getDateAddMonthExpression($date, $months)
{ {
return "DATE(" . $date . ",'+". (int)$months . " month')"; return "DATE(" . $date . ",'+". $months . " month')";
} }
public function getDateSubMonthExpression($date, $months) public function getDateSubMonthExpression($date, $months)
{ {
return "DATE(" . $date . ",'-". (int)$months . " month')"; return "DATE(" . $date . ",'-". $months . " month')";
} }
protected function _getTransactionIsolationLevelSQL($level) protected function _getTransactionIsolationLevelSQL($level)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment