guidofaecke/doctrine-dbal-ibmi
Composer 安装命令:
composer require guidofaecke/doctrine-dbal-ibmi
包简介
Doctrine DBAL module for DB2 on the IBM i platform
README 文档
README
Doctrine DBAL module for DB2 on the IBM i platform.
Based on the original work by @cassvail in doctrine/dbal#910.
Usage
First, install with Composer:
$ composer require guidofaecke/doctrine-dbal-ibmi
Configuration
In your connection configuration, use this specific DB2Driver class, for
example, when configuring for a Zend Expressive application:
<?php return [ 'doctrine' => [ 'connection' => [ 'orm_default' => [ 'driverClass' => \DoctrineDbalIbmi\Driver\DB2Driver::class, 'params' => [ 'host' => '...', 'user' => '...', 'password' => '...', 'dbname' => '...', 'persistent' => true, 'driverOptions' => [ 'i5_naming' => DB2_I5_NAMING_OFF, 'i5_commit' => DB2_I5_TXN_NO_COMMIT, 'i5_lib' => '...', ], ], ], ], ], ];
Manual Configuration
You can manually configure an EntityManager like so:
<?php $configuration = \Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration([ __DIR__ . '/../path/to/your/entities/', ], true); $connection = [ 'driverClass' => \DoctrineDbalIbmi\Driver\DB2Driver::class, 'host' => '...', // Replace this 'user' => '...', // Replace this 'password' => '...', // Replace this 'dbname' => '...', // Look up value with WRKRDBDIRE 'persistent' => true, 'driverOptions' => [ 'i5_lib' => '...', // Replace this 'i5_naming' => DB2_I5_NAMING_OFF, 'i5_commit' => DB2_I5_TXN_NO_COMMIT, ], ]; $entityManager = \Doctrine\ORM\EntityManager::create($connection, $configuration);
You can then use this instance of $entityManager.
统计信息
- 总下载量: 4.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-01