Commit 0d2af886 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DDC-1271' into 2.1.x

parents eb0a4615 88d0e98c
...@@ -47,7 +47,7 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -47,7 +47,7 @@ class Driver implements \Doctrine\DBAL\Driver
* *
* @return string The DSN. * @return string The DSN.
*/ */
private function _constructDsn(array $params) protected function _constructDsn(array $params)
{ {
$dsn = ''; $dsn = '';
if (isset($params['host'])) { if (isset($params['host'])) {
......
...@@ -26,9 +26,9 @@ namespace Doctrine\DBAL\Driver\OCI8; ...@@ -26,9 +26,9 @@ namespace Doctrine\DBAL\Driver\OCI8;
*/ */
class OCI8Connection implements \Doctrine\DBAL\Driver\Connection class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
{ {
private $_dbh; protected $_dbh;
private $_executeMode = OCI_COMMIT_ON_SUCCESS; protected $_executeMode = OCI_COMMIT_ON_SUCCESS;
/** /**
* Create a Connection to an Oracle Database using oci8 extension. * Create a Connection to an Oracle Database using oci8 extension.
......
...@@ -30,15 +30,15 @@ use \PDO; ...@@ -30,15 +30,15 @@ use \PDO;
class OCI8Statement implements \Doctrine\DBAL\Driver\Statement class OCI8Statement implements \Doctrine\DBAL\Driver\Statement
{ {
/** Statement handle. */ /** Statement handle. */
private $_sth; protected $_sth;
private $_executeMode; protected $_executeMode;
private static $_PARAM = ':param'; protected static $_PARAM = ':param';
private static $fetchStyleMap = array( protected static $fetchStyleMap = array(
PDO::FETCH_BOTH => OCI_BOTH, PDO::FETCH_BOTH => OCI_BOTH,
PDO::FETCH_ASSOC => OCI_ASSOC, PDO::FETCH_ASSOC => OCI_ASSOC,
PDO::FETCH_NUM => OCI_NUM PDO::FETCH_NUM => OCI_NUM
); );
private $_paramMap = array(); protected $_paramMap = array();
/** /**
* Creates a new OCI8Statement that uses the given connection handle and SQL statement. * Creates a new OCI8Statement that uses the given connection handle and SQL statement.
......
...@@ -93,6 +93,10 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -93,6 +93,10 @@ class Driver implements \Doctrine\DBAL\Driver
public function getDatabase(\Doctrine\DBAL\Connection $conn) public function getDatabase(\Doctrine\DBAL\Connection $conn)
{ {
$params = $conn->getParams(); $params = $conn->getParams();
if (isset($params['dbname'])) {
return $params['dbname']; return $params['dbname'];
} }
return $conn->query('SELECT DATABASE()')->fetchColumn();
}
} }
\ No newline at end of file
...@@ -94,7 +94,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -94,7 +94,7 @@ class PostgreSqlPlatform extends AbstractPlatform
public function getDateDiffExpression($date1, $date2) public function getDateDiffExpression($date1, $date2)
{ {
return '('.$date1 . '-'.$date2.')'; return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))';
} }
public function getDateAddDaysExpression($date, $days) public function getDateAddDaysExpression($date, $days)
......
...@@ -38,10 +38,10 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -38,10 +38,10 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$onUpdate = null; $onUpdate = null;
$onDelete = null; $onDelete = null;
if (preg_match('(ON UPDATE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { if (preg_match('(ON UPDATE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) {
$onUpdate = $match[1]; $onUpdate = $match[1];
} }
if (preg_match('(ON DELETE ([a-zA-Z0-9]+))', $tableForeignKey['condef'], $match)) { if (preg_match('(ON DELETE ([a-zA-Z0-9]+( (NULL|ACTION|DEFAULT))?))', $tableForeignKey['condef'], $match)) {
$onDelete = $match[1]; $onDelete = $match[1];
} }
......
...@@ -78,6 +78,10 @@ EOT ...@@ -78,6 +78,10 @@ EOT
$resultSet = $conn->executeUpdate($sql); $resultSet = $conn->executeUpdate($sql);
} }
ob_start();
\Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth); \Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth);
$message = ob_get_clean();
$output->write($message);
} }
} }
...@@ -36,7 +36,7 @@ class Version ...@@ -36,7 +36,7 @@ class Version
/** /**
* Current Doctrine Version * Current Doctrine Version
*/ */
const VERSION = '2.1.0-DEV'; const VERSION = '2.2.0-DEV';
/** /**
* Compares a Doctrine version with the current one. * Compares a Doctrine version with the current one.
......
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