On Mon, 2010-05-24 at 14:56 -0400, Ilia Alshanetsky wrote: > As one of the original authors of PDO that is news to me. PDO was designed > to allow common functionality to be provided via a common interface, however > it was also designed to recognize that not all database interfaces are the > same. And as such allowed driver authors to provide custom functions > specific to the driver. If you look at the existing driver set, nearly all > drivers do that already (SQLite, MySQL, PostgreSQL)...
MySQL has no custom methods, but well that's irrelevant. One of the issues with the implementation of driver-specific methods is that the implementation is based on overriding the call handler and there's no way to check a PDO object for existing methods. Which I consider bad for specialization of a generic API. That aside: > Preventing addition of functionality for a driver, just because there are no > equivalents in other DB interfaces, makes little sense, IMHO. Right, but when adding method one should check whether there's similar functionality in other databases, in that case one should try to implement them in a similar matter. For instance in this case I can image that an "inTransaction" method could be implemented for multiple databases, a generic implementation might depend on PDO::beginTransaction and friends, a driver-specific specialization might give more details and I consider it worth evaluating. johannes > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php