問題描述
我工作的公司目前使用一些基本功能來抽象 OCI 庫作為數據庫連接的一種手段.我們正在考慮切換到 PHP 的 PDO 對象,但從一些快速搜索來看,Oracle 驅動程序似乎比其他 PDO 驅動程序成熟一些.如果有人在生產環境中使用過 PDO/oci8,我將不勝感激.
The company I work for currently uses some basic functions to abstract the OCI libraries as a means for DB connectivity. We're considering switching to PHP's PDO object, but from some quick searches, it looks like the Oracle driver is a bit less mature than the other PDO drivers. I would appreciate some pro/cons for PDO/oci8 from anyone who has used it in a production environment.
謝謝!
推薦答案
在我看來,Oracle 對為 PDO 開發驅動程序不感興趣,它正在開發自己的驅動程序,以使您更接近 oracle 數據庫......到 oracle 驅動程序...等等:)
It seems to me that Oracle is not interested in developing a driver for PDO it's developing it's own driver to keep you close to oracle database... to oracle driver... etc. :)
據我所知,如果你能應付 max.4000 CHARS 的 VARCHAR2 文本.如果您需要 CLOB(和/或更大),請不要使用 PDO_OCI.
As far as I've seen there is no problem if you can cope with max. texts of VARCHAR2 of 4000 CHARS. If you need CLOBs (and/or bigger) don't go with PDO_OCI.
我創建了一套類PDOSurrogate",作為 Oracle 的 PDO 替代品.當 PDO 足夠成熟時,我可以使用 Refactor->Rename 將其更改為 PDO.
I've created a suite of classes "PDOSurrogate" as a drop in replacement for PDO with Oracle. When PDO is mature enough I can use Refactor->Rename to change it to PDO.
這篇關于甲骨文,PDO_OCI 與 OCI8的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!