2017 © Pedro Peláez
 

library yii2-db-oracle

Base library and foundation components for Oracle Database

image

adipriyantobpn/yii2-db-oracle

Base library and foundation components for Oracle Database

  • Saturday, September 9, 2017
  • by adipriyantobpn
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Oracle DB Base Component

Base library and foundation components for Oracle Database, (*1)

Why Using this Package?

Not all developer has access to Oracle DB as SYSDBA role., (*2)

In the default yii\db\oci\Schema, the database connection must specify user which has access to DBA_USERS view., (*3)

Please refer to findSchemaNames() function in : https://github.com/yiisoft/yii2/blob/master/framework/db/oci/Schema.php, (*4)

Installation

The preferred way to install this extension is through composer., (*5)

Either run, (*6)

php composer.phar require --prefer-dist adipriyantobpn/yii2-db-oracle "*"

or add, (*7)

"adipriyantobpn/yii2-db-oracle": "*"

to the require section of your composer.json file., (*8)

Usage

Once the extension is installed, you can access Oracle DB by configure db component in your config.php like this:, (*9)

'components' => [
    'db' => [
        'class' => 'adipriyantobpn\db\oracle\Connection',
        'host' => 'localhost',
        'port' => 1522 // default: 1521
        'sid' => 'XE'
        'dateFormat' => 'DD-MON-RR' // default: 'YYYY-MM-DD HH24:MI:SS'
    ],
]

By using configuration format above, the connection class will be automatically build Oracle DSN by using this template:, (*10)

$this->dsn = "oci:dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={$this->host})(PORT={$this->port})))(CONNECT_DATA=(SID={$this->sid})))"

But if you want to configure DSN with different format, you can omit host, port, and sid properties like this:, (*11)

'components' => [
    'db' => [
        'class' => 'adipriyantobpn\db\oracle\Connection',
        'dsn' => 'oci:dbname=//localhost:1521/XE',
        'dateFormat' => 'DD-MON-RR' // default: 'YYYY-MM-DD HH24:MI:SS'
    ],
]

The Versions

09/09 2017

dev-develop

dev-develop

Base library and foundation components for Oracle Database

  Sources   Download

MIT

The Requires

 

by Adi Priyanto

library yii2 db oracle

09/09 2017

dev-master

9999999-dev

Base library and foundation components for Oracle Database

  Sources   Download

MIT

The Requires

 

by Adi Priyanto

library yii2 db oracle

09/09 2017

1.0

1.0.0.0

Base library and foundation components for Oracle Database

  Sources   Download

MIT

The Requires

 

by Adi Priyanto

library yii2 db oracle