note 98629 added to ref.pdo-oci
| From: | geompse at gmail dot com | Date: | Mon, 28 Jun 2010 04:49:23 +0000 |
| Subject: | note 98629 added to ref.pdo-oci | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170511@lists.php.net to get a copy of this message | ||
Notice the red block at the beginning of this page... pdo_oci is HIGHLY experimental.
Even though it is under dev from 2004, it lakes today support for things that _do_ matters :
- bind a varchar2 of 3500 chars
- get selected metas
- left join with blobs/clobs
- etc.
For the story, since we use pdo_pgsql in our software, I thought it would be viable to use pdo_oci
for running under Oracle. After a long battle, I finally won :
1) If requested driver has a non-experimental pdo version available, use it.
2) else (well, for pdo_oci at least), use an abstraction layer of your own.
3) you're done.
What I did in more details...
2 "main" classes for being compliant with "$obj instanceof PDO" or such :
- class PhpDb extends PDO
- class PhpDbStatement extends PDOStatement
2 "abstract" classes that defines what PDO actually does :
- abstract class PhpDbAbstract
- abstract class PhpDbAbstractStatement
And at last for each driver, 2 classes doing the abstraction :
- class PhpDbDriverOracle extends PhpDbAbstract
- class PhpDbDriverOracleStatement extends PhpDbAbstractStatement
"main" classes are accessed from your script, simply replace "new PDO" with
"new PhpDb".
"abstract" classes are mainly there for the documentation :p
"driver" classes do the job in background, they are instances by the main classes.
My PhpDb will be in an open source project sooner or later, search google or mail me !
----
Server IP: 195.221.21.36
Probable Submitter: 82.227.124.74
----
Manual Page -- http://www.php.net/manual/en/ref.pdo-oci.php
Edit -- https://master.php.net/note/edit/98629
Del: integrated -- https://master.php.net/note/delete/98629/integrated
Del: useless -- https://master.php.net/note/delete/98629/useless
Del: bad code -- https://master.php.net/note/delete/98629/bad+code
Del: spam -- https://master.php.net/note/delete/98629/spam
Del: non-english -- https://master.php.net/note/delete/98629/non-english
Del: in docs -- https://master.php.net/note/delete/98629/in+docs
Del: other reasons-- https://master.php.net/note/delete/98629
Reject -- https://master.php.net/note/reject/98629
Search -- https://master.php.net/manage/user-notes.php