Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Enable persistent connections for IbmDb2.#5314

Merged
ralphschindler merged 2 commits into
zendframework:masterfrom
guidofaecke:10211301
Nov 21, 2013
Merged

Enable persistent connections for IbmDb2.#5314
ralphschindler merged 2 commits into
zendframework:masterfrom
guidofaecke:10211301

Conversation

@guidofaecke
Copy link
Copy Markdown

Usage example in global.php:

return array(
    'db' => array(
        'driver' => 'IbmDb2',
        'database' => '*LOCAL',
        'username' => 'user',
        'password' => 'password',
        'persistent' => true,
        'driver_options' => array(
            'i5_naming' => DB2_I5_NAMING_ON,
            'i5_libl' => 'SOMELIB QGPL'
        ),
        'platform_options' => array(
            'quote_identifiers' => false
        )
    ),

    'service_manager' => array(
        'factories' => array(
            'Zend\Db\Adapter\Adapter' =>
'Zend\Db\Adapter\AdapterServiceFactory'
        )
    )
);

Change-Id: I42ff3d52b2f112cefb828432c93eb409d42b2cad

Usage example in global.php:
<?php
return array(
    'db' => array(
        'driver' => 'IbmDb2',
        'database' => '*LOCAL',
        'username' => 'GUIDO',
        'password' => 'GUIDO55',
        'persistent' => true,
        'driver_options' => array(
            'i5_naming' => DB2_I5_NAMING_ON,
            'i5_libl' => 'WSDATA QGPL'
        ),
        'platform_options' => array(
            'quote_identifiers' => false
        )
    ),
    
    'service_manager' => array(
        'factories' => array(
            'Zend\Db\Adapter\Adapter' =>
'Zend\Db\Adapter\AdapterServiceFactory'
        )
    )
);


Change-Id: I42ff3d52b2f112cefb828432c93eb409d42b2cad
@samsonasik
Copy link
Copy Markdown
Contributor

@guidofaecke the travis failure because of trailing_spaces, you can fix it with php-cs-fixer :

php php-cs-fixer.phar fix /path/to/your/zf2/library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php --fixers=trailing_spaces

'db' => array(
        'driver' => 'IbmDb2',
        'database' => '*LOCAL',
        'username' => 'USER',
        'password' => 'PASSWORD',
        'persistent' => true,
        'driver_options' => array(
            'i5_naming' => DB2_I5_NAMING_ON,
            'i5_libl' => 'SOMELIB QGPL'
        ),
        'platform_options' => array(
            'quote_identifiers' => false
        )
    ),

'persistent' accepts true/false, or can be left out

Change-Id: I8b42f83e7be794286fc5b23e8dc195bb22b23b66
@ralphschindler ralphschindler merged commit 853d730 into zendframework:master Nov 21, 2013
@guidofaecke guidofaecke deleted the 10211301 branch December 13, 2013 22:25
@ralphschindler ralphschindler self-assigned this Mar 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants