Commit 1f656a16 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Renamed Db2 to DB2

parent b7cac8c3
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\DBAL\Driver\IbmDb2; namespace Doctrine\DBAL\Driver\IBMDB2;
class Db2Connection implements \Doctrine\DBAL\Driver\Connection class DB2Connection implements \Doctrine\DBAL\Driver\Connection
{ {
private $_conn = null; private $_conn = null;
...@@ -35,7 +35,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection ...@@ -35,7 +35,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection
$this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions); $this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions);
} }
if (!$this->_conn) { if (!$this->_conn) {
throw new Db2Exception(db2_conn_errormsg()); throw new DB2Exception(db2_conn_errormsg());
} }
} }
...@@ -43,9 +43,9 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection ...@@ -43,9 +43,9 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection
{ {
$stmt = @db2_prepare($this->_conn, $sql); $stmt = @db2_prepare($this->_conn, $sql);
if (!$stmt) { if (!$stmt) {
throw new Db2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
} }
return new Db2Statement($stmt); return new DB2Statement($stmt);
} }
function query() function query()
...@@ -87,7 +87,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection ...@@ -87,7 +87,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection
function commit() function commit()
{ {
if (!db2_commit($this->_conn)) { if (!db2_commit($this->_conn)) {
throw new Db2Exception(db2_conn_errormsg($this->_conn)); throw new DB2Exception(db2_conn_errormsg($this->_conn));
} }
db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON);
} }
...@@ -95,7 +95,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection ...@@ -95,7 +95,7 @@ class Db2Connection implements \Doctrine\DBAL\Driver\Connection
function rollBack() function rollBack()
{ {
if (!db2_rollback($this->_conn)) { if (!db2_rollback($this->_conn)) {
throw new Db2Exception(db2_conn_errormsg($this->_conn)); throw new DB2Exception(db2_conn_errormsg($this->_conn));
} }
db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON);
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\DBAL\Driver\IbmDb2; namespace Doctrine\DBAL\Driver\IBMDB2;
use Doctrine\DBAL\Driver, use Doctrine\DBAL\Driver,
Doctrine\DBAL\Connection; Doctrine\DBAL\Connection;
...@@ -33,7 +33,7 @@ use Doctrine\DBAL\Driver, ...@@ -33,7 +33,7 @@ use Doctrine\DBAL\Driver,
* @version $Revision$ * @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */
class Db2Driver implements Driver class DB2Driver implements Driver
{ {
/** /**
* Attempts to create a connection with the database. * Attempts to create a connection with the database.
...@@ -63,7 +63,7 @@ class Db2Driver implements Driver ...@@ -63,7 +63,7 @@ class Db2Driver implements Driver
$password = null; $password = null;
} }
return new Db2Connection($params, $username, $password, $driverOptions); return new DB2Connection($params, $username, $password, $driverOptions);
} }
/** /**
...@@ -74,7 +74,7 @@ class Db2Driver implements Driver ...@@ -74,7 +74,7 @@ class Db2Driver implements Driver
*/ */
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return new \Doctrine\DBAL\Platforms\Db2Platform; return new \Doctrine\DBAL\Platforms\DB2Platform;
} }
/** /**
...@@ -86,7 +86,7 @@ class Db2Driver implements Driver ...@@ -86,7 +86,7 @@ class Db2Driver implements Driver
*/ */
public function getSchemaManager(Connection $conn) public function getSchemaManager(Connection $conn)
{ {
return new \Doctrine\DBAL\Schema\Db2SchemaManager($conn); return new \Doctrine\DBAL\Schema\DB2SchemaManager($conn);
} }
/** /**
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\DBAL\Driver\IbmDb2; namespace Doctrine\DBAL\Driver\IBMDB2;
class Db2Exception extends \Exception class DB2Exception extends \Exception
{ {
} }
\ No newline at end of file
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\DBAL\Driver\IbmDb2; namespace Doctrine\DBAL\Driver\IBMDB2;
class Db2Statement implements \Doctrine\DBAL\Driver\Statement class DB2Statement implements \Doctrine\DBAL\Driver\Statement
{ {
private $_stmt = null; private $_stmt = null;
...@@ -92,7 +92,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement ...@@ -92,7 +92,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement
} }
if (!db2_bind_param($this->_stmt, $column, "variable", DB2_PARAM_IN, $type)) { if (!db2_bind_param($this->_stmt, $column, "variable", DB2_PARAM_IN, $type)) {
throw new Db2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
} }
return true; return true;
} }
...@@ -191,7 +191,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement ...@@ -191,7 +191,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement
$retval = @db2_execute($this->_stmt, $params); $retval = @db2_execute($this->_stmt, $params);
if ($retval === false) { if ($retval === false) {
throw new Db2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
} }
return $retval; return $retval;
} }
...@@ -233,7 +233,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement ...@@ -233,7 +233,7 @@ class Db2Statement implements \Doctrine\DBAL\Driver\Statement
case \PDO::FETCH_NUM: case \PDO::FETCH_NUM:
return db2_fetch_array($this->_stmt); return db2_fetch_array($this->_stmt);
default: default:
throw new Db2Exception("Given Fetch-Style " . $fetchStyle . " is not supported."); throw new DB2Exception("Given Fetch-Style " . $fetchStyle . " is not supported.");
} }
} }
......
...@@ -87,7 +87,7 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -87,7 +87,7 @@ class Driver implements \Doctrine\DBAL\Driver
*/ */
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return new \Doctrine\DBAL\Platforms\Db2Platform; return new \Doctrine\DBAL\Platforms\DB2Platform;
} }
/** /**
...@@ -99,7 +99,7 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -99,7 +99,7 @@ class Driver implements \Doctrine\DBAL\Driver
*/ */
public function getSchemaManager(Connection $conn) public function getSchemaManager(Connection $conn)
{ {
return new \Doctrine\DBAL\Schema\Db2SchemaManager($conn); return new \Doctrine\DBAL\Schema\DB2SchemaManager($conn);
} }
/** /**
......
...@@ -44,7 +44,7 @@ final class DriverManager ...@@ -44,7 +44,7 @@ final class DriverManager
'pdo_oci' => 'Doctrine\DBAL\Driver\PDOOracle\Driver', 'pdo_oci' => 'Doctrine\DBAL\Driver\PDOOracle\Driver',
'pdo_mssql' => 'Doctrine\DBAL\Driver\PDOMsSql\Driver', 'pdo_mssql' => 'Doctrine\DBAL\Driver\PDOMsSql\Driver',
'oci8' => 'Doctrine\DBAL\Driver\OCI8\Driver', 'oci8' => 'Doctrine\DBAL\Driver\OCI8\Driver',
'ibm_db2' => 'Doctrine\DBAL\Driver\IbmDb2\Db2Driver', 'ibm_db2' => 'Doctrine\DBAL\Driver\IBMDB2\DB2Driver',
'pdo_ibm' => 'Doctrine\DBAL\Driver\PDOIbm\Driver', 'pdo_ibm' => 'Doctrine\DBAL\Driver\PDOIbm\Driver',
); );
......
...@@ -30,7 +30,7 @@ namespace Doctrine\DBAL\Schema; ...@@ -30,7 +30,7 @@ namespace Doctrine\DBAL\Schema;
* @version $Revision$ * @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */
class Db2SchemaManager extends AbstractSchemaManager class DB2SchemaManager extends AbstractSchemaManager
{ {
/** /**
* Return a list of all tables in the current database * Return a list of all tables in the current database
......
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