2017 © Pedro Peláez
 

library doctrine-dbal-ibmi

Doctrine DBAL module for DB2 on the IBM i platform

image

alanseiden/doctrine-dbal-ibmi

Doctrine DBAL module for DB2 on the IBM i platform

  • Sunday, October 23, 2016
  • by asgrim
  • Repository
  • 6 Watchers
  • 5 Stars
  • 2,717 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 5 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

doctrine-dbal-ibmi

Lint Quality assurance Build and test, (*1)

Doctrine DBAL drivers for DB2 on the IBM i platform., (*2)

Based on the original work by @cassvail in doctrine/dbal#910., (*3)

Usage

First, install with Composer:, (*4)

composer require alanseiden/doctrine-dbal-ibmi

Configuration

This package provides 2 drivers: OdbcDriver and DB2Driver., (*5)

OdbcDriver requires the pdo_odbc extension, and is the recommended driver., (*6)

DB2Driver requires the ibm_db2 extension, and is not recommended for new connections., (*7)

These drivers can be configured using the instructions described in the Doctrine DBAL docs., (*8)

<?php

use Doctrine\DBAL\DriverManager;
use DoctrineDbalIbmi\Driver\OdbcDriver;

$connectionParams = [
    'driverClass' => OdbcDriver::class,
    'host' => 'localhost',
    'dbname' => 'mydb',
    'user' => 'user',
    'password' => 'secret',
];

$conn = DriverManager::getConnection($connectionParams);

Examples

Doctrine ORM

You can manually configure an EntityManager like so:, (*9)

<?php

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup;
use DoctrineDbalIbmi\Driver\OdbcDriver;

$configuration = Setup::createAnnotationMetadataConfiguration([
    __DIR__ . '/../path/to/your/entities/',
], true);

$connection = [
    'driverClass' => OdbcDriver::class,
    'host' => 'localhost',
    'dbname' => 'mydb',
    'user' => 'user',
    'password' => 'secret',
    'persistent' => false,
];

$entityManager = EntityManager::create($connection, $configuration);

You can then use this instance of \Doctrine\ORM\EntityManager., (*10)

Zend Expressive

In your connection configuration, use these settings when configuring a Zend Expressive application:, (*11)

<?php

use DoctrineDbalIbmi\Driver\OdbcDriver;

return [
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'driverClass' => OdbcDriver::class,
                'params' => [
                    'host' => 'localhost',
                    'dbname' => 'mydb',
                    'user' => 'user',
                    'password' => 'secret',
                    'persistent' => false,
                ],
            ],
        ],
    ],
];

The Versions

23/10 2016

dev-add-test-for-do-modify-limit-query

dev-add-test-for-do-modify-limit-query

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Cassiano Vailati

12/10 2016

dev-master

9999999-dev

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

The Development Requires

by Cassiano Vailati

04/04 2016

0.0.6

0.0.6.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

15/03 2016

0.0.5

0.0.5.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

14/03 2016

0.0.4

0.0.4.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

04/03 2016

0.0.3

0.0.3.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

22/01 2016

0.0.2

0.0.2.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires

 

22/01 2016

0.0.1

0.0.1.0

Doctrine DBAL module for DB2 on the IBM i platform

  Sources   Download

MIT

The Requires