Davey Shafik has a new posting over on his blog (Fractured Realities) concerning his use of PDO for an ORM implemenatation for his blog.
For the last 3 days I've been writing an ORM implemenatation for Cerebral Cortex using PDO as the backend so that I have database independence. The new package is called Crtx_DB_DataObject and I've used Ruby On Rails' Active Record for inspiration - meaning we have minimal config.
Well, during this process I've come across several shortcomings... I've been using the SQLite and PgSQL drivers, because Wez said there was bug in the CVS MySQL driver: PgSQL will not accept the password if you pass it into the PDO constructor using the appropriate args, The SQLite Driver uses SQLite 3 - so its not compatible with those made using the current SQLite extension, PgSQL does not allow named identifiers for prepared queries, and SQLite uses the ? notation, and PDO doesn't compensate again.
As a final point I'd like to say that with these issues, I really don't see the point of PDO in PHP 5.1 if there is no cross-DB SQL munging going on you gain nothing - you're still using difference queries for each DB, just the same set of functions. Is this really considered good enough to tout as a major feature?
With these items mentioned, I wonder how many of these will be taken care of before the PHP 5.1 release. Keep an eye out - there's still time for them to get resolved...




