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
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 !