2017 © Pedro Peláez
 

library lumen-db2

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

image

michaelb/lumen-db2

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  • Tuesday, June 7, 2016
  • by michaelb
  • Repository
  • 1 Watchers
  • 1 Stars
  • 227 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 3 % Grown

The README.md

This is an adaptation of cooperl22's laravel-db2 to work with Lumen

Lumen-DB2

Installation

Install lumen-db2 via composer:, (*1)

composer require michaelb/lumen-db2

Uncomment call to Eloquent and add the DB2ServiceProvideer to bootstrap/app.php:, (*2)

// ...

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/

$app = new Laravel\Lumen\Application(
    realpath(__DIR__.'/../')
);

// $app->withFacades();

$app->withEloquent(); // <- Uncomment this

// ...

/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/

$app->register(MichaelB\Database\DB2\DB2ServiceProvider::class); // <- Add this

Configuration

Create the app/config/database.php file:, (*3)


/* |-------------------------------------------- | Configuration Defaults |-------------------------------------------- */ return [ 'fetch' => PDO::FETCH_CLASS, 'connections' => [ 'as400' => [ 'driver' => 'odbc', // General settings 'host' => '', 'username' => '', 'password' => '', //Server settings 'database' => '', 'prefix' => '', 'schema' => '', 'signon' => 3, 'ssl' => 0, 'commitMode' => 2, 'connectionType' => 0, 'defaultLibraries' => '', 'naming' => 0, 'unicodeSql' => 0, // Format settings 'dateFormat' => 5, 'dateSeperator' => 0, 'decimal' => 0, 'timeFormat' => 0, 'timeSeparator' => 0, // Performances settings 'blockFetch' => 1, 'blockSizeKB' => 32, 'allowDataCompression' => 1, 'concurrency' => 0, 'lazyClose' => 0, 'maxFieldLength' => 15360, 'prefetch' => 0, 'queryTimeout' => 1, // Modules settings 'defaultPkgLibrary' => '', 'defaultPackage' => '', 'extendedDynamic' => 1, // Diagnostic settings 'QAQQINILibrary' => '', 'sqDiagCode' => '', // Sort settings 'languageId' => '', 'sortTable' => '', 'sortSequence' => 0, 'sortWeight' => 0, 'jobSort' => 0, // Conversion settings 'allowUnsupportedChar' => 0, 'ccsid' => 1208, 'graphic' => 0, 'forceTranslation' => 0, // Other settings 'allowProcCalls' => 0, 'DB2SqlStates' => 0, 'debug' => 0, 'trueAutoCommit' => 0, 'catalogOptions' => 3, 'libraryView' => 0, 'ODBCRemarks' => 0, 'searchPattern' => 1, 'translationDLL' => '', 'translationOption' => 0, 'maxTraceSize' => 0, 'multipleTraceFiles' => 1, 'trace' => 0, 'traceFilename' => '', 'extendedColInfo' => 0, 'options' => [ PDO::ATTR_CASE => PDO::CASE_LOWER, PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_PERSISTENT => false ] ] ] ];

driver setting is either 'odbc' for ODBC connection or 'ibm' for pdo_ibm connection Then if driver is 'odbc', database must be set to ODBC connection name. if driver is 'ibm', database must be set to IBMi database name (WRKRDBDIRE)., (*4)

Usage

Consult the Laravel framework documentation., (*5)

The Versions

07/06 2016

dev-develop

dev-develop

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  Sources   Download

MIT

The Requires

 

by Maxime Rault

database laravel lumen pdo odbc db2

12/11 2015

dev-master

9999999-dev

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  Sources   Download

MIT

The Requires

 

by Maxime Rault

database laravel lumen pdo odbc db2

12/11 2015

v1.0.1

1.0.1.0

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  Sources   Download

MIT

The Requires

 

by Maxime Rault

database laravel lumen pdo odbc db2

23/10 2015

dev-query-patch

dev-query-patch

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  Sources   Download

MIT

The Requires

 

by Maxime Rault

database laravel lumen pdo odbc db2

22/10 2015

v1.0

1.0.0.0

lumen-db2 is a simple DB2 service provider for Lumen. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

  Sources   Download

MIT

The Requires

 

by Maxime Rault

database laravel lumen pdo odbc db2