Ddc 494 #285

Closed
wants to merge 7 commits into
from

Conversation

Projects
None yet
5 participants
@spicajames

Added driver pdo_ibmi to support to db2 iSeries using pdo_odbc

@doctrinebot

This comment has been minimized.

Show comment Hide comment
@doctrinebot

doctrinebot Mar 12, 2013

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-463

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-463

+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

You can remove that line

@beberlei

beberlei Mar 14, 2013

Owner

You can remove that line

+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 1.0

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

This is wrong, @since will probably be 2.5

@beberlei

beberlei Mar 14, 2013

Owner

This is wrong, @since will probably be 2.5

@@ -0,0 +1,120 @@
+<?php
+/*
+ * $Id$

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

You can remove this line and the empty line below, this are SVN relicts

@beberlei

beberlei Mar 14, 2013

Owner

You can remove this line and the empty line below, this are SVN relicts

+ */
+ private function _constructPdoDsn(array $params)
+ {
+ return 'odbc:'.$params['dbname'];

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

should we name it PDO IBM ODBC instead? because for example DB2iSeriesPlatform + SchemaManager should work wiht PDO IBM or IBM DB2 extensions or not?

@beberlei

beberlei Mar 14, 2013

Owner

should we name it PDO IBM ODBC instead? because for example DB2iSeriesPlatform + SchemaManager should work wiht PDO IBM or IBM DB2 extensions or not?

This comment has been minimized.

Show comment Hide comment
@spicajames

spicajames Mar 18, 2013

Probably won't work, DB2iSeriesPlatform only works with iSeries as DB2Platform only works with DB2 for Linux/unix/Windows the table names and their structure are quite different. This is why I don't know if its even posible to make a generic DB2Platform for PDOIbm or Ibm BD2.

@spicajames

spicajames Mar 18, 2013

Probably won't work, DB2iSeriesPlatform only works with iSeries as DB2Platform only works with DB2 for Linux/unix/Windows the table names and their structure are quite different. This is why I don't know if its even posible to make a generic DB2Platform for PDOIbm or Ibm BD2.

+
+/**
+ *
+ * @since 2.0

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

since 2.5

@beberlei

beberlei Mar 14, 2013

Owner

since 2.5

+ */
+ public function getListTableColumnsSQL($table, $database = null) {
+// return "SELECT DISTINCT c.tabschema, c.tabname, c.colname, c.colno,
+// c.typename, c.default, c.nulls, c.length, c.scale,

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

+ public function getListTableConstraintsSQL($table) {
+
+ throw DBALException::notSupported(__METHOD__);
+// return "SELECT constraint_name as NAME,table_name as COLNAMES ,'Y' as UNIQUERULE

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

+ public function getListTableIndexesSQL($table, $currentDatabase = null) {
+ //return "SELECT NAME, COLNAMES, UNIQUERULE FROM SYSIBM.SYSINDEXES WHERE TBNAME = UPPER('" . $table . "')";
+// return "SELECT i.index_name as NAME,t.column_names as COLNAMES ,i.is_unique as UNIQUERULE
+// FROM QSYS2.SYSINDEXES i, qsys2.SYSINDEXSTAT t

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

+ }
+
+ public function getListTableForeignKeysSQL($table, $database = null) {
+// return "SELECT TBNAME, RELNAME, REFTBNAME, DELETERULE, UPDATERULE, FKCOLNAMES, PKCOLNAMES ".

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

+ /**
+ * {@inheritDoc}
+ */
+ public function getCurrentTimestampSQL() {

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

seeing it the first time here, braces in functions/methods and classes have to start on the next line, not on the same

public function getCurrentTimestampSQL()
{

Please fix this everywhere.

@beberlei

beberlei Mar 14, 2013

Owner

seeing it the first time here, braces in functions/methods and classes have to start on the next line, not on the same

public function getCurrentTimestampSQL()
{

Please fix this everywhere.

+ ' ' . $this->getColumnCollationDeclarationSQL($field['collation']) : '';
+
+
+ $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

Problem with indention here

@beberlei

beberlei Mar 14, 2013

Owner

Problem with indention here

+ * AbstractPlatform lacks of Decimal type so this code is
+ * overwritten here
+ */
+// $default = empty($field['notnull']) ? ' DEFAULT NULL' : '';

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

@beberlei

beberlei Mar 14, 2013

Owner

please remove the commented code when you dont need it anymore

This comment has been minimized.

Show comment Hide comment
@spicajames

spicajames Mar 22, 2013

I'm not sure of this yet

@spicajames

spicajames Mar 22, 2013

I'm not sure of this yet

@beberlei

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Mar 14, 2013

Owner

Can you implement a platform and a schema manager test as well like the other platforms have in tests/Doctrine/Tests/DBAL?

You can copy and adapt the phpunit.xml.dist to allow you to run the tests, to phpunit.xml

Owner

beberlei commented Mar 14, 2013

Can you implement a platform and a schema manager test as well like the other platforms have in tests/Doctrine/Tests/DBAL?

You can copy and adapt the phpunit.xml.dist to allow you to run the tests, to phpunit.xml

@spicajames

This comment has been minimized.

Show comment Hide comment
@spicajames

spicajames Mar 18, 2013

A newbie question. Should I make only the commits of the changes or I need to do a new pull request?

A newbie question. Should I make only the commits of the changes or I need to do a new pull request?

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Mar 18, 2013

Owner

You can simply add commits to this branch. The pull request will be
automatically updated
On 18 Mar 2013 16:32, "spicajames" notifications@github.com wrote:

A newbie question. Should I make only the commits of the changes or I need
to do a new pull request?


Reply to this email directly or view it on GitHubhttps://github.com/doctrine/dbal/pull/285#issuecomment-15061337
.

Owner

Ocramius commented Mar 18, 2013

You can simply add commits to this branch. The pull request will be
automatically updated
On 18 Mar 2013 16:32, "spicajames" notifications@github.com wrote:

A newbie question. Should I make only the commits of the changes or I need
to do a new pull request?


Reply to this email directly or view it on GitHubhttps://github.com/doctrine/dbal/pull/285#issuecomment-15061337
.

+/**
+ * Driver for the PDO IBM extension
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

This comment has been minimized.

Show comment Hide comment
@stof

stof Mar 18, 2013

Member

This is wrong. the license is MIT (as said in the license header), not LGPL.

@stof

stof Mar 18, 2013

Member

This is wrong. the license is MIT (as said in the license header), not LGPL.

+ /**
+ * {@inheritDoc}
+ */
+ public function initializeDoctrineTypeMappings() {

This comment has been minimized.

Show comment Hide comment
@stof

stof Mar 18, 2013

Member

The curly braces for class and method declarations should be on its own line (same everywhere)

@stof

stof Mar 18, 2013

Member

The curly braces for class and method declarations should be on its own line (same everywhere)

+ public function getForeignKeyReferentialActionSQLUpdate($action) {
+ $upper = strtoupper($action);
+ switch ($upper) {
+ case 'CASCADE': return 'RESTRICT';

This comment has been minimized.

Show comment Hide comment
@stof

stof Mar 18, 2013

Member

The return statement should be on the next line

@stof

stof Mar 18, 2013

Member

The return statement should be on the next line

+/**
+ * IBM Db2 Schema Manager
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

This comment has been minimized.

Show comment Hide comment
@stof

stof Mar 18, 2013

Member

wrng license

@stof

stof Mar 18, 2013

Member

wrng license

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Oct 29, 2013

Owner

I just got pinged again about this one - is there still work going on here?

As for the failure, maybe the PR needs a rebase.

Owner

Ocramius commented Oct 29, 2013

I just got pinged again about this one - is there still work going on here?

As for the failure, maybe the PR needs a rebase.

@spicajames

This comment has been minimized.

Show comment Hide comment
@spicajames

spicajames Oct 30, 2013

We are working in our company using this driver, and it's working just fine. I will try the rebase.

We are working in our company using this driver, and it's working just fine. I will try the rebase.

@beberlei

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Dec 22, 2013

Owner

Please put this code into your own open source library and then release it on packagist if you want to share it. We think the implementation is still incomplete and cannot support this further on through odbc since we have the 'ibm_db2' driver already. Our @deeky666 will work on support for the different DB2 platforms when he has time for DBAL 2.6 or a later version.

Owner

beberlei commented Dec 22, 2013

Please put this code into your own open source library and then release it on packagist if you want to share it. We think the implementation is still incomplete and cannot support this further on through odbc since we have the 'ibm_db2' driver already. Our @deeky666 will work on support for the different DB2 platforms when he has time for DBAL 2.6 or a later version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment