Commit d096f0aa authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'master' of github.com:doctrine/dbal

parents 1d8e9081 26fda1b2
......@@ -47,7 +47,7 @@ class Driver implements \Doctrine\DBAL\Driver
*
* @return string The DSN.
*/
private function _constructDsn(array $params)
protected function _constructDsn(array $params)
{
$dsn = '';
if (isset($params['host'])) {
......
......@@ -26,9 +26,9 @@ namespace Doctrine\DBAL\Driver\OCI8;
*/
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.
......
......@@ -30,15 +30,15 @@ use \PDO;
class OCI8Statement implements \Doctrine\DBAL\Driver\Statement
{
/** Statement handle. */
private $_sth;
private $_executeMode;
private static $_PARAM = ':param';
private static $fetchStyleMap = array(
protected $_sth;
protected $_executeMode;
protected static $_PARAM = ':param';
protected static $fetchStyleMap = array(
PDO::FETCH_BOTH => OCI_BOTH,
PDO::FETCH_ASSOC => OCI_ASSOC,
PDO::FETCH_NUM => OCI_NUM
);
private $_paramMap = array();
protected $_paramMap = array();
/**
* Creates a new OCI8Statement that uses the given connection handle and SQL statement.
......
......@@ -71,7 +71,7 @@ class Driver implements \Doctrine\DBAL\Driver
if (isset($params['charset'])) {
$dsn .= 'charset=' . $params['charset'] . ';';
}
return $dsn;
}
......@@ -93,6 +93,10 @@ class Driver implements \Doctrine\DBAL\Driver
public function getDatabase(\Doctrine\DBAL\Connection $conn)
{
$params = $conn->getParams();
return $params['dbname'];
if (isset($params['dbname'])) {
return $params['dbname'];
}
return $conn->query('SELECT DATABASE()')->fetchColumn();
}
}
\ No newline at end of file
......@@ -38,10 +38,10 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$onUpdate = 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];
}
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];
}
......
......@@ -26,7 +26,7 @@ use Symfony\Component\Console\Input\InputArgument,
/**
* Task for executing arbitrary SQL that can come from a file or directly from
* the command line.
*
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
......@@ -71,13 +71,17 @@ EOT
if ( ! is_numeric($depth)) {
throw new \LogicException("Option 'depth' must contains an integer value");
}
if (preg_match('/^select/i', $sql)) {
$resultSet = $conn->fetchAll($sql);
} else {
$resultSet = $conn->executeUpdate($sql);
}
ob_start();
\Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth);
$message = ob_get_clean();
$output->write($message);
}
}
......@@ -36,7 +36,7 @@ class Version
/**
* Current Doctrine Version
*/
const VERSION = '2.1.0RC2-DEV';
const VERSION = '2.2.0-DEV';
/**
* Compares a Doctrine version with the current one.
......
Subproject commit 565674b9b376edbc5e31070e91fd85ea6dbd5d60
Subproject commit 40f1bf16e84ddc5291a6a63aa00b9879c40e3500
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